Controlling pod security admission synchronization
To customize which namespaces have their pod security admission labels automatically updated, you can enable or disable synchronization for most namespaces.
|
|
You cannot enable pod security admission synchronization on some system-created namespaces. For more information, see Pod security admission synchronization namespace exclusions. |
-
For each namespace that you want to configure, set a value for the
security.openshift.io/scc.podSecurityLabelSynclabel:-
To disable pod security admission label synchronization in a namespace, set the value of the
security.openshift.io/scc.podSecurityLabelSynclabel tofalse.Run the following command:
$ oc label namespace <namespace> security.openshift.io/scc.podSecurityLabelSync=false -
To enable pod security admission label synchronization in a namespace, set the value of the
security.openshift.io/scc.podSecurityLabelSynclabel totrue.Run the following command:
$ oc label namespace <namespace> security.openshift.io/scc.podSecurityLabelSync=true
Use the
--overwriteflag to overwrite the value if this label is already set on the namespace. -