-
Notifications
You must be signed in to change notification settings - Fork 0
/
job.yaml
51 lines (49 loc) · 1.4 KB
/
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
apiVersion: batch/v1
kind: Job
metadata:
name: job-work # the name of our job
labels:
job-group: movie-load # logical grouping
app: job-work
spec:
backoffLimit: 1
template:
metadata:
labels:
app: job-work
job-group: movie-load # logical grouping
spec:
containers:
- name: job-container
image: upgrade:latest
imagePullPolicy: Never # If we have not pulled it before, get it from dockerhub
ports:
- name: http
containerPort: 9090 # Should match the port number that the Go application listens on
envFrom:
- secretRef:
name: postgres-secret
command: ["sh","-c","./sha256sum $FLAG $TEXT"]
env:
- name: TEXT
value: "../../my_files"
- name: FLAG
value: "-d"
#- name: SPECIAL_PATH
# valueFrom:
# configMapKeyRef:
# name: special-config
# key: Special_path
volumeMounts:
- name: job-volume
mountPath: /my_files
volumes:
- name: job-volume
# configMap:
# name: special-config
# items:
# - key: SPECIAL_LEVEL
# path: keys
persistentVolumeClaim:
claimName: my-persistent-volumeclaim
restartPolicy: Never