This repository has been archived by the owner on Jan 19, 2023. It is now read-only.
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 #23 from vshn/cloudscale-metrics-collector
fix deployment for cloudscale-metrics-collector
- Loading branch information
Showing
16 changed files
with
155 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
parameters: | ||
cloudscale_metrics_collector: | ||
=_metadata: | ||
multi_instance: true | ||
secrets: | ||
cloudscale: | ||
credentials: | ||
stringData: | ||
token: "?{vaultkv:${cluster:tenant}/${cluster:name}/cloudscale-metrics-collector/token}" | ||
CLOUDSCALE_API_TOKEN: "?{vaultkv:${cluster:tenant}/${cluster:name}/cloudscale-metrics-collector/${_instance}/token}" | ||
KUBERNETES_SERVER_URL: "?{vaultkv:${cluster:tenant}/${cluster:name}/cloudscale-metrics-collector/${_instance}/cluster-server}" | ||
KUBERNETES_SERVER_TOKEN: "?{vaultkv:${cluster:tenant}/${cluster:name}/cloudscale-metrics-collector/${_instance}/cluster-token}" | ||
images: | ||
collector: | ||
registry: 'ghcr.io' | ||
repository: 'vshn/cloudscale-metrics-collector' | ||
tag: 'v0.4.1' | ||
# Times in UTC! Don't run job around midnight as exoscale API may return incomplete data | ||
schedule: '10 4,10,16 * * *' |
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,11 +1,11 @@ | ||
local kap = import 'lib/kapitan.libjsonnet'; | ||
local inv = kap.inventory(); | ||
local params = inv.parameters.cloudscale_metrics_collector; | ||
local paramsACR = inv.parameters.appuio_cloud_reporting; | ||
local argocd = import 'lib/argocd.libjsonnet'; | ||
|
||
local app = argocd.App('cloudscale-metrics-collector', paramsACR.namespace); | ||
local instance = inv.parameters._instance; | ||
local app = argocd.App(instance, paramsACR.namespace); | ||
|
||
{ | ||
'cloudscale-metrics-collector': app, | ||
[instance]: app, | ||
} |
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
File renamed without changes.
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,12 @@ | ||
applications: | ||
- cloudscale-metrics-collector as collector-exoscale-ch-gva-2-0 | ||
|
||
parameters: | ||
appuio_cloud_reporting: | ||
namespace: 'appuio-cloud-reporting' | ||
database: | ||
name: 'reporting' | ||
host: 'reporting-db.appuio-reporting.svc' | ||
parameters: 'sslmode=disable' | ||
password: 'passw0rd' | ||
port: 5432 |
File renamed without changes.
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
14 changes: 14 additions & 0 deletions
14
...-metrics-collector/cloudscale-metrics-collector/cloudscale-metrics-collector/secrets.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,14 @@ | ||
apiVersion: v1 | ||
data: {} | ||
kind: Secret | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: credentials-cloudscale-metrics-collector | ||
name: credentials-cloudscale-metrics-collector | ||
namespace: appuio-cloud-reporting | ||
stringData: | ||
CLOUDSCALE_API_TOKEN: t-silent-test-1234/c-green-test-1234/cloudscale-metrics-collector/cloudscale-metrics-collector/token | ||
KUBERNETES_SERVER_TOKEN: t-silent-test-1234/c-green-test-1234/cloudscale-metrics-collector/cloudscale-metrics-collector/cluster-token | ||
KUBERNETES_SERVER_URL: t-silent-test-1234/c-green-test-1234/cloudscale-metrics-collector/cloudscale-metrics-collector/cluster-server | ||
type: Opaque |
Empty file.
45 changes: 45 additions & 0 deletions
45
...scale-ch-gva-2-0/collector-exoscale-ch-gva-2-0/collector-exoscale-ch-gva-2-0/cronjob.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,45 @@ | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: cloudscale-metrics-collector | ||
app.kubernetes.io/managed-by: commodore | ||
app.kubernetes.io/name: cloudscale-metrics-collector | ||
app.kubernetes.io/part-of: appuio-cloud-reporting | ||
name: collector-exoscale-ch-gva-2-0 | ||
namespace: appuio-cloud-reporting | ||
spec: | ||
concurrencyPolicy: Forbid | ||
failedJobsHistoryLimit: 5 | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- args: | ||
- cloudscale-metrics-collector | ||
command: | ||
- sh | ||
- -c | ||
env: | ||
- name: password | ||
valueFrom: | ||
secretKeyRef: | ||
key: password | ||
name: reporting-db | ||
- name: username | ||
valueFrom: | ||
secretKeyRef: | ||
key: username | ||
name: reporting-db | ||
- name: ACR_DB_URL | ||
value: postgres://$(username):$(password)@reporting-db.appuio-reporting.svc:5432/reporting?sslmode=disable | ||
envFrom: | ||
- secretRef: | ||
name: credentials-collector-exoscale-ch-gva-2-0 | ||
image: ghcr.io/vshn/cloudscale-metrics-collector:v0.4.1 | ||
name: cloudscale-metrics-collector-backfill | ||
resources: {} | ||
restartPolicy: OnFailure | ||
schedule: 10 4,10,16 * * * | ||
successfulJobsHistoryLimit: 3 |
14 changes: 14 additions & 0 deletions
14
...scale-ch-gva-2-0/collector-exoscale-ch-gva-2-0/collector-exoscale-ch-gva-2-0/secrets.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,14 @@ | ||
apiVersion: v1 | ||
data: {} | ||
kind: Secret | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: credentials-collector-exoscale-ch-gva-2-0 | ||
name: credentials-collector-exoscale-ch-gva-2-0 | ||
namespace: appuio-cloud-reporting | ||
stringData: | ||
CLOUDSCALE_API_TOKEN: t-silent-test-1234/c-green-test-1234/cloudscale-metrics-collector/collector-exoscale-ch-gva-2-0/token | ||
KUBERNETES_SERVER_TOKEN: t-silent-test-1234/c-green-test-1234/cloudscale-metrics-collector/collector-exoscale-ch-gva-2-0/cluster-token | ||
KUBERNETES_SERVER_URL: t-silent-test-1234/c-green-test-1234/cloudscale-metrics-collector/collector-exoscale-ch-gva-2-0/cluster-server | ||
type: Opaque |
12 changes: 0 additions & 12 deletions
12
...ts/golden/defaults/cloudscale-metrics-collector/cloudscale-metrics-collector/secrets.yaml
This file was deleted.
Oops, something went wrong.
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