This will allow Kubernetes resources that only pull images occasionally (i.e., k8s jobs) to point to a static tag name, "latest", that is updated regularly. It also means we can refer to that image in the k8s config tracked in the repo, instead of out-of-date images.
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
apiVersion: batch/v1beta1
|
|
kind: CronJob
|
|
metadata:
|
|
name: crls
|
|
namespace: atat
|
|
spec:
|
|
schedule: "0 * * * *"
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: crls
|
|
image: 904153757533.dkr.ecr.us-east-2.amazonaws.com/atat:latest
|
|
command: [
|
|
"/bin/sh", "-c"
|
|
]
|
|
args: [
|
|
"/opt/atat/atst/script/sync-crls",
|
|
]
|
|
envFrom:
|
|
- configMapRef:
|
|
name: atst-envvars
|
|
- configMapRef:
|
|
name: atst-worker-envvars
|
|
volumeMounts:
|
|
- name: atst-config
|
|
mountPath: "/opt/atat/atst/atst-overrides.ini"
|
|
subPath: atst-overrides.ini
|
|
- name: crls-vol
|
|
mountPath: "/opt/atat/atst/crls"
|
|
volumes:
|
|
- name: atst-config
|
|
secret:
|
|
secretName: atst-config-ini
|
|
items:
|
|
- key: override.ini
|
|
path: atst-overrides.ini
|
|
mode: 0644
|
|
- name: crls-vol
|
|
persistentVolumeClaim:
|
|
claimName: efs
|