rancher-partner-charts/charts/nutanix/nutanix-csi-snapshot/6.3.2/templates/snapshot-controller-deploym...

65 lines
1.9 KiB
YAML

# This YAML file shows how to deploy the snapshot controller
# The snapshot controller implements the control loop for CSI snapshot functionality.
kind: Deployment
apiVersion: apps/v1
metadata:
name: csi-snapshot-controller
namespace: {{ .Release.Namespace }}
spec:
replicas: {{ .Values.controller.replicas }}
selector:
matchLabels:
app: csi-snapshot-controller
minReadySeconds: 15
strategy:
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: csi-snapshot-controller
spec:
serviceAccount: csi-snapshot-controller
containers:
- name: snapshot-controller
image: {{ .Values.controller.image }}:{{ include "nutanix-csi-snapshot.release" . }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "--v=2"
- "--leader-election=true"
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
resources:
requests:
cpu: 10m
memory: 20Mi
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
{{- with (.Values.controller.nodeSelector | default .Values.nodeSelector ) }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with (.Values.controller.tolerations | default .Values.tolerations)}}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: csi-snapshot-controller
topologyKey: kubernetes.io/hostname