Files
kks-provider-plugin/charts/kloud-csi/templates/controller-deployment.yaml
T
joshandCursor feec8c1e60 Fix chart image pulls for kloud-csi installs.
Use a valid livenessprobe tag, default the driver image to appVersion, add imagePullSecrets support, and publish GHCR packages as public after CI builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 06:35:51 +03:30

107 lines
3.6 KiB
YAML

{{- include "kloud-csi.validateRequired" . }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "kloud-csi.controllerName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "kloud-csi.labels" . | nindent 4 }}
app.kubernetes.io/component: controller
spec:
replicas: {{ .Values.controller.replicas }}
selector:
matchLabels:
{{- include "kloud-csi.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: controller
template:
metadata:
labels:
{{- include "kloud-csi.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: controller
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "kloud-csi.controllerServiceAccountName" . }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: kloud-csi-plugin
image: {{ include "kloud-csi.driverImage" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- --config-file
- /etc/kloud-csi/driver.hcl
env:
- name: KKS_CSI_SERVER_URL
value: {{ .Values.serverURL | quote }}
- name: KKS_CSI_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: {{ default (printf "%s-config" (include "kloud-csi.fullname" .)) .Values.existingSecret }}
key: {{ .Values.existingSecretAccessTokenKey }}
- name: KKS_CSI_DRIVER_MODE
value: controller
- name: KKS_CSI_DRIVER_ENDPOINT
value: unix:///csi/csi.sock
- name: KKS_CSI_DRIVER_NAME
value: {{ .Values.driver.name | quote }}
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: config
mountPath: /etc/kloud-csi
{{- with .Values.controller.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
- name: csi-provisioner
image: {{ .Values.sidecars.provisioner.repository }}:{{ .Values.sidecars.provisioner.tag }}
args:
- --csi-address=/csi/csi.sock
- --v=2
- --feature-gates=Topology=false
- --timeout=60s
- --leader-election
- --default-fstype=ext4
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: csi-attacher
image: {{ .Values.sidecars.attacher.repository }}:{{ .Values.sidecars.attacher.tag }}
args:
- --csi-address=/csi/csi.sock
- --v=2
- --leader-election
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: liveness-probe
image: {{ .Values.sidecars.livenessProbe.repository }}:{{ .Values.sidecars.livenessProbe.tag }}
args:
- --csi-address=/csi/csi.sock
- --health-port=9808
volumeMounts:
- name: socket-dir
mountPath: /csi
volumes:
- name: socket-dir
emptyDir: {}
- name: config
configMap:
name: {{ include "kloud-csi.fullname" . }}-driver