Skip to content

added support for network policies its a breaking change - #185

Open
Bloodraven21 wants to merge 2 commits into
valkey-io:mainfrom
Bloodraven21:feat/network-policies
Open

added support for network policies its a breaking change#185
Bloodraven21 wants to merge 2 commits into
valkey-io:mainfrom
Bloodraven21:feat/network-policies

Conversation

@Bloodraven21

@Bloodraven21 Bloodraven21 commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds opinionated NetworkPolicy support to the valkey chart, adapted from the Bitnami Redis chart pattern referenced in the issue. Previously networkPolicy was a bare free-form passthrough (networkPolicy: {}) requiring users to hand-write complete K8s
ingress/egress rules. This replaces it with a structured, documented config that handles the common cases out of the box while still allowing arbitrary extra rules.

What it does

When networkPolicy.enabled: true, the chart renders a NetworkPolicy that:

  • Always permits intra-cluster pod-to-pod traffic on the Valkey port (required for primary/replica replication)
  • Opens the metrics exporter port automatically when metrics.enabled: true
  • With allowExternal: false, restricts client ingress to pods carrying the -client: "true" label, other Valkey pods, and any namespaces/pods matched by ingressNSMatchLabels / ingressNSPodMatchLabels
  • With allowExternalEgress: false, limits egress to DNS and intra-cluster communication
  • Appends extraIngress / extraEgress rules verbatim for custom needs

Disabled by default — no behavior change unless opted in.

Signed-off-by: Ishan Jain <ishanij10115@gmail.com>
@Bloodraven21

Copy link
Copy Markdown
Collaborator Author

issue
#156

Signed-off-by: Ishan Jain <ishanij10115@gmail.com>
@Bloodraven21 Bloodraven21 added the chart:valkey Related to the valkey chart label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart:valkey Related to the valkey chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant