mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
* In Ark chart, add init container support Signed-off-by: Joe Gorse <joseph.gorseiii@emc.com> * Bring template in line with what is in ark(velero) 0.10.1 Signed-off-by: Joe Gorse <joseph.gorseiii@emc.com> * Bump minor version for new feature Signed-off-by: Reinhard Nägele <unguiculus@gmail.com> * Add publicUrl to backupstoragelocation template Signed-off-by: Joe Gorse <joseph.gorseiii@emc.com> * Fix typo in previous Signed-off-by: Joe Gorse <joseph.gorseiii@emc.com>
118 lines
3.6 KiB
YAML
118 lines
3.6 KiB
YAML
{{- if .Values.configuration.provider -}}
|
|
{{- $provider := .Values.configuration.provider -}}
|
|
apiVersion: apps/v1beta2
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "ark.fullname" . }}
|
|
labels:
|
|
release: {{ .Release.Name }}
|
|
app: {{ template "ark.name" . }}
|
|
chart: {{ template "ark.chart" . }}
|
|
heritage: {{ .Release.Service }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
release: {{ .Release.Name }}
|
|
app: {{ template "ark.name" . }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
release: {{ .Release.Name }}
|
|
app: {{ template "ark.name" . }}
|
|
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
|
|
annotations:
|
|
{{- if .Values.podAnnotations }}
|
|
{{ toYaml .Values.podAnnotations | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.metrics.enabled }}
|
|
{{ toYaml .Values.metrics.podAnnotations | indent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
spec:
|
|
restartPolicy: Always
|
|
serviceAccountName: {{ template "ark.serverServiceAccount" . }}
|
|
containers:
|
|
- name: ark
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
{{- if .Values.metrics.enabled }}
|
|
ports:
|
|
- name: monitoring
|
|
containerPort: 8085
|
|
{{- end }}
|
|
command:
|
|
- /ark
|
|
args:
|
|
- server
|
|
{{- with .Values.configuration }}
|
|
{{- with .backupSyncPeriod }}
|
|
- --backup-sync-period={{ . }}
|
|
{{- end }}
|
|
{{- with .resticTimeout }}
|
|
- --restic-timeout={{ . }}
|
|
{{- end }}
|
|
{{- if .restoreOnlyMode }}
|
|
- --restore-only
|
|
{{- end }}
|
|
{{- with .restoreResourcePriorities }}
|
|
- --restore-resource-priorities={{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if eq $provider "azure" }}
|
|
envFrom:
|
|
- secretRef:
|
|
name: {{ template "ark.secretName" . }}
|
|
{{- end }}
|
|
{{- with .Values.resources }}
|
|
resources:
|
|
{{ toYaml . | indent 12 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: plugins
|
|
mountPath: /plugins
|
|
{{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp")) }}
|
|
- name: cloud-credentials
|
|
mountPath: /credentials
|
|
- name: scratch
|
|
mountPath: /scratch
|
|
env:
|
|
{{- if eq $provider "aws" }}
|
|
- name: AWS_SHARED_CREDENTIALS_FILE
|
|
{{- else }}
|
|
- name: GOOGLE_APPLICATION_CREDENTIALS
|
|
{{- end }}
|
|
value: /credentials/cloud
|
|
- name: ARK_SCRATCH_DIR
|
|
value: /scratch
|
|
{{ if .Values.configuration.extraEnvVars }}
|
|
{{- range $key, $value := .Values.configuration.extraEnvVars }}
|
|
- name: {{ default "none" $key }}
|
|
value: {{ default "none" $value }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.initContainers }}
|
|
initContainers:
|
|
{{ toYaml .Values.initContainers | indent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- if and .Values.credentials.useSecret (or (eq $provider "aws") (eq $provider "gcp")) }}
|
|
- name: cloud-credentials
|
|
secret:
|
|
secretName: {{ template "ark.secretName" . }}
|
|
{{- end }}
|
|
- name: plugins
|
|
emptyDir: {}
|
|
- name: scratch
|
|
emptyDir: {}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml . | indent 8 }}
|
|
{{- end }}
|
|
{{- end -}}
|