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

feat(helm): allow networkPolicy to template values #248

Merged
merged 1 commit into from
Jan 30, 2024
Merged

feat(helm): allow networkPolicy to template values #248

merged 1 commit into from
Jan 30, 2024

Conversation

fty4
Copy link
Member

@fty4 fty4 commented Jan 30, 2024

Description

As the networkPolicy was introduced in #246 it works as expected.

But for our usecase we need to restrict the networkPolicy to the installed namespace.
This is possible if the namespace will be selected with a matching label.
Therefore the use of the variable .Releases.Namespace is a common approach.

With the current implementation templating of the values are not allowed.

This change will allow to template the values files (with a bitnami-common helpers).

Example

networkPolicy:
  enabled: true
  from:
    - namespaceSelector:
        matchLabels:
          kubernetes.io/metadata.name: "{{ .Release.Namespace }}"

Without this PR the matchLabels would not be templated and still result in:
kubernetes.io/metadata.name: "{{ .Release.Namespace }}"

With these changes the result would be e.g.:
kubernetes.io/metadata.name: "default"

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:


Marco Lecheler [email protected] Mercedes-Benz Tech Innovation GmbH (ProviderInformation)

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@fty4 fty4 requested a review from borisrizov-zf January 30, 2024 09:32
@borisrizov-zf borisrizov-zf merged commit f6642d3 into eclipse-tractusx:develop Jan 30, 2024
11 checks passed
Copy link

🎉 This PR is included in version 0.4.0-develop.17 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@fty4 fty4 deleted the feat/netpol-common-tmpl-render branch January 30, 2024 10:23
Copy link

github-actions bot commented Feb 9, 2024

🎉 This PR is included in version 0.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants