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
When I create a new Helm chart with helm create test-helm-chart the horizontal autoscaling manifest template gets created with apiVersion: autoscaling/v2beta1 in the hpa.yaml file. Strict linting works because autoscaling is not enabled by default in the values.yaml.
When I enable autoscaling by setting
autoscaling:
enabled: true
in the values.yaml strict linting fails:
$ helm lint --strict test-helm-chart
==> Linting test-helm-chart
[INFO] Chart.yaml: icon is recommended
[WARNING] templates/hpa.yaml: autoscaling/v2beta1 HorizontalPodAutoscaler is deprecated in v1.22+, unavailable in v1.25+; use autoscaling/v2 HorizontalPodAutoscaler
Error: 1 chart(s) linted, 1 chart(s) failed
The linting should not fail here because my Kubernetes version still supports autoscaling/v2beta1 perfectly fine. It seems that Helm is not recognizing the Kubernetes versions returned by kubectl at all. I tried different setups with kubectl client version 1.20, 1.22 and 1.23 and Kubernetes server version 1.20 and 1.22. In all cases the strict linting fails. I think it should only fail if either the client or the server version returns v1.22+.
@b0n541 when helm lint. helm don't get k8s version form the k8s cluster. it from client-go's version in go.mod.
I thinks you idea is good. Welcome to create a PR for this.
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
When I create a new Helm chart with
helm create test-helm-chart
the horizontal autoscaling manifest template gets created withapiVersion: autoscaling/v2beta1
in thehpa.yaml
file. Strict linting works because autoscaling is not enabled by default in thevalues.yaml
.When I enable autoscaling by setting
in the
values.yaml
strict linting fails:The linting should not fail here because my Kubernetes version still supports
autoscaling/v2beta1
perfectly fine. It seems that Helm is not recognizing the Kubernetes versions returned bykubectl
at all. I tried different setups withkubectl
client version 1.20, 1.22 and 1.23 and Kubernetes server version 1.20 and 1.22. In all cases the strict linting fails. I think it should only fail if either the client or the server version returns v1.22+.Output of
helm version
:Output of
kubectl version
:Cloud Provider/Platform (AKS, GKE, Minikube etc.):
Minikube, AKS
The text was updated successfully, but these errors were encountered: