You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a problem with kubeconform checking dependent of .Capabilities.KubeVersion templates, like:
{{- if and (semverCompare "<1.23-0" (include "kubeVersion" $)) }}
apiVersion: autoscaling/v2beta1
{{- else -}}
apiVersion: autoscaling/v2
{{- end }}
kind: HorizontalPodAutoscaler
...
...
If i want to check this chart by 1.19 k8s version it get failed with:
> helm kubeconform . --kubernetes-version "1.19.3" ○ ERROR: Testing failed: kubeconform failed: failed to run kubeconform: rc=1
stdin - HorizontalPodAutoscaler failed validation: could not find schema for HorizontalPodAutoscaler
Error: plugin "kubeconform" exited with error
As I understood KubeConform is using helm template without --kube-version param, so the chart above templating by native kubectl version (e.g. 1.24.3) and trying to be checked by 1.19.3 schema.
May be I'm doing something wrong but for me this problem was fixed by adding --kube-version argument to source code of plugin_wrapper.py
if a.kubernetes_version is not None:
args["helm_tmpl"] += ["--kube-version", a.kubernetes_version]
Maybe it will be helpful to you.
The text was updated successfully, but these errors were encountered:
Hi!
There is a problem with kubeconform checking dependent of .Capabilities.KubeVersion templates, like:
If i want to check this chart by 1.19 k8s version it get failed with:
As I understood KubeConform is using
helm template
without--kube-version
param, so the chart above templating by native kubectl version (e.g. 1.24.3) and trying to be checked by 1.19.3 schema.May be I'm doing something wrong but for me this problem was fixed by adding --kube-version argument to source code of plugin_wrapper.py
Maybe it will be helpful to you.
The text was updated successfully, but these errors were encountered: