Skip to content
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

Fix for khcheck-storage template #896

Merged
merged 2 commits into from
Apr 23, 2021
Merged

Conversation

blame19
Copy link
Contributor

@blame19 blame19 commented Apr 21, 2021

This addresses #895

Many of the variables referenced inside khcheck-storage failed with the following error:

Error: template: kuberhealthy/templates/khcheck-storage.yaml:24:23: executing "kuberhealthy/templates/khcheck-storage.yaml" at <.Values.check.storage.image.registry>: can't evaluate field Values in type interface {}

Error: template: kuberhealthy/templates/khcheck-storage.yaml:44:25: executing "kuberhealthy/templates/khcheck-storage.yaml" at <.Values.check.storage.resources.requests.cpu>: can't evaluate field Values in type interface {}

this due to helm not being able to render the variables correctly inside the given {{ range }}. The $ notation fixes this (ref: https://helm.sh/docs/chart_template_guide/variables/)

I was able to test this in my local env with the default values.yaml, except with the addition of:

 # external check from registry
 # https://github.com/ChrisHirsch/kuberhealthy-storage-check
   **enabled: true**
   # empty string indicate default storage class
   # kubectl get storageclass
   # or put storage class names into list
   **storageClass: ["managed-premium"]**
   runInterval: 5m
   timeout: 10m
   image:
     registry: chrishirsch
     repository: kuberhealthy-storage-check
     tag: v0.0.1
   extraEnvs:
     CHECK_STORAGE_IMAGE: bitnami/nginx:1.19
     CHECK_STORAGE_INIT_IMAGE: bitnami/nginx:1.19
   nodeSelector: {}
   tolerations: []
   #- key: "key"
   #  operator: "Equal"
   #  value: "value"
   #  effect: "NoSchedule"
   resources:
     requests:
       cpu: 10m
       memory: 50Mi```

@CLAassistant
Copy link

CLAassistant commented Apr 21, 2021

CLA assistant check
All committers have signed the CLA.

@mikeinton
Copy link
Collaborator

I was able to reproduce this error and confirm the fix. Thanks @blame19 for addressing this.

@joshulyne joshulyne merged commit c12373e into kuberhealthy:master Apr 23, 2021
@zjhans zjhans linked an issue May 5, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

khcheck-storage fails due to template issues
4 participants