Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

Commit

Permalink
fix(grafana): fixed use of secret for grafana admin
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Benz <[email protected]>
  • Loading branch information
stebenz committed Apr 7, 2020
1 parent 331e033 commit 702daf1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
| `admin` | Spec for the definition of the admin account | nil |
| `admin.existingSecret` | Name of the secret which contains the admin account | |
| `admin.userKey` | Key of the username in the secret | |
| `admin.PasswordKey` | Key of the password in the secret | |
| `admin.passwordKey` | Key of the password in the secret | |
| `admin` | Spec for the definition of the admin account | |
| `datasources` | Spec for additional datasources | nil |
| `datasources.name` | Name of the datasource | |
Expand Down
9 changes: 6 additions & 3 deletions internal/bundle/application/applications/grafana/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ func (g *Grafana) SpecToHelmValues(monitor mntr.Monitor, toolset *toolsetsv1beta
}

if toolset.Grafana.Admin != nil {
values.Grafana.Admin.ExistingSecret = toolset.Grafana.Admin.ExistingSecret
values.Grafana.Admin.UserKey = toolset.Grafana.Admin.UserKey
values.Grafana.Admin.PasswordKey = toolset.Grafana.Admin.PasswordKey
values.Grafana.Admin = &helm.Admin{
ExistingSecret: toolset.Grafana.Admin.ExistingSecret,
UserKey: toolset.Grafana.Admin.UserKey,
PasswordKey: toolset.Grafana.Admin.PasswordKey,
}
}

if toolset.Grafana.Storage != nil {
values.Grafana.Persistence.Enabled = true
values.Grafana.Persistence.Size = toolset.Grafana.Storage.Size
Expand Down

0 comments on commit 702daf1

Please sign in to comment.