Skip to content

Commit

Permalink
Adds support for Helm 1st-class. Closes argoproj#1145
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Jul 2, 2019
1 parent b387a3a commit fce444f
Show file tree
Hide file tree
Showing 27 changed files with 910 additions and 1,207 deletions.
19 changes: 19 additions & 0 deletions assets/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3137,13 +3137,32 @@
"type": "object",
"title": "Repository is a Git repository holding application configurations",
"properties": {
"caData": {
"type": "string",
"format": "byte",
"title": "only for Helm repos"
},
"certData": {
"type": "string",
"format": "byte",
"title": "only for Helm repos"
},
"connectionState": {
"$ref": "#/definitions/v1alpha1ConnectionState"
},
"insecureIgnoreHostKey": {
"type": "boolean",
"format": "boolean"
},
"keyData": {
"type": "string",
"format": "byte",
"title": "only for Helm repos"
},
"name": {
"type": "string",
"title": "only for Helm repos"
},
"password": {
"type": "string"
},
Expand Down
13 changes: 0 additions & 13 deletions cmd/argocd-util/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,13 +435,6 @@ func getReferencedSecrets(un unstructured.Unstructured) map[string]bool {
if cred.UsernameSecret != nil {
referencedSecrets[cred.UsernameSecret.Name] = true
}
}
}
if helmReposRAW, ok := cm.Data["helm.repositories"]; ok {
helmRepoCreds := make([]settings.HelmRepoCredentials, 0)
err := yaml.Unmarshal([]byte(helmReposRAW), &helmRepoCreds)
errors.CheckError(err)
for _, cred := range helmRepoCreds {
if cred.CASecret != nil {
referencedSecrets[cred.CASecret.Name] = true
}
Expand All @@ -451,12 +444,6 @@ func getReferencedSecrets(un unstructured.Unstructured) map[string]bool {
if cred.KeySecret != nil {
referencedSecrets[cred.KeySecret.Name] = true
}
if cred.UsernameSecret != nil {
referencedSecrets[cred.UsernameSecret.Name] = true
}
if cred.PasswordSecret != nil {
referencedSecrets[cred.PasswordSecret.Name] = true
}
}
}
return referencedSecrets
Expand Down
4 changes: 2 additions & 2 deletions controller/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type appStateManager struct {
}

func (m *appStateManager) getRepoObjs(app *v1alpha1.Application, source v1alpha1.ApplicationSource, appLabelKey, revision string, noCache bool) ([]*unstructured.Unstructured, []*unstructured.Unstructured, *repository.ManifestResponse, error) {
helmRepos, err := m.db.ListHelmRepos(context.Background())
repos, err := m.db.ListRepositories(context.Background())
if err != nil {
return nil, nil, nil, err
}
Expand Down Expand Up @@ -117,7 +117,7 @@ func (m *appStateManager) getRepoObjs(app *v1alpha1.Application, source v1alpha1

manifestInfo, err := repoClient.GenerateManifest(context.Background(), &repository.ManifestRequest{
Repo: repo,
HelmRepos: helmRepos,
Repos: repos,
Revision: revision,
NoCache: noCache,
AppLabelKey: appLabelKey,
Expand Down
Loading

0 comments on commit fce444f

Please sign in to comment.