mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
CSI: run all containers as privileged in daemonset pods
On systems with SELinux enabled, non-privileged containers can't access data of privileged containers. Since the socket is exposed by privileged containers, all sidecars must be privileged too. This is needed only for containers running in daemonset as we are using bidirectional mounts in daemonset Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
fbda8cc4ca
commit
e0cc7740f6
@ -33,6 +33,11 @@ spec:
|
|||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
containers:
|
containers:
|
||||||
- name: driver-registrar
|
- name: driver-registrar
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}"
|
image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}"
|
||||||
imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }}
|
||||||
args:
|
args:
|
||||||
@ -129,6 +134,8 @@ spec:
|
|||||||
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
||||||
{{- if .Values.nodeplugin.httpMetrics.enabled }}
|
{{- if .Values.nodeplugin.httpMetrics.enabled }}
|
||||||
- name: liveness-prometheus
|
- name: liveness-prometheus
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
|
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
|
||||||
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
|
||||||
args:
|
args:
|
||||||
|
@ -34,6 +34,11 @@ spec:
|
|||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
containers:
|
containers:
|
||||||
- name: driver-registrar
|
- name: driver-registrar
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}"
|
image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}"
|
||||||
imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.nodeplugin.registrar.image.pullPolicy }}
|
||||||
args:
|
args:
|
||||||
@ -126,6 +131,8 @@ spec:
|
|||||||
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }}
|
||||||
{{- if .Values.nodeplugin.httpMetrics.enabled }}
|
{{- if .Values.nodeplugin.httpMetrics.enabled }}
|
||||||
- name: liveness-prometheus
|
- name: liveness-prometheus
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
|
image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}"
|
||||||
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.nodeplugin.plugin.image.pullPolicy }}
|
||||||
args:
|
args:
|
||||||
|
@ -19,6 +19,11 @@ spec:
|
|||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
containers:
|
containers:
|
||||||
- name: driver-registrar
|
- name: driver-registrar
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
@ -102,6 +107,8 @@ spec:
|
|||||||
- name: keys-tmp-dir
|
- name: keys-tmp-dir
|
||||||
mountPath: /tmp/csi/keys
|
mountPath: /tmp/csi/keys
|
||||||
- name: liveness-prometheus
|
- name: liveness-prometheus
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: quay.io/cephcsi/cephcsi:canary
|
image: quay.io/cephcsi/cephcsi:canary
|
||||||
args:
|
args:
|
||||||
- "--type=liveness"
|
- "--type=liveness"
|
||||||
|
@ -19,6 +19,11 @@ spec:
|
|||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
containers:
|
containers:
|
||||||
- name: driver-registrar
|
- name: driver-registrar
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
@ -101,6 +106,8 @@ spec:
|
|||||||
- name: keys-tmp-dir
|
- name: keys-tmp-dir
|
||||||
mountPath: /tmp/csi/keys
|
mountPath: /tmp/csi/keys
|
||||||
- name: liveness-prometheus
|
- name: liveness-prometheus
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: quay.io/cephcsi/cephcsi:canary
|
image: quay.io/cephcsi/cephcsi:canary
|
||||||
args:
|
args:
|
||||||
- "--type=liveness"
|
- "--type=liveness"
|
||||||
|
@ -20,6 +20,11 @@ spec:
|
|||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
containers:
|
containers:
|
||||||
- name: driver-registrar
|
- name: driver-registrar
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
@ -94,6 +99,8 @@ spec:
|
|||||||
- name: keys-tmp-dir
|
- name: keys-tmp-dir
|
||||||
mountPath: /tmp/csi/keys
|
mountPath: /tmp/csi/keys
|
||||||
- name: liveness-prometheus
|
- name: liveness-prometheus
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: quay.io/cephcsi/cephcsi:canary
|
image: quay.io/cephcsi/cephcsi:canary
|
||||||
args:
|
args:
|
||||||
- "--type=liveness"
|
- "--type=liveness"
|
||||||
|
@ -20,6 +20,11 @@ spec:
|
|||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
containers:
|
containers:
|
||||||
- name: driver-registrar
|
- name: driver-registrar
|
||||||
|
# This is necessary only for systems with SELinux, where
|
||||||
|
# non-privileged sidecar containers cannot access unix domain socket
|
||||||
|
# created by privileged CSI driver container.
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
|
||||||
args:
|
args:
|
||||||
- "--v=5"
|
- "--v=5"
|
||||||
@ -98,6 +103,8 @@ spec:
|
|||||||
- name: keys-tmp-dir
|
- name: keys-tmp-dir
|
||||||
mountPath: /tmp/csi/keys
|
mountPath: /tmp/csi/keys
|
||||||
- name: liveness-prometheus
|
- name: liveness-prometheus
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
image: quay.io/cephcsi/cephcsi:canary
|
image: quay.io/cephcsi/cephcsi:canary
|
||||||
args:
|
args:
|
||||||
- "--type=liveness"
|
- "--type=liveness"
|
||||||
|
Loading…
Reference in New Issue
Block a user