-
Notifications
You must be signed in to change notification settings - Fork 563
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
feat: Option to pass kubeVersion to helm template #2002
Conversation
Hi, I found Datadog Chart use {{- define "enable-service-internal-traffic-policy" -}}
{{- if or (semverCompare "^1.22-0" .Capabilities.KubeVersion.GitVersion) .Values.agents.localService.forceLocalServiceEnabled -}}
true
{{- else -}}
false
{{- end -}}
{{- end -}} If This pull request may resolve our problem. |
The reason I need this feature myself is that I need to set pathType in the ingresses for prometheus. But the prometheus chart only allows setting the pathType in Kubernetes 1.19+ |
What can I do to get this pull request merged? |
# | ||
# Configure a fixed list of api versions to pass to 'helm template' via the --api-versions flag: | ||
apiVersions: | ||
- example/v1 | ||
|
||
# Configure a Kubernetes version to pass to 'helm template' via the --kube-version flag: | ||
kubeVersion: v1.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still unsure this is the right level to where kubeVersion is defined, as Helmfile allows a different k8s cluster hence k8s version per release, by specifying releases[].kubecontext
. But I do believe this is a good enough for a starter!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for your patience and contribution!
@msvticket @44smkn Hey! I recently learned that But you're already using Helm 3, right? Then you should just list API versions available to |
Updated README to note the above info 91aa0ac |
$ helm template --help | grep kube-version --kube-version was added again in version 3.6.0 with helm/helm#9040 |
When I ran |
@msvticket @44smkn Good to know! Thank you so much for sharing |
Relates to roboll#2002
To be able to use
helmfile template
to render helm charts for cluster with other than the default Kubernetes version in helm you might need to add the --kube-version flag to helm. This adds that functionality.