Skip to content

Commit

Permalink
Merge pull request #33 from QuanMPhm/22/cronjob
Browse files Browse the repository at this point in the history
Packed invoice container into Kubernetes cronjob
  • Loading branch information
QuanMPhm authored May 10, 2024
2 parents cd231b4 + 5198854 commit 51c2f70
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
30 changes: 30 additions & 0 deletions k8/base/invoice-processing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: invoice-processing
spec:
schedule: "0 14 1 * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: invoice-processing
image: ghcr.io/cci-moc/process-csv-report:latest
env:
- name: GH_NONBILLABLE_DEPLOYKEY
valueFrom:
secretKeyRef:
name: gh-nonbillables
key: ssh-deploykey
- name: S3_KEY_ID
valueFrom:
secretKeyRef:
name: nerc-invoices-s3-bucket
key: s3-key-id
- name: S3_APP_KEY
valueFrom:
secretKeyRef:
name: nerc-invoices-s3-bucket
key: s3-app-key
restartPolicy: OnFailure
2 changes: 2 additions & 0 deletions k8/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- invoice-processing.yaml
7 changes: 7 additions & 0 deletions k8/overlay/gh-nonbillables.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: gh-nonbillables
type: kubernetes.io/ssh-auth
data:
ssh-deploykey: test
4 changes: 4 additions & 0 deletions k8/overlay/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resources:
- ../base
- secret-b2-old-pi.yaml
- secret-gh-nonbillables.yaml
8 changes: 8 additions & 0 deletions k8/overlay/nerc-invoices-s3-bucket.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: nerc-invoices-s3-bucket
type: Opaque
data:
s3-app-key: test
s3-key-id: test

0 comments on commit 51c2f70

Please sign in to comment.