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

Commit 702daf1

Browse files
committed
fix(grafana): fixed use of secret for grafana admin
Signed-off-by: Stefan Benz <[email protected]>
1 parent 331e033 commit 702daf1

File tree

2 files changed

+7
-4
lines changed
  • docs
  • internal/bundle/application/applications/grafana

2 files changed

+7
-4
lines changed

docs/crd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
| `admin` | Spec for the definition of the admin account | nil |
6363
| `admin.existingSecret` | Name of the secret which contains the admin account | |
6464
| `admin.userKey` | Key of the username in the secret | |
65-
| `admin.PasswordKey` | Key of the password in the secret | |
65+
| `admin.passwordKey` | Key of the password in the secret | |
6666
| `admin` | Spec for the definition of the admin account | |
6767
| `datasources` | Spec for additional datasources | nil |
6868
| `datasources.name` | Name of the datasource | |

internal/bundle/application/applications/grafana/helm.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,13 @@ func (g *Grafana) SpecToHelmValues(monitor mntr.Monitor, toolset *toolsetsv1beta
118118
}
119119

120120
if toolset.Grafana.Admin != nil {
121-
values.Grafana.Admin.ExistingSecret = toolset.Grafana.Admin.ExistingSecret
122-
values.Grafana.Admin.UserKey = toolset.Grafana.Admin.UserKey
123-
values.Grafana.Admin.PasswordKey = toolset.Grafana.Admin.PasswordKey
121+
values.Grafana.Admin = &helm.Admin{
122+
ExistingSecret: toolset.Grafana.Admin.ExistingSecret,
123+
UserKey: toolset.Grafana.Admin.UserKey,
124+
PasswordKey: toolset.Grafana.Admin.PasswordKey,
125+
}
124126
}
127+
125128
if toolset.Grafana.Storage != nil {
126129
values.Grafana.Persistence.Enabled = true
127130
values.Grafana.Persistence.Size = toolset.Grafana.Storage.Size

0 commit comments

Comments
 (0)