ubicloud/kubernetes/csi/deploy/charts/ubicsi/templates/provisioner-deployment.yaml
mohi-kalantari 538a34a9fa Create a helm chart for Ubicsi
This chart will be used to install Ubicsi on newly created clusters

Since a new helm chart is introduced for deploying ubicsi,
manifests in csi dir will be a duplicate to the main chart and are
removed.
2025-09-12 11:45:51 +02:00

86 lines
2.8 KiB
YAML

---
kind: Deployment
apiVersion: apps/v1
metadata:
name: ubicsi-provisioner
namespace: {{ .Values.namespace }}
spec:
replicas: {{ .Values.provisioner.replicas }}
selector:
matchLabels:
app: ubicsi
component: provisioner
template:
metadata:
labels:
app: ubicsi
component: provisioner
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- ubicsi
- key: component
operator: In
values:
- provisioner
topologyKey: "kubernetes.io/hostname"
serviceAccountName: ubicsi-provisioner
priorityClassName: system-cluster-critical
containers:
- name: ubicsi
image: {{ .Values.provisioner.image.repository }}:{{ .Values.provisioner.image.tag }}
imagePullPolicy: {{ .Values.provisioner.image.pullPolicy }}
resources:
{{- toYaml .Values.provisioner.resources | nindent 12 }}
env:
- name: NODE_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: CSI_ENDPOINT
value: "unix:///csi/csi.sock"
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: ssh-creds
mountPath: /ssh
- name: csi-provisioner
image: {{ .Values.csiProvisioner.image.repository }}:{{ .Values.csiProvisioner.image.tag }}
imagePullPolicy: {{ .Values.csiProvisioner.image.pullPolicy }}
resources:
{{- toYaml .Values.csiProvisioner.resources | nindent 12 }}
args:
- "--csi-address=unix:///csi/csi.sock"
- "--v=1"
- "--leader-election=true"
- "--default-fstype=ext4"
- "--extra-create-metadata=true"
volumeMounts:
- name: socket-dir
mountPath: /csi
- name: csi-attacher
image: {{ .Values.csiAttacher.image.repository }}:{{ .Values.csiAttacher.image.tag }}
imagePullPolicy: {{ .Values.csiAttacher.image.pullPolicy }}
resources:
{{- toYaml .Values.csiAttacher.resources | nindent 12 }}
args:
- "--csi-address=unix:///csi/csi.sock"
- "--v=1"
volumeMounts:
- name: socket-dir
mountPath: /csi
volumes:
- name: socket-dir
emptyDir: {
medium: "Memory"
}
- name: ssh-creds
hostPath:
path: /home/ubi/.ssh
type: Directory