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

Use tpl on network policies custom rules to allow for dynamic values #20

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

xr09
Copy link
Contributor

@xr09 xr09 commented Jul 10, 2024

For large scenarios, sometimes we need to reference a namespace or a label containing some dynamic value.

With this change, we'll be able to use any variable in the custom rules.

customRules:
  - to:
    - namespaceSelector:
      matchLabels:
        kubernetes.io/metadata.name: data-stream-{{ .Values.dynamic.value }}

@xr09 xr09 requested a review from a team as a code owner July 10, 2024 12:53
@Haarolean Haarolean requested a review from azatsafin July 27, 2024 10:03
Copy link
Member

@azatsafin azatsafin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires Chart patch version update. There is not automated workflow to update Chart version yet.
Please update patch version to the next version used in kafbat/helm-charts:main.

The templating function should be also applied to the many places, but it is not the scope of this PR.

@xr09
Copy link
Contributor Author

xr09 commented Oct 15, 2024

Done. Thanks @azatsafin!

@azatsafin azatsafin self-requested a review October 15, 2024 11:29
@azatsafin azatsafin removed their assignment Oct 15, 2024
Copy link
Member

@azatsafin azatsafin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution

@azatsafin azatsafin merged commit c1826ad into kafbat:main Oct 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants