Make csi driver configurable to be able to run multiple instances (#115)

Co-authored-by: Marco Franssen <[email protected]>
This commit is contained in:
kfox1111
2023-03-13 14:12:37 +01:00
committed by GitHub
co-authored by Marco Franssen
parent b198bc7e39
commit f3a81ad78d
4 changed files with 14 additions and 5 deletions
@@ -35,6 +35,7 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [
"-workload-api-socket-dir", "/spire-agent-socket",
"-plugin-name", "{{ .Values.pluginName }}",
"-csi-socket-path", "/spiffe-csi/csi.sock",
]
env:
@@ -74,8 +75,8 @@ spec:
imagePullPolicy: {{ .Values.nodeDriverRegistrar.image.pullPolicy }}
args: [
"-csi-address", "/spiffe-csi/csi.sock",
"-kubelet-registration-path", "/var/lib/kubelet/plugins/csi.spiffe.io/csi.sock",
"-health-port", "9809"
"-kubelet-registration-path", "/var/lib/kubelet/plugins/{{ .Values.pluginName }}/csi.sock",
"-health-port", "{{ .Values.healthChecks.port }}"
]
volumeMounts:
# The registrar needs access to the SPIFFE CSI driver socket
@@ -86,7 +87,7 @@ spec:
- name: kubelet-plugin-registration-dir
mountPath: /registration
ports:
- containerPort: 9809
- containerPort: {{ .Values.healthChecks.port }}
name: healthz
livenessProbe:
httpGet:
@@ -104,7 +105,7 @@ spec:
# This volume is where the socket for kubelet->driver communication lives
- name: spiffe-csi-socket-dir
hostPath:
path: /var/lib/kubelet/plugins/csi.spiffe.io
path: /var/lib/kubelet/plugins/{{ .Values.pluginName }}
type: DirectoryOrCreate
# This volume is where the SPIFFE CSI driver mounts volumes
- name: mountpoint-dir
@@ -1,7 +1,7 @@
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: "csi.spiffe.io"
name: {{ .Values.pluginName | quote }}
spec:
# Only ephemeral, inline volumes are supported. There is no need for a
# controller to provision and attach volumes.