-
Notifications
You must be signed in to change notification settings - Fork 226
/
installCatalogJob.yaml
50 lines (48 loc) · 1.42 KB
/
installCatalogJob.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
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements; and to You under the Apache License, Version 2.0.
apiVersion: batch/v1
kind: Job
metadata:
name: install-catalog
namespace: {{ .Release.Namespace | quote }}
spec:
activeDeadlineSeconds: 600
template:
metadata:
name: install-catalog
spec:
restartPolicy: Never
volumes:
- name: task-dir
configMap:
name: install-catalog
initContainers:
# Wait for a controller to be up so we can perfom our CRUD actions with the CLI
{{ include "readiness.waitForController" . | indent 6 }}
containers:
- name: catalog
image: openwhisk/script-runner
volumeMounts:
- name: task-dir
mountPath: "/task/myTask.sh"
subPath: "myTask.sh"
env:
- name: "WHISK_AUTH"
valueFrom:
secretKeyRef:
name: whisk.auth
key: system
# poorly named envvar; actually expects full apihost (host:port)
- name: "WHISK_API_HOST_NAME"
valueFrom:
configMapKeyRef:
name: whisk.config
key: whisk_api_host_nameAndPort
---
apiVersion: v1
kind: ConfigMap
metadata:
name: install-catalog
namespace: {{ .Release.Namespace | quote }}
data:
{{ (.Files.Glob "configMapFiles/installCatalog/myTask.sh").AsConfig | indent 2 }}