Giter Site home page Giter Site logo

Comments (4)

voriol avatar voriol commented on June 11, 2024 1

Hi @pkosiec, your solutions works fine!

 {{- 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 }}

I open the PR #1378

Thanks

from botkube.

pkosiec avatar pkosiec commented on June 11, 2024

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:

  1. You might try migrating your instance to Botkube Cloud, which doesn't have this issue as it doesn't use the complex ConfigMap merging logic. It's free for a single cluster!
  2. Alternatively, you could switch to use built-in secret with platform details
  3. Or, if you have a bit of time and energy, you could contribute and investigate/fix the bug. That would be much appreciated 🙏 Here are a few tips:

You can clone the repo and try to modify the Helm chart in this place:
https://github.com/kubeshop/botkube/blob/main/helm/botkube/templates/persistent-config.yaml#L6

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!

from botkube.

voriol avatar voriol commented on June 11, 2024

I'll try to take a look at it next week.

thanks @pkosiec

from botkube.

pkosiec avatar pkosiec commented on June 11, 2024

Perfect, thank you!

from botkube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.