Ensure that the legacy application and openshift-storage
pods use the
same SELinux labels on the files, by changing the default SELinux label on the legacy application
project.
Procedure
- Display the current
openshift-storage
namespace with
sa.scc.mcs
:
oc get ns openshift-storage -o yaml | grep sa.scc.mcs
openshift.io/sa.scc.mcs: s0:c26,c0
- Edit the legacy application namespace, and modify the
sa.scc.mcs
. Use the value from the
sa.scc.mcs
of the
openshift-storage
namespace:
oc edit ns <appplication_namespace>
For example:
oc edit ns testnamespace
oc get ns <application_namespace> -o yaml | grep sa.scc.mcs
For example:
oc get ns testnamespace -o yaml | grep sa.scc.mcs
openshift.io/sa.scc.mcs: s0:c26,c0
- Restart the legacy application pod.
A relabel of all the files take place and
now the SELinux labels match with the openshift-storage
deployment.