From 4fb4f61d7d1b5ddff8d8fce18c7a1a3aa299e478 Mon Sep 17 00:00:00 2001 From: Gabriel Saratura Date: Mon, 4 Dec 2023 10:21:20 +0100 Subject: [PATCH] Disable multi instance --- component/class/defaults.yml | 7 ++----- component/component/app.jsonnet | 6 +++--- component/component/main.jsonnet | 3 +-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/component/class/defaults.yml b/component/class/defaults.yml index 9b2f091..5bb0e9e 100644 --- a/component/class/defaults.yml +++ b/component/class/defaults.yml @@ -1,16 +1,13 @@ parameters: billing_collector_cloudservices: - =_metadata: - multi_instance: true - namespace: appuio-cloud-reporting secrets: odoo: credentials: stringData: - ODOO_OAUTH_CLIENT_ID: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/${_instance}/odoo-oauth-client-id}" - ODOO_OAUTH_CLIENT_SECRET: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/${_instance}/odoo-oauth-client-secret}" + ODOO_OAUTH_CLIENT_ID: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/odoo-oauth-client-id}" + ODOO_OAUTH_CLIENT_SECRET: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/odoo-oauth-client-secret}" exoscale: credentials: stringData: diff --git a/component/component/app.jsonnet b/component/component/app.jsonnet index 4420ae1..9638a99 100644 --- a/component/component/app.jsonnet +++ b/component/component/app.jsonnet @@ -1,10 +1,10 @@ local kap = import 'lib/kapitan.libjsonnet'; local inv = kap.inventory(); -local paramsACR = inv.parameters.appuio_cloud_reporting; local argocd = import 'lib/argocd.libjsonnet'; - local instance = inv.parameters._instance; -local app = argocd.App(instance, paramsACR.namespace); +local params = inv.parameters.billing_collector_cloudservices; + +local app = argocd.App(instance, params.namespace); { [instance]: app, diff --git a/component/component/main.jsonnet b/component/component/main.jsonnet index 4c5d23b..9691803 100644 --- a/component/component/main.jsonnet +++ b/component/component/main.jsonnet @@ -9,7 +9,6 @@ local component_name = 'billing-collector-cloudservices'; local labels = { 'app.kubernetes.io/name': component_name, 'app.kubernetes.io/managed-by': 'commodore', - 'app.kubernetes.io/part-of': 'appuio-cloud-reporting', 'app.kubernetes.io/component': component_name, }; @@ -163,7 +162,6 @@ local config(name, extraConfig) = kube.ConfigMap(name) { ODOO_OAUTH_TOKEN_URL: std.toString(params.odoo.tokenUrl), CLUSTER_ID: std.toString(params.clusterId), APPUIO_MANAGED_SALES_ORDER: if params.appuioManaged.enabled then std.toString(params.appuioManaged.salesOrder) else '', - TENANT_ID: if params.appuioManaged.enabled then std.toString(params.appuioManaged.tenant) else '', PROM_URL: if params.appuioCloud.enabled then std.toString(params.appuioCloud.promUrl) else '', }, } + extraConfig; @@ -237,6 +235,7 @@ local config(name, extraConfig) = kube.ConfigMap(name) { data+: { COLLECT_INTERVAL: std.toString(params.cloudscale.collectInterval), BILLING_HOUR: std.toString(params.cloudscale.billingHour), + DAYS: std.toString(params.cloudscale.days), } }, local cm = config(name + '-env', extraConfig),