Add networkPolicy.flavor with cilium support to petset and sidekick#474
Open
tamalsaha wants to merge 1 commit into
Open
Add networkPolicy.flavor with cilium support to petset and sidekick#474tamalsaha wants to merge 1 commit into
tamalsaha wants to merge 1 commit into
Conversation
Adds a new networkPolicy.flavor helm value (default "kubernetes") to
the petset and sidekick charts, mirroring the same toggle added to the
KubeDB installer. The helper layer (security.useKubernetesNetworkPolicy,
security.useCiliumNetworkPolicy, security.networkPolicyFlavor) reads
both the chart-local value and the global namespaced value so the
toggle propagates correctly when these charts are pulled in as
subcharts of the kubedb umbrella.
When flavor=cilium and networkPolicy.enabled=true:
- petset emits an ingress CiliumNetworkPolicy from remote-node/host
on 9443 (webhook conversion / validation) and an egress to
remote-node/host on 6443.
- sidekick emits an egress CiliumNetworkPolicy to remote-node/host
on 6443.
Driven by a Cilium-managed default-deny customer of KubeDB who needs
the subchart-emitted NetworkPolicies to match the rest of the
operator-namespace policy set.
Signed-off-by: Tamal Saha <tamal@appscode.com>
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.
Summary
Adds a new
networkPolicy.flavorhelm value (defaultkubernetes) to thepetsetandsidekickcharts, mirroring the same toggle being added to the KubeDB installer. The helper layer (security.useKubernetesNetworkPolicy,security.useCiliumNetworkPolicy,security.networkPolicyFlavor) reads both the chart-local value and the global namespaced value so the toggle propagates correctly when these charts are pulled in as subcharts of the kubedb umbrella.When
flavor=ciliumandnetworkPolicy.enabled=true:CiliumNetworkPolicyfromremote-node/hoston9443(webhook conversion / validation) and an egress toremote-node/hoston6443.CiliumNetworkPolicytoremote-node/hoston6443.Driven by a Cilium-managed default-deny customer of KubeDB who needs the subchart-emitted NetworkPolicies to match the rest of the operator-namespace policy set.
Test plan
helm template ps ./charts/petset— no policies (current default)helm template ps ./charts/petset --set networkPolicy.enabled=true— 2 NetworkPolicy (current behavior preserved)helm template ps ./charts/petset --set networkPolicy.enabled=true --set networkPolicy.flavor=cilium— 2 CiliumNetworkPolicy./charts/sidekickkubedbumbrella withglobal.networkPolicy.flavor=cilium, the flavor propagates (global → local fallback in the helper).Companion PRs
EnsureNetworkPolicyWithFlavorupstream helper.global.networkPolicy.flavorand equivalent cilium templates for the kubedb umbrella, webhook-server, opscenter, and certified charts.--network-policy-flavorto the Postgres operator.🤖 Generated with Claude Code