Skip to content
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

Conversation

bartramakers
Copy link

Description of the change

This PR fixes two issues:

  1. Removes duplicate extraIngress values in the NetworkPolicy
  2. Fixed incorrect indentation for the extraIngress / extraFromClauses values

Benefits

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 made extraFromClauses where they left out the from level, their output yaml will now be invalid.

Applicable issues

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Variables are documented in the values.yaml and added to the README.md using readme-generator-for-helm
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

Signed-off-by: Bitnami Containers <[email protected]>
@carrodher carrodher added verify Execute verification workflow for these changes in-progress labels Sep 18, 2024
@github-actions github-actions bot removed the triage Triage is needed label Sep 18, 2024
@github-actions github-actions bot removed the request for review from carrodher September 18, 2024 08:34
Copy link
Member

@migruiz4 migruiz4 left a 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?

Comment on lines 75 to -82
{{- $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 }}
Copy link
Member

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:

{{- 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 }}

Copy link

github-actions bot commented Oct 6, 2024

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.

@github-actions github-actions bot added the stale 15 days without activity label Oct 6, 2024
Copy link

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.

@bitnami-bot bitnami-bot added stale 15 days without activity and removed stale 15 days without activity labels Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minio solved stale 15 days without activity verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bitnami/minio] MinIO chart generating invalid networkPolicy when using extraIngress parameter
4 participants