fix(annotations): remove openshift-nmstate PSA audit/warn patches#90
Merged
Conversation
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>
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.
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.