Skip to content

Commit

Permalink
CDPT-2186 Fix job template and add it to to deploy (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
EarthlingDavey authored Oct 25, 2024
1 parent 1ee7193 commit fbe820e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ jobs:
< "$TPL_PATH"/ingress.tpl.yml envsubst '${MODSEC_CONFIG}' > "$TPL_PATH"/ingress.yaml
< "$TPL_PATH"/secret.tpl.yml envsubst > "$TPL_PATH"/secret.yaml
< "$TPL_PATH"/deployment.tpl.yml envsubst > "$TPL_PATH"/deployment.yaml
< "$TPL_PATH"/job.tpl.yml envsubst > "$TPL_PATH"/job.yaml
## Remove template files before apply
rm "$TPL_PATH"/*.tpl.yml
Expand Down
36 changes: 19 additions & 17 deletions deploy/development/job.tpl.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# A one time job to run the s3-push container once.
# It will already be built and available at: ${ECR_URL}:${IMAGE_TAG_S3_PUSHER}

apiVersion: apps/v1
apiVersion: batch/v1
kind: Job
metadata:
name: ${KUBE_NAMESPACE}-s3-pusher
name: ${IMAGE_TAG_S3_PUSH}
namespace: ${KUBE_NAMESPACE}
labels:
app: ${KUBE_NAMESPACE}
spec:
template:
metadata:
labels:
app: ${KUBE_NAMESPACE}
spec:
containers:
- name: s3-push
image: ${ECR_URL}:${IMAGE_TAG_S3_PUSH}
env:
- name: AWS_S3_BUCKET
valueFrom:
secretKeyRef:
name: s3-bucket-output
key: bucket_name
spec:
template:
metadata:
labels:
app: ${KUBE_NAMESPACE}
spec:
serviceAccountName: ${KUBE_NAMESPACE}-service
restartPolicy: Never
containers:
- name: s3-push
image: ${ECR_URL}:${IMAGE_TAG_S3_PUSH}
env:
- name: AWS_S3_BUCKET
valueFrom:
secretKeyRef:
name: s3-bucket-output
key: bucket_name

0 comments on commit fbe820e

Please sign in to comment.