github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/rancher-backup/templates/deployment.yaml (about) 1 {{- if and .Values.s3.enabled .Values.persistence.enabled }} 2 {{- fail "\n\nCannot configure both s3 and PV for storing backups" }} 3 {{- end }} 4 apiVersion: apps/v1 5 kind: Deployment 6 metadata: 7 name: {{ include "backupRestore.fullname" . }} 8 namespace: {{ .Release.Namespace }} 9 labels: 10 {{- include "backupRestore.labels" . | nindent 4 }} 11 spec: 12 selector: 13 matchLabels: 14 {{- include "backupRestore.selectorLabels" . | nindent 6 }} 15 template: 16 metadata: 17 labels: 18 {{- include "backupRestore.selectorLabels" . | nindent 8 }} 19 annotations: 20 checksum/s3: {{ include (print $.Template.BasePath "/s3-secret.yaml") . | sha256sum }} 21 checksum/pvc: {{ include (print $.Template.BasePath "/pvc.yaml") . | sha256sum }} 22 spec: 23 serviceAccountName: {{ include "backupRestore.serviceAccountName" . }} 24 {{- if .Values.image.imagePullSecrets }} 25 imagePullSecrets: 26 {{- range .Values.image.imagePullSecrets }} 27 - name: {{ . }} 28 {{- end }} 29 {{- end }} 30 {{- if .Values.priorityClassName }} 31 priorityClassName: {{ .Values.priorityClassName }} 32 {{- end }} 33 containers: 34 - name: {{ .Chart.Name }} 35 image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} 36 imagePullPolicy: {{ default "Always" .Values.imagePullPolicy }} 37 args: 38 {{- if .Values.debug }} 39 - "--debug" 40 {{- end }} 41 {{- if .Values.trace }} 42 - "--trace" 43 {{- end }} 44 env: 45 - name: CHART_NAMESPACE 46 value: {{ .Release.Namespace }} 47 {{- if .Values.s3.enabled }} 48 - name: DEFAULT_S3_BACKUP_STORAGE_LOCATION 49 value: {{ include "backupRestore.s3SecretName" . }} 50 {{- end }} 51 {{- if .Values.proxy }} 52 - name: HTTP_PROXY 53 value: {{ .Values.proxy }} 54 - name: HTTPS_PROXY 55 value: {{ .Values.proxy }} 56 - name: NO_PROXY 57 value: {{ .Values.noProxy }} 58 {{- end }} 59 {{- if .Values.persistence.enabled }} 60 - name: DEFAULT_PERSISTENCE_ENABLED 61 value: "persistence-enabled" 62 volumeMounts: 63 - mountPath: "/var/lib/backups" 64 name: pv-storage 65 volumes: 66 - name: pv-storage 67 persistentVolumeClaim: 68 claimName: {{ include "backupRestore.pvcName" . }} 69 {{- end }} 70 nodeSelector: {{ include "linux-node-selector" . | nindent 8 }} 71 {{- if .Values.nodeSelector }} 72 {{ toYaml .Values.nodeSelector | indent 8 }} 73 {{- end }} 74 {{- with .Values.affinity }} 75 affinity: 76 {{- toYaml . | nindent 8 }} 77 {{- end }} 78 tolerations: {{ include "linux-node-tolerations" . | nindent 8 }} 79 {{- if .Values.tolerations }} 80 {{ toYaml .Values.tolerations | indent 8 }} 81 {{- end }}