Summary
OpenClawInstance.spec.security.networkPolicy.allowedIngressNamespaces is a valid CRD field and
setting it succeeds, but the controller never actually adds those namespaces to the generated
NetworkPolicy's ingress rules. The field is silently a no-op.
Environment
- Chart:
oci://ghcr.io/paperclipinc/charts/openclaw-operator, version 0.38.3
- Kubernetes: v1.35.5+k3s1 (k3s/k3d)
Steps to reproduce
- Apply an
OpenClawInstance with:
spec:
security:
networkPolicy:
enabled: true
allowedIngressNamespaces:
- some-other-namespace
- Confirm the field landed:
kubectl get openclawinstance <name> -o jsonpath='{.spec.security.networkPolicy}' — shows allowedIngressNamespaces: ["some-other-namespace"] correctly.
- Inspect the generated NetworkPolicy:
kubectl get networkpolicy <name> -o yaml
Actual behavior
The ingress[].from list only ever contains the same-namespace namespaceSelector — the
namespace(s) listed in allowedIngressNamespaces never appear, regardless of how long you wait
or how many times you force a reconcile (verified via annotation-triggered reconcile + watching
resourceVersion/generation on the NetworkPolicy object, which don't change, and via operator
logs, which don't mention NetworkPolicy at all during that reconcile cycle — this isn't a
propagation delay, the controller isn't attempting the update).
Expected behavior
Namespaces listed in allowedIngressNamespaces should produce additional namespaceSelector
entries in the generated NetworkPolicy's ingress from list.
Workaround used
Created a separate, additional NetworkPolicy targeting the same pod labels
(app.kubernetes.io/instance/app.kubernetes.io/name) with the extra namespace's ingress rule,
since Kubernetes unions multiple NetworkPolicies' rules for the same pod. Left the
operator-managed NetworkPolicy alone since editing it directly would just get reverted on the
next reconcile.
Summary
OpenClawInstance.spec.security.networkPolicy.allowedIngressNamespacesis a valid CRD field andsetting it succeeds, but the controller never actually adds those namespaces to the generated
NetworkPolicy's ingress rules. The field is silently a no-op.Environment
oci://ghcr.io/paperclipinc/charts/openclaw-operator, version0.38.3Steps to reproduce
OpenClawInstancewith:kubectl get openclawinstance <name> -o jsonpath='{.spec.security.networkPolicy}'— showsallowedIngressNamespaces: ["some-other-namespace"]correctly.kubectl get networkpolicy <name> -o yamlActual behavior
The
ingress[].fromlist only ever contains the same-namespacenamespaceSelector— thenamespace(s) listed in
allowedIngressNamespacesnever appear, regardless of how long you waitor how many times you force a reconcile (verified via annotation-triggered reconcile + watching
resourceVersion/generationon the NetworkPolicy object, which don't change, and via operatorlogs, which don't mention
NetworkPolicyat all during that reconcile cycle — this isn't apropagation delay, the controller isn't attempting the update).
Expected behavior
Namespaces listed in
allowedIngressNamespacesshould produce additionalnamespaceSelectorentries in the generated NetworkPolicy's ingress
fromlist.Workaround used
Created a separate, additional
NetworkPolicytargeting the same pod labels(
app.kubernetes.io/instance/app.kubernetes.io/name) with the extra namespace's ingress rule,since Kubernetes unions multiple NetworkPolicies' rules for the same pod. Left the
operator-managed NetworkPolicy alone since editing it directly would just get reverted on the
next reconcile.