Don't encourage people to mount downwardAPI volumes on /etc (#7484)
Because API data volumes like downwardAPI are expected to be fully managed by Kubernetes and are now mounted read-only, this causes problems with other files in /etc like /etc/resolv.conf that Docker tries to add to the volume. Our examples should show such volumes being mounted to a dedicated subdirectory for the volume.
This commit is contained in:
@@ -16,15 +16,15 @@ spec:
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
- while true; do
|
||||
if [[ -e /etc/labels ]]; then
|
||||
echo -en '\n\n'; cat /etc/labels; fi;
|
||||
if [[ -e /etc/annotations ]]; then
|
||||
echo -en '\n\n'; cat /etc/annotations; fi;
|
||||
if [[ -e /etc/podinfo/labels ]]; then
|
||||
echo -en '\n\n'; cat /etc/podinfo/labels; fi;
|
||||
if [[ -e /etc/podinfo/annotations ]]; then
|
||||
echo -en '\n\n'; cat /etc/podinfo/annotations; fi;
|
||||
sleep 5;
|
||||
done;
|
||||
volumeMounts:
|
||||
- name: podinfo
|
||||
mountPath: /etc
|
||||
mountPath: /etc/podinfo
|
||||
readOnly: false
|
||||
volumes:
|
||||
- name: podinfo
|
||||
|
||||
Reference in New Issue
Block a user