Skip to content

Commit

Permalink
Merge pull request #39 from knikolla/refactor_2024_02/cronjob
Browse files Browse the repository at this point in the history
Create k8s base dir with cronjob
  • Loading branch information
knikolla authored Feb 6, 2024
2 parents ca343fa + 7bf8b80 commit 17e3b62
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
18 changes: 18 additions & 0 deletions k8s/base/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: invoicing-openstack-biweekly
spec:
schedule: "0 7 1,15,28 * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: invoicing-openstack-biweekly
image: ghcr.io/cci-moc/openshift-billing-from-db:latest
envFrom:
- secretRef:
name: invoicing-openstack-credentials
imagePullPolicy: Always
restartPolicy: OnFailure
6 changes: 6 additions & 0 deletions k8s/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
commonLabels:
app: invoicing-openstack
resources:
- cronjob.yaml
- namespace.yaml
namespace: invoicing-openstack
5 changes: 5 additions & 0 deletions k8s/base/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: Namespace
metadata:
name: invoicing-openstack
spec: {}
10 changes: 10 additions & 0 deletions k8s/overlays/dev/credentials.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
S3_INPUT_ENDPOINT_URL="http://localhost:9090"
S3_INPUT_ACCESS_KEY_ID="123"
S3_INPUT_SECRET_ACCESS_KEY="123"

S3_OUTPUT_ENDPOINT_URL="http://localhost:9090"
S3_OUTPUT_ACCESS_KEY_ID="123"
S3_OUTPUT_SECRET_ACCESS_KEY="123"

KEYCLOAK_CLIENT_ID="test"
KEYCLOAK_CLIENT_SECRET="123"
10 changes: 10 additions & 0 deletions k8s/overlays/dev/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base

secretGenerator:
- name: invoicing-openstack-credentials
envs:
- credentials.env

0 comments on commit 17e3b62

Please sign in to comment.