-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[bitnami/common] Capabilities to return latest apiVersion if kubeVersion is undefined #26758
Conversation
…ion is undefined Signed-off-by: juan131 <jariza@vmware.com>
Signed-off-by: juan131 <jariza@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
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! Small suggestion
Signed-off-by: juan131 <jariza@vmware.com>
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
{{- if .Values.ingress -}} | ||
{{- if .Values.ingress.apiVersion -}} | ||
{{- $kubeVersion := include "common.capabilities.kubeVersion" . -}} | ||
{{- if (.Values.ingress).apiVersion -}} |
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.
Nice hack! I take note 📝
Description of the change
This PR ensures we return the latest known apiVersion for a given K8s object if
common.capabilities.kubeVersion
is unable to obtain thekubeVersion
(e.g. usinghelm template
with bothglobal.kubeVersion
andkubeVersion
values unset).Benefits
We should assume the latest kubernetes version as the target when it's undefined.
Possible drawbacks
Users using
helm template
(or ArgoCD and other CD tools that use helm templating engine under the hood) that aren't settingglobal.kubeVersion
norkubeVersion
may experience a change in their K8s objects' apiVersion.Applicable issues
None
Additional information
N/A
Checklist
Chart.yaml
according to semver. This is not necessary when the changes only affect README.md files.