Using OpenShift 4.1.0-rc.5:
- Create a MC that replaces
/etc/containers/policy.json. In the example below, this is the default contents of /etc/containers/policy.json run through jq -c and requoted:
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: 50-policy-json
spec:
config:
ignition:
version: 2.2.0
storage:
files:
- contents:
source: data:,%7B%22default%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%2C%22transports%22%3A%7B%22docker-daemon%22%3A%7B%22%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%7D%7D%7D
filesystem: root
mode: 0644
path: /etc/containers/policy.json
- Wait for nodes to be updated
- Remove the MC
- Wait for nodes to be updated
- Check the nodes and find that
/etc/containers/policy.json is missing
FWIW, /etc/containers/policy.json is owned by the containers-common package