abahmed / kwatch

:eyes: monitor & detect crashes in your Kubernetes(K8s) cluster instantly
https://kwatch.dev
MIT License
959 stars 75 forks source link

Chart configTemplate ignores clusterName and disableUpdateCheck #191

Closed drzero42 closed 1 year ago

drzero42 commented 1 year ago

Describe the bug When using the Helm Chart, the kwatch.config.configTemplate section ignores setting app.clusterName and upgrade.disableUpdateCheck.

To Reproduce Given this values file:

kwatch:
  config:
    configTemplate:
      app:
        clusterName: staging
      upgrader:
        disableUpdateCheck: true

Then run: helm template kwatch . -f kwatch-values.yml | grep -A10 ConfigMap The output will be:

kind: ConfigMap
metadata:
  name: kwatch-kwatch
  namespace: default
data:
  config: |4
      maxRecentLogLines: 0
      ignoreFailedGracefulShutdown: false
      disableUpdateCheck: false
...
---

Expected behavior Basically any and all values under kwatch.config.configTemplate should be put into the produced configMap.

Version/Commit v0.8.0

eremeevfd commented 1 year ago

@drzero42 I think that issue with disableUpdateCheck is related to incorrect structure:
it should be kwatch.config.configTemplate.disableUpdateCheck instead of kwatch.config.configTemplate.app.disableUpdateCheck
Or do you propose splitting configmap to several subdomains?

clusterName would add

Also I have a question regarding parsing all values, it's possible, but your example values won't work as I see

eremeevfd commented 1 year ago

Sorry, it was my bad, didn't see that config structure has been updated :DDD
Okay, then, let's try to put configTemplate as is, probably would use just multiline string for raw data

abahmed commented 1 year ago

@drzero42 @eremeevfd This should be fixed in #196 . Also, v0.8.0 is published on helm