Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for Helm 1st-class. Closes #1145 #1865

Merged
merged 107 commits into from
Sep 6, 2019

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Jul 2, 2019

This contains a couple of changes that rollup to the new feature:

  • The setting helm.repositories is merged into repositories. This is a breaking change that actually simplifies the code.
  • Repositories are accessed via an interfac:
    • util/repo which contains the Repo interface and value-objects that specify a more generalized concept of a repository.
    • util/repo/factory which contains a factory that takes a Repository (as defined in the core file types.go) and returns a Repo to create one.
  • Extracting the code that invokes helm command into util/helm/cmd.go, to allow for reuse of that code.
  • A new util/git/repo.go that implements the Repo interface.
  • A new util/helm/repo.go that implements the Repo interface.

Another key consideration is that the concept of HEAD is generalized into latest.

Closes #1145

reposerver/repository/repository.proto Show resolved Hide resolved
reposerver/repository/repository.proto Show resolved Hide resolved
util/argo/argo.go Outdated Show resolved Hide resolved
util/argo/argo.go Outdated Show resolved Hide resolved
util/db/db.go Show resolved Hide resolved
@alexec
Copy link
Contributor Author

alexec commented Jul 3, 2019

Failed TestAddRemovePublicRepo

@alexec
Copy link
Contributor Author

alexec commented Jul 3, 2019

TestAddRemovePublicRepo failed.

@@ -122,7 +122,7 @@ func (m *appStateManager) getRepoObjs(app *v1alpha1.Application, source v1alpha1
}
manifestInfo, err := repoClient.GenerateManifest(context.Background(), &apiclient.ManifestRequest{
Repo: repo,
HelmRepos: helmRepos,
Copy link
Collaborator

@alexmt alexmt Sep 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove Repo field, since now we are passing all repositories and repo server just need to find matching one by URL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry - don't think it works like that

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repos field now contains all repositories ( git and helm ). Repository server already filters give repos by type for helm applications. In the same way repo server might filter repo by URL. Is not it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added few comments. As we discuss offline we should make following improvements:

  • allow user to specify repo type during app creation without registering it. Now we are forcing user to register repo url using type helm even if it is publicly available.
  • app creation URL for helm case should be different from git (path field should be renamed to chart, we should try to auto-suggest available revisions)
  • same for repo creation UI. If user selects helm type when helm specific fields should be shown.
  • as @jannfis mentioned we should reuse existing CA management feature

We definitely have to implement these enhancements, so I'm ok to merge this PR and implement improvements later.

Please fix regression before merging this PR.

reposerver/repository/repository.go Show resolved Hide resolved
test/e2e/app_management_test.go Outdated Show resolved Hide resolved
return HTTPSCreds{
username,
password,
insecure,
clientCertData,
clientCertKey,
clientCAData,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100% agree. We should remove CA data and reuse existing functionality.

@@ -98,32 +98,28 @@ type OIDCConfig struct {
type RepoCredentials struct {
// The URL to the repository
URL string `json:"url,omitempty"`
// the type of the repo, "git" or "helm", assumed to be "git" if empty or absent
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of type lets introduce two mutually exclusive fields git and helm and move type-specific fields there.

@alexec alexec merged commit 4e9772e into argoproj:master Sep 6, 2019
@alexec alexec deleted the helm-1st-class branch September 6, 2019 22:37
@alexec alexec added the cool! label Sep 6, 2019
olivierlemasle added a commit to olivierlemasle/argo-cd that referenced this pull request Sep 19, 2019
This commit fixes Helm parsing of parameters values containing a comma.

The issue was first found as argoproj#1660, and fixed in argoproj#1720. However, commit
4e9772e, in argoproj#1865 removed the call to `cleanHelmParameters`, hence the
regression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm repository as first class Argo CD Application source
3 participants