-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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/minio] Fix #29337: MinIO invalid ingress in network policy #29493
[bitnami/minio] Fix #29337: MinIO invalid ingress in network policy #29493
Conversation
Signed-off-by: Bart Ramakers <[email protected]>
Signed-off-by: Bart Ramakers <[email protected]>
Signed-off-by: Bart Ramakers <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
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.
Thank you for your contribution @bartramakers! Could you please take a look at my comment?
{{- $extraIngress := coalesce .Values.networkPolicy.extraIngress .Values.networkPolicy.extraFromClauses }} | ||
{{- if $extraIngress }} | ||
{{- toYaml $extraIngress | nindent 8 }} | ||
{{- toYaml $extraIngress | nindent 6 }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.networkPolicy.extraIngress }} | ||
{{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraIngress "context" $ ) | nindent 4 }} | ||
{{- end }} |
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.
Using the template chart as reference, which is used to model all of the charts in our catalog, the code block we should keep is the one that has been removed:
charts/template/CHART_NAME/templates/networkpolicy.yaml
Lines 69 to 71 in 60473da
{{- if .Values.networkPolicy.extraIngress }} | |
{{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraIngress "context" $ ) | nindent 4 }} | |
{{- end }} |
The value networkPolicy.extraFromClauses
is a legacy value that was introduced before we defined the standard values for our networkPolicy templates.
I would suggest to modify the ingress block to look like this:
{{- if .Values.networkPolicy.extraFromClauses }}
{{- toYaml .Values.networkPolicy.extraFromClauses | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.networkPolicy.extraIngress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
{{- end }}
This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution. |
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary. |
Description of the change
This PR fixes two issues:
extraIngress
values in the NetworkPolicyextraIngress
/extraFromClauses
valuesBenefits
No more errors when installing the chart because of incorrectly formatted yaml
Possible drawbacks
If somebody already took the incorrect indentation into account, and instead of making
extraIngress
values. they madeextraFromClauses
where they left out thefrom
level, their output yaml will now be invalid.Applicable issues
Checklist
Chart.yaml
according to semver. This is not necessary when the changes only affect README.md files.README.md
using readme-generator-for-helm