Skip to content

Commit

Permalink
Disable multi instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Saratura committed Dec 5, 2023
1 parent 4cbec76 commit 4fb4f61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
7 changes: 2 additions & 5 deletions component/class/defaults.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 3 additions & 3 deletions component/component/app.jsonnet
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
3 changes: 1 addition & 2 deletions component/component/main.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 4fb4f61

Please sign in to comment.