Skip to content

Add networkPolicy.flavor with cilium support to petset and sidekick#474

Open
tamalsaha wants to merge 1 commit into
masterfrom
cilium-network-policy
Open

Add networkPolicy.flavor with cilium support to petset and sidekick#474
tamalsaha wants to merge 1 commit into
masterfrom
cilium-network-policy

Conversation

@tamalsaha
Copy link
Copy Markdown
Contributor

Summary

Adds a new networkPolicy.flavor helm value (default kubernetes) to the petset and sidekick charts, 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=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.

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
  • Same matrix for ./charts/sidekick
  • When pulled in as a subchart of kubedb umbrella with global.networkPolicy.flavor=cilium, the flavor propagates (global → local fallback in the helper).

Companion PRs

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant