-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathmigrator.job.yaml
More file actions
40 lines (39 loc) 路 1.79 KB
/
Copy pathmigrator.job.yaml
File metadata and controls
40 lines (39 loc) 路 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
apiVersion: batch/v1
kind: Job
metadata:
namespace: {{ .Release.Namespace }}
name: {{ .Release.Name }}-api-migrate-{{ if $.Values.gitops.enabled }}{{ .Values.planeVersion | replace "." "-" | replace "+" "-" | lower }}{{ else }}{{ .Release.Revision }}{{ end }}
{{- include "plane.labelsAndAnnotations" (dict "context" $ "values" .Values.api) }}
spec:
backoffLimit: 3
template:
metadata:
labels:
app.name: {{ .Release.Namespace }}-{{ .Release.Name }}-api-migrate
{{- include "plane.commonLabels" $ | nindent 8 }}
annotations:
{{- if not $.Values.gitops.enabled }}
timestamp: {{ now | quote }}
{{- end }}
spec:
containers:
- name: {{ .Release.Name }}-api-migrate
image: {{ .Values.api.image | default "artifacts.plane.so/makeplane/plane-backend" }}:{{ .Values.planeVersion }}
command:
- ./bin/docker-entrypoint-migrator.sh
imagePullPolicy: {{ .Values.api.pullPolicy | default "Always" }}
envFrom:
- configMapRef:
name: {{ .Release.Name }}-app-vars
optional: false
- secretRef:
name: {{ if not (empty .Values.external_secrets.app_env_existingSecret) }}{{ .Values.external_secrets.app_env_existingSecret }}{{ else }}{{ .Release.Name }}-app-secrets{{ end }}
optional: false
- secretRef:
name: {{ if not (empty .Values.external_secrets.doc_store_existingSecret) }}{{ .Values.external_secrets.doc_store_existingSecret }}{{ else }}{{ .Release.Name }}-doc-store-secrets{{ end }}
optional: false
restartPolicy: OnFailure
serviceAccount: {{ .Release.Name }}-srv-account
serviceAccountName: {{ .Release.Name }}-srv-account
{{- include "plane.podScheduling" .Values.api }}
---