generated from vshn/go-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from vshn/feat/use-generic-database-secrets
Support using external secret for database connection
- Loading branch information
Showing
16 changed files
with
459 additions
and
83 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
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
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
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
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
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 |
---|---|---|
@@ -1,13 +1,22 @@ | ||
applications: | ||
- metrics-collector as collector-cloudscale-lpg-2 | ||
- appuio-cloud-reporting | ||
|
||
parameters: | ||
billing_collector_cloudservices: | ||
appuio_cloud_reporting: | ||
database: | ||
name: 'reporting' | ||
host: 'reporting-db.appuio-reporting.svc' | ||
parameters: 'sslmode=disable' | ||
password: 'passw0rd' | ||
port: 5432 | ||
url: postgres://$(DB_USER):$(DB_PASSWORD)@$(DB_HOST):$(DB_PORT)/$(DB_NAME)?$(DB_PARAMS) | ||
parameters: '' | ||
database_secret: | ||
DB_USER: appuio-cloud-reporting | ||
DB_PASSWORD: letmein | ||
DB_HOST: db.example.com | ||
DB_PORT: 5432 | ||
DB_NAME: appuio-cloud-reporting | ||
database_env: {} | ||
|
||
extra_volumes: {} | ||
|
||
billing_collector_cloudservices: | ||
exoscale: | ||
enabled: true |
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
Empty file.
60 changes: 60 additions & 0 deletions
60
...ervices/billing-collector-cloudservices/billing-collector-cloudservices/dbaasCronjob.yaml
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,60 @@ | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: billing-collector-cloudservices | ||
app.kubernetes.io/managed-by: commodore | ||
app.kubernetes.io/name: billing-collector-cloudservices | ||
app.kubernetes.io/part-of: appuio-cloud-reporting | ||
name: billing-collector-cloudservices-dbaas | ||
namespace: appuio-cloud-reporting | ||
spec: | ||
concurrencyPolicy: Forbid | ||
failedJobsHistoryLimit: 5 | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- args: | ||
- exoscale | ||
- dbaas | ||
env: | ||
- name: DB_HOST | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_HOST | ||
name: reporting-db | ||
- name: DB_NAME | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_NAME | ||
name: reporting-db | ||
- name: DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_PASSWORD | ||
name: reporting-db | ||
- name: DB_PORT | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_PORT | ||
name: reporting-db | ||
- name: DB_USER | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_USER | ||
name: reporting-db | ||
- name: DB_PARAMS | ||
value: '' | ||
- name: ACR_DB_URL | ||
value: postgres://$(DB_USER):$(DB_PASSWORD)@$(DB_HOST):$(DB_PORT)/$(DB_NAME)?$(DB_PARAMS) | ||
envFrom: | ||
- secretRef: | ||
name: credentials-billing-collector-cloudservices | ||
image: ghcr.io/vshn/billing-collector-cloudservices:v1.0.3 | ||
name: billing-collector-cloudservices-backfill | ||
resources: {} | ||
restartPolicy: OnFailure | ||
schedule: '*/15 * * * *' | ||
successfulJobsHistoryLimit: 3 |
60 changes: 60 additions & 0 deletions
60
...billing-collector-cloudservices/billing-collector-cloudservices/objectStorageCronjob.yaml
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,60 @@ | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: billing-collector-cloudservices | ||
app.kubernetes.io/managed-by: commodore | ||
app.kubernetes.io/name: billing-collector-cloudservices | ||
app.kubernetes.io/part-of: appuio-cloud-reporting | ||
name: billing-collector-cloudservices-objectstorage | ||
namespace: appuio-cloud-reporting | ||
spec: | ||
concurrencyPolicy: Forbid | ||
failedJobsHistoryLimit: 5 | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- args: | ||
- exoscale | ||
- objectstorage | ||
env: | ||
- name: DB_HOST | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_HOST | ||
name: reporting-db | ||
- name: DB_NAME | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_NAME | ||
name: reporting-db | ||
- name: DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_PASSWORD | ||
name: reporting-db | ||
- name: DB_PORT | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_PORT | ||
name: reporting-db | ||
- name: DB_USER | ||
valueFrom: | ||
secretKeyRef: | ||
key: DB_USER | ||
name: reporting-db | ||
- name: DB_PARAMS | ||
value: '' | ||
- name: ACR_DB_URL | ||
value: postgres://$(DB_USER):$(DB_PASSWORD)@$(DB_HOST):$(DB_PORT)/$(DB_NAME)?$(DB_PARAMS) | ||
envFrom: | ||
- secretRef: | ||
name: credentials-billing-collector-cloudservices | ||
image: ghcr.io/vshn/billing-collector-cloudservices:v1.0.3 | ||
name: billing-collector-cloudservices-backfill | ||
resources: {} | ||
restartPolicy: OnFailure | ||
schedule: 10 10,16,20 * * * | ||
successfulJobsHistoryLimit: 3 |
Oops, something went wrong.