feat(keda): add k8s networkPolicy#808
Merged
wozniakjan merged 1 commit intokedacore:mainfrom Feb 2, 2026
Merged
Conversation
Signed-off-by: Marco Lecheler <marco.lecheler@mercedes-benz.com>
JorTurFer
reviewed
Jan 31, 2026
There was a problem hiding this comment.
Pull request overview
This PR adds native Kubernetes NetworkPolicy support to the KEDA Helm chart, complementing the existing Cilium NetworkPolicy implementation. Users can now enable standard Kubernetes NetworkPolicies by setting .Values.networkPolicy.enabled=true and .Values.networkPolicy.flavor="kubernetes".
Changes:
- Added configuration structure in values.yaml for Kubernetes NetworkPolicy with extraEgressRules support for operator, metrics server, and webhooks components
- Created NetworkPolicy templates for all three KEDA components (operator, metrics-server, webhooks) with appropriate ingress/egress rules
- Updated README documentation to reflect the new kubernetes flavor option and configuration structure
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| keda/values.yaml | Added kubernetes NetworkPolicy configuration structure with extraEgressRules for all components; updated flavor comment to include "kubernetes"; removed trailing empty lines |
| keda/templates/webhooks/networkpolicy.yaml | New NetworkPolicy for webhooks with ingress rules for admission webhooks, metrics, and profiling; egress rules for DNS, K8s API, and cluster-wide validation |
| keda/templates/metrics-server/networkpolicy.yaml | New NetworkPolicy for metrics server with ingress rules for HTTPS API, metrics, and profiling; egress rules for DNS, K8s API, operator gRPC communication, and cluster-wide metric collection |
| keda/templates/manager/networkpolicy.yaml | New NetworkPolicy for operator with ingress rules for gRPC metrics service, Prometheus metrics, and profiling; egress rules for DNS, K8s API, and cluster-wide access for scalers |
| keda/README.md | Updated documentation to reflect the new kubernetes NetworkPolicy flavor option and configuration structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zroubalik
approved these changes
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the Keda helm chart only supports cilium networkpolicies.
This PR adds support for the natively kubernetes networkPolicy.
As already prepared in the values file we then can use different flavors to tell which networkpolicy should be used.
Kubernetes NetworkPolicies for KEDA components can be enabled via
.Values.networkPolicy.enabledand.Values.networkPolicy.flavor== "kubernetes".Configuration
Following network policies are configured:
Checklist
A PR is opened to update KEDA core (repo) (if applicable, ie. when deployment manifests are modified)