forked from SAP-samples/btp-cap-multitenant-saas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
html5_apps_deployer_job.yaml
56 lines (55 loc) · 1.96 KB
/
html5_apps_deployer_job.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{{- if .Values.html5_apps_deployer }}
{{- if or (not (hasKey .Values.html5_apps_deployer "enabled")) .Values.html5_apps_deployer.enabled }}
{{- $ := merge (dict "root" . "name" "html5-apps-deployer") .Values.html5_apps_deployer . }}
{{- if $.backendDestinations }}
{{- if not (.Values.destination.parameters.HTML5Runtime_enabled) }}
{{- fail "destinations.parameters.HTML5Runtime_enabled must be set to true for use with Launchpad Service" }}
{{- end }}
{{- end }}
{{- template "cap.expect" (list . "html5_apps_deployer.image.repository") }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Release.Name }}-html5-apps-deployer
namespace: {{ .Release.Namespace }}
labels: {{- include "cap.labels" $ | nindent 4 }}
annotations:
"helm.sh/hook": "post-install,post-upgrade"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
backoffLimit: 4
template:
metadata:
labels:
{{- include "cap.labels" $ | nindent 8 }}
sidecar.istio.io/inject: "false"
spec:
{{- include "cap.imagePullSecrets" $ | nindent 6 }}
restartPolicy: Never
volumes:
{{- include "cap.sapcp.bindingsVolumes" $ | nindent 10 }}
containers:
- name: html5-deployer
image: {{ include "cap.image" $ }}
imagePullPolicy: {{ include "cap.imagePullPolicy" $ }}
volumeMounts:
{{- include "cap.sapcp.bindingsVolumeMounts" $ | nindent 10 }}
resources:
{{- toYaml .Values.html5_apps_deployer.resources | nindent 10 }}
env:
{{- range $k, $v := .Values.html5_apps_deployer.env }}
- name: {{ $k }}
value: {{ $v | quote }}
{{- end }}
- name: SERVICE_BINDING_ROOT
value: /bindings
- name: EXIT_PROCESS_AFTER_UPLOAD
value: "true"
- name: ASYNC_UPLOAD
value: "true"
- name: PORT
value: "5000"
---
{{ include "cap.sapcp.bindings" $ }}
{{- end }}
{{- end }}