Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDPT-2186 Fix job template and add it to to deploy #749

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading