revert(operator): remove operator-managed NetworkPolicy - #560
Conversation
|
Should we add some tests to avoid re-introducing that ? |
yes, we can do it for sure |
| {{- toYaml .Values.rbacProxy.resources | nindent 12 }} | ||
| {{- end }} | ||
| - name: manager | ||
| command: |
There was a problem hiding this comment.
version of chart should be updated as well?
There was a problem hiding this comment.
right now we release both with same version at the same time.
|
@miledxz is it worth splitting into changes to the app and changes to the helm chart? |
I think we can do that |
yes, it is worth it to split. |
|
Production data point supporting this revert — v1.6.1, entire ArgoCD installation down Adding a concrete incident in case it helps prioritise merging, since this has been approved for a while. On 2026-08-05 we upgraded dragonfly-operator to v1.6.1 on a production cluster and it took our whole ArgoCD installation down. The part that makes this sharper than #546: in v1.6.1 the CRD ships Generated policy on our cluster: spec:
podSelector:
matchLabels:
app: dragonfly-ops
app.kubernetes.io/name: dragonfly
app.kubernetes.io/part-of: dragonfly
policyTypes: [Ingress]
ingress:
- from:
- podSelector: {} # same namespace only
ports:
- {port: 6379, protocol: TCP}Impact. ArgoCD uses Dragonfly as its Redis cache from another namespace. All 29 Applications went Two things worth noting for anyone diagnosing this:
One request on the removal itself. Since this PR drops Separately, while this remains unmerged: the CRD field's description currently reads "The NetworkPolicy restricts admin port access to operator and peer pods only." That describes only the 9999 rule, not the 6379 one that actually causes the breakage. If this PR stalls further, correcting that description would be a cheap standalone improvement. |
|
@miledxz can you fix the conflict and merge it please? |
Removes the operator-managed
NetworkPolicyfeature that was introduced in #473 and hardened in #514.The generated policy restricted:
6379to the same namespace only9999to the operator and peer Dragonfly pods onlyThis was disruptive for the common setup where databases and workloads live in separate namespaces (#546) and blocked external Prometheus / VictoriaMetrics scrapers from reaching
/metrics(#495).This PR fully reverts the feature to the pre-#473 state. Users who need network restrictions can apply their own
NetworkPolicy, which the operator will no longer reconcile away.Breaking change
Deployments relying on the operator to create a
NetworkPolicy(via the default ornetworkPolicyEnabled: true) will no longer get one. ThenetworkPolicyEnabledfield is removed from the CRD; any manifests setting it must drop the field.Fixes #546
Fixes #495