-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creates a cronjob that runs on the 1, 15th and 28th (mostly every other week.) The 1st is the most important one as that is what we'll be giving out. This will generate the final invoice for the previous month. 15th will generate a mid-month usage invoice. Potentially useful for notifying users about they currently have running. 28th will make sure that things still work a few days before we need to bill on the 1st.
- Loading branch information
Showing
5 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: invoicing-openstack | ||
spec: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |