Skip to content

fix(annotations): remove openshift-nmstate PSA audit/warn patches#90

Merged
pinikomarov merged 1 commit into
mainfrom
fix/remove-nmstate-psa-drift
Jul 22, 2026
Merged

fix(annotations): remove openshift-nmstate PSA audit/warn patches#90
pinikomarov merged 1 commit into
mainfrom
fix/remove-nmstate-psa-drift

Conversation

@cjeanner

Copy link
Copy Markdown
Collaborator

Remove the pod-security.kubernetes.io/audit and /warn strategic merge patches for Namespace/openshift-nmstate from the annotations component.

These patches set audit: restricted and warn: restricted on the openshift-nmstate namespace at sync-wave -30. However, OLM overrides both labels to "privileged" when it installs the NMState operator at sync-wave -10, because the nmstate-handler DaemonSet runs privileged workloads on all nodes. This override happens despite security.openshift.io/scc.podSecurityLabelSync being set to "false" on the namespace.

The result is a permanent OutOfSync in the operator-dependencies ArgoCD application: ArgoCD applies restricted, OLM overwrites to privileged, ArgoCD detects drift, re-applies restricted, and the cycle repeats on every reconciliation.

The upstream architecture source (openstack-k8s-operators/architecture lib/olm-deps/nmstate_namespace.yaml) intentionally sets only enforce: privileged and does not specify audit or warn labels, correctly deferring those to the platform. The annotations component was adding values that conflict with the operator's actual security profile.

Removing this patch lets OLM set the PSA labels to match the workload's actual security requirements, eliminating the drift.

The other PSA patches (openstack, openstack-operators, metallb-system, cert-manager-operator) are not affected — they are retained because those namespaces do not exhibit the same OLM-driven override behavior.

Remove the pod-security.kubernetes.io/audit and /warn strategic merge
patches for Namespace/openshift-nmstate from the annotations component.

These patches set audit: restricted and warn: restricted on the
openshift-nmstate namespace at sync-wave -30. However, OLM overrides
both labels to "privileged" when it installs the NMState operator at
sync-wave -10, because the nmstate-handler DaemonSet runs privileged
workloads on all nodes. This override happens despite
security.openshift.io/scc.podSecurityLabelSync being set to "false"
on the namespace.

The result is a permanent OutOfSync in the operator-dependencies
ArgoCD application: ArgoCD applies restricted, OLM overwrites to
privileged, ArgoCD detects drift, re-applies restricted, and the
cycle repeats on every reconciliation.

The upstream architecture source (openstack-k8s-operators/architecture
lib/olm-deps/nmstate_namespace.yaml) intentionally sets only
enforce: privileged and does not specify audit or warn labels,
correctly deferring those to the platform. The annotations component
was adding values that conflict with the operator's actual security
profile.

Removing this patch lets OLM set the PSA labels to match the
workload's actual security requirements, eliminating the drift.

The other PSA patches (openstack, openstack-operators, metallb-system,
cert-manager-operator) are not affected — they are retained because
those namespaces do not exhibit the same OLM-driven override behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cjeanner
cjeanner requested a review from pinikomarov July 22, 2026 06:13
@cjeanner cjeanner self-assigned this Jul 22, 2026

@pinikomarov pinikomarov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pinikomarov
pinikomarov merged commit ecd2e65 into main Jul 22, 2026
2 checks passed
@pinikomarov
pinikomarov deleted the fix/remove-nmstate-psa-drift branch July 22, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants