48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
|
---
|
||
|
apiVersion: batch/v1
|
||
|
kind: Job
|
||
|
metadata:
|
||
|
annotations:
|
||
|
helm.sh/hook: pre-install
|
||
|
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded
|
||
|
helm.sh/hook-weight: "4"
|
||
|
{{- if .Values.globalAnnotations }}
|
||
|
{{ toYaml .Values.globalAnnotations | indent 4}}
|
||
|
{{- end }}
|
||
|
creationTimestamp: null
|
||
|
name: speedscale-operator-pre-install
|
||
|
namespace: {{ .Release.Namespace }}
|
||
|
spec:
|
||
|
backoffLimit: 0
|
||
|
template:
|
||
|
metadata:
|
||
|
creationTimestamp: null
|
||
|
spec:
|
||
|
containers:
|
||
|
- args:
|
||
|
- |-
|
||
|
speedctl init --overwrite --no-rcfile-update \
|
||
|
--api-key $SPEEDSCALE_API_KEY \
|
||
|
--app-url $SPEEDSCALE_APP_URL
|
||
|
command:
|
||
|
- sh
|
||
|
- -c
|
||
|
envFrom:
|
||
|
- secretRef:
|
||
|
name: speedscale-apikey
|
||
|
optional: false
|
||
|
image: '{{ .Values.image.registry }}/speedscale-cli:{{ .Values.image.tag }}'
|
||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
name: speedscale-cli
|
||
|
resources: {}
|
||
|
restartPolicy: Never
|
||
|
{{- if .Values.affinity }}
|
||
|
affinity: {{ toYaml .Values.affinity | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- if .Values.tolerations }}
|
||
|
tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- if .Values.nodeSelector }}
|
||
|
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
|
||
|
{{- end }}
|