mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
add if condition for attacher
adding the condition will help us to easily remove the attacher later. or even we can add else condition if we have an alternate to attacher. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
54d52bb411
commit
c6b4e47723
@ -34,7 +34,9 @@ rules:
|
|||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["nodes"]
|
resources: ["nodes"]
|
||||||
verbs: ["get", "list", "watch"]
|
verbs: ["get", "list", "watch"]
|
||||||
|
{{ if .Values.attacher.enabled }}
|
||||||
- apiGroups: ["storage.k8s.io"]
|
- apiGroups: ["storage.k8s.io"]
|
||||||
resources: ["volumeattachments"]
|
resources: ["volumeattachments"]
|
||||||
verbs: ["get", "list", "watch", "update"]
|
verbs: ["get", "list", "watch", "update"]
|
||||||
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -41,6 +41,7 @@ spec:
|
|||||||
mountPath: {{ .Values.socketDir }}
|
mountPath: {{ .Values.socketDir }}
|
||||||
resources:
|
resources:
|
||||||
{{ toYaml .Values.provisioner.resources | indent 12 }}
|
{{ toYaml .Values.provisioner.resources | indent 12 }}
|
||||||
|
{{ if .Values.attacher.enabled }}
|
||||||
- name: csi-attacher
|
- name: csi-attacher
|
||||||
image: "{{ .Values.attacher.image.repository }}:{{ .Values.attacher.image.tag }}"
|
image: "{{ .Values.attacher.image.repository }}:{{ .Values.attacher.image.tag }}"
|
||||||
args:
|
args:
|
||||||
@ -53,6 +54,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: socket-dir
|
- name: socket-dir
|
||||||
mountPath: {{ .Values.socketDir }}
|
mountPath: {{ .Values.socketDir }}
|
||||||
|
{{ end }}
|
||||||
- name: csi-cephfsplugin
|
- name: csi-cephfsplugin
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
|
@ -20,7 +20,7 @@ volumeDevicesDir: /var/lib/kubelet/plugins/kubernetes.io/csi/volumeDevices
|
|||||||
driverName: cephfs.csi.ceph.com
|
driverName: cephfs.csi.ceph.com
|
||||||
attacher:
|
attacher:
|
||||||
name: attacher
|
name: attacher
|
||||||
|
enabled: true
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
image:
|
image:
|
||||||
|
@ -34,9 +34,11 @@ rules:
|
|||||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||||
resources: ["volumesnapshots"]
|
resources: ["volumesnapshots"]
|
||||||
verbs: ["get", "list", "watch", "update"]
|
verbs: ["get", "list", "watch", "update"]
|
||||||
|
{{ if .Values.attacher.enabled }}
|
||||||
- apiGroups: ["storage.k8s.io"]
|
- apiGroups: ["storage.k8s.io"]
|
||||||
resources: ["volumeattachments"]
|
resources: ["volumeattachments"]
|
||||||
verbs: ["get", "list", "watch", "update"]
|
verbs: ["get", "list", "watch", "update"]
|
||||||
|
{{ end }}
|
||||||
- apiGroups: ["snapshot.storage.k8s.io"]
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
||||||
resources: ["volumesnapshotcontents"]
|
resources: ["volumesnapshotcontents"]
|
||||||
verbs: ["create", "get", "list", "watch", "update", "delete"]
|
verbs: ["create", "get", "list", "watch", "update", "delete"]
|
||||||
|
@ -58,6 +58,7 @@ spec:
|
|||||||
mountPath: {{ .Values.socketDir }}
|
mountPath: {{ .Values.socketDir }}
|
||||||
resources:
|
resources:
|
||||||
{{ toYaml .Values.snapshotter.resources | indent 12 }}
|
{{ toYaml .Values.snapshotter.resources | indent 12 }}
|
||||||
|
{{ if .Values.attacher.enabled }}
|
||||||
- name: csi-attacher
|
- name: csi-attacher
|
||||||
image: "{{ .Values.attacher.image.repository }}:{{ .Values.attacher.image.tag }}"
|
image: "{{ .Values.attacher.image.repository }}:{{ .Values.attacher.image.tag }}"
|
||||||
args:
|
args:
|
||||||
@ -70,6 +71,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: socket-dir
|
- name: socket-dir
|
||||||
mountPath: {{ .Values.socketDir }}
|
mountPath: {{ .Values.socketDir }}
|
||||||
|
{{ end }}
|
||||||
- name: csi-rbdplugin
|
- name: csi-rbdplugin
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
|
@ -21,7 +21,7 @@ driverName: rbd.csi.ceph.com
|
|||||||
|
|
||||||
attacher:
|
attacher:
|
||||||
name: attacher
|
name: attacher
|
||||||
|
enabled: true
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
image:
|
image:
|
||||||
|
Loading…
Reference in New Issue
Block a user