-
Notifications
You must be signed in to change notification settings - Fork 289
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
Helm upgrade with existingCommunicationsSecretName
fails
#1376
Comments
Hey @voriol, There might be a bug in the Helm chart when using existing secret. Unfortunately we're focused on different priorities and I think we won't be able to fix this issue in next few weeks. Here are the possible solutions/workarounds I can see:
You can clone the repo and try to modify the Helm chart in this place: I didn't try it yet, but this could work: {{- if .Values.existingCommunicationsSecretName }}
{{- $secret := lookup "v1" "Secret" .Release.Namespace .Values.existingCommunicationsSecretName | default dict }}
- {{- $data := b64dec (index $secret.data "comm_config.yaml") -}}
+ {{- $secretData := $secret.data | default dict -}}
+ {{- $data := b64dec (index $secretData "comm_config.yaml" | default "") -}}
{{- $dataYaml := $data | fromYaml -}}
{{- $communications = $dataYaml.communications }}
{{- end }} Hope that helps. Cheers! |
I'll try to take a look at it next week. thanks @pkosiec |
Perfect, thank you! |
Hi @pkosiec, your solutions works fine!
I open the PR #1378 Thanks |
Originally posted by @voriol in #1274 (comment)
When updating my helm chart to the latest version, 1.8.0 I got the following error:
Error: template: sre-botkube/charts/botkube/templates/persistent-config.yaml:6:23: executing "sre-botkube/charts/botkube/templates/persistent-config.yaml" at <index $secret.data "comm_config.yaml">: error calling index: index of untyped nil
Reviewing the latest changes I see that the line it refers to was changed in this commit
fdb389c#diff-e694b58be4de3f2b3d147e65317458bbbc0f5319bd07c703d80dc3b05bb5d1b7
Specifically, on line 6:
{{- $data := b64dec (index $secret.data "comm_config.yaml") -}}
This is the secret content:
I am doing something wrong?
Thanks
The text was updated successfully, but these errors were encountered: