Skip to content

Instantly share code, notes, and snippets.

@ams0
Created February 4, 2019 08:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ams0/0e85b5d391395d99447ed6431186433e to your computer and use it in GitHub Desktop.
Save ams0/0e85b5d391395d99447ed6431186433e to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: docker-root
spec:
selector:
matchLabels:
name: docker-root
template:
metadata:
labels:
name: docker-root
spec:
containers:
- name: docker-root
image: realguess/jq
command: ["/bin/sh", "-c"]
args:
- >
jq '."data-root" = "/mnt"' /modifyetc/docker/daemon.json > /modifyetc/docker/tmp.json && mv /modifyetc/docker/tmp.json /modifyetc/docker/daemon.json;
while true; do
sleep 100000;
done
securityContext:
privileged: true
resources:
limits:
cpu: "200m"
memory: "200Mi"
requests:
cpu: "20m"
memory: "100Mi"
volumeMounts:
- name: modifyetc
mountPath: /modifyetc
volumes:
- name: modifyetc
hostPath:
path: /etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment