eclipse-tractusx / managed-identity-wallet

Apache License 2.0
9 stars 22 forks source link

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

Closed fty4 closed 8 months ago

fty4 commented 8 months ago

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 marco.lecheler@mercedes-benz.com Mercedes-Benz Tech Innovation GmbH (ProviderInformation)

sonarcloud[bot] commented 8 months ago

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

github-actions[bot] commented 8 months ago

:tada: This PR is included in version 0.4.0-develop.17 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] commented 7 months ago

:tada: This PR is included in version 0.4.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: