diff --git a/class/defaults.yml b/class/defaults.yml index b1ceec33a..581c2ed67 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -55,7 +55,7 @@ parameters: appcat: registry: ghcr.io repository: vshn/appcat - tag: v4.114.0 + tag: v4.116.0 functionAppcat: registry: ${appcat:images:appcat:registry} repository: ${appcat:images:appcat:repository} diff --git a/component/billing.jsonnet b/component/billing.jsonnet index 943df0b3b..c2c98972b 100644 --- a/component/billing.jsonnet +++ b/component/billing.jsonnet @@ -12,6 +12,8 @@ local paramsBilling = params.billing; local formatImage = function(ref) '%(registry)s/%(repository)s:%(tag)s' % ref; +local addOns = [ 'nextcloud-office' ]; + // escape any non-valid characters and replace them with - local escape = function(str) std.join('', @@ -149,10 +151,47 @@ local backfillCJ = function(name, query, sla, type) }, }, failedJobsHistoryLimit: 3, - successfulJobsHistoryLimit: 0, + successfulJobsHistoryLimit: 1, }, }; +local getManagedQuery = function(queryName) + 'sum_over_time(appcat:metering{label_appuio_io_billing_name="appcat-' + queryName + '",label_appcat_vshn_io_sla="%s", tenant_name!="APPUiO"}[59m:1m])/60'; + +local getCloudQuery = function(queryName) + 'sum_over_time(appcat:metering{label_appuio_io_billing_name="appcat-' + queryName + '",label_appcat_vshn_io_sla="%s", tenant_name="APPUiO"}[59m:1m])/60 * on(label_appuio_io_organization) group_left(sales_order) label_replace(appuio_control_organization_info{namespace="appuio-control-api-production"}, "label_appuio_io_organization", "$1", "organization", "(.*)")'; + +local getPermutations = function(cloudQuery, managedQuery) + [ + { + query: cloudQuery % 'besteffort', + sla: 'besteffort', + type: 'cloud', + }, + { + query: cloudQuery % 'guaranteed', + sla: 'guaranteed', + type: 'cloud', + }, + { + query: managedQuery % 'besteffort', + sla: 'besteffort', + type: 'managed', + }, + { + query: managedQuery % 'guaranteed', + sla: 'guaranteed', + type: 'managed', + }, + ]; + +local generateAddOnsCloudAndManaged = function(name) + local queryName = if name == 'postgres' then name + 'ql' else name; + local managedQuery = getManagedQuery(queryName); + local cloudQuery = getCloudQuery(queryName); + local permutations = getPermutations(cloudQuery, managedQuery); + std.flatMap(function(r) [ backfillCJ(name, r.query, r.sla, r.type) ], permutations); + local generateCloudAndManaged = function(name) // For postgresql we have a missmatch between the label and the name in our definition. @@ -188,11 +227,13 @@ local generateCloudAndManaged = function(name) local vshnServices = common.FilterServiceByBoolean('billing'); local billingCronjobs = std.flattenArrays(std.flatMap(function(r) [ generateCloudAndManaged(r.name) ], vshnServices)); +local billingAddOnsCronjobs = std.flattenArrays(std.flatMap(function(addOn) [ generateAddOnsCloudAndManaged(addOn) ], addOns)); if paramsBilling.vshn.enableCronjobs then { [if std.length(std.filter(function(name) paramsBilling.network_policies.target_namespaces[name] == true, std.objectFields(paramsBilling.network_policies.target_namespaces))) > 0 then 'billing/01_netpol']: netPol.Policies, 'billing/10_odoo_secret': odooSecret, 'billing/11_backfill': billingCronjobs, + 'billing/12_backfill_addons': billingAddOnsCronjobs, [if paramsBilling.monitoring.enabled then 'billing/50_alerts']: alerts.Alerts, } else {} diff --git a/tests/golden/control-plane/appcat/appcat/10_function_appcat.yaml b/tests/golden/control-plane/appcat/appcat/10_function_appcat.yaml index 8684fe80d..e470c50b5 100644 --- a/tests/golden/control-plane/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/control-plane/appcat/appcat/10_function_appcat.yaml @@ -6,6 +6,6 @@ metadata: argocd.argoproj.io/sync-wave: '-40' name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.114.0-func + package: ghcr.io/vshn/appcat:v4.116.0-func runtimeConfigRef: name: function-appcat diff --git a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_keycloak.yaml b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_keycloak.yaml index a9958fbfc..7872544f9 100644 --- a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_keycloak.yaml +++ b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_keycloak.yaml @@ -40,7 +40,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 ingress_annotations: | nginx.ingress.kubernetes.io/backend-protocol: HTTPS cert-manager.io/cluster-issuer: letsencrypt-staging diff --git a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_mariadb.yaml b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_mariadb.yaml index e3fcafc92..ec60d3c97 100644 --- a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_mariadb.yaml +++ b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_mariadb.yaml @@ -40,7 +40,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 isOpenshift: 'false' maintenanceSA: helm-based-service-maintenance mode: standalone diff --git a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_nextcloud.yaml b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_nextcloud.yaml index eaf962b4b..599fd041d 100644 --- a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_nextcloud.yaml +++ b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_nextcloud.yaml @@ -45,7 +45,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 ingress_annotations: | cert-manager.io/cluster-issuer: letsencrypt-staging nginx.ingress.kubernetes.io/enable-cors: "true" diff --git a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_postgres.yaml b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_postgres.yaml index 8d15d0d28..274fe7ed1 100644 --- a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_postgres.yaml +++ b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_postgres.yaml @@ -41,7 +41,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 initContainers: '{"clusterReconciliationCycle": {"limits": {"cpu": "300m", "memory": "200Mi"}, "requests": {"cpu": "100m", "memory": "100Mi"}}, "pgbouncerAuthFile": {"limits": {"cpu": "300m", "memory": "500Mi"}, "requests": {"cpu": "100m", diff --git a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_redis.yaml b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_redis.yaml index 5fc44ee10..dc07d69f4 100644 --- a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_redis.yaml +++ b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_redis.yaml @@ -597,7 +597,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 isOpenshift: 'false' maintenanceSA: helm-based-service-maintenance ownerGroup: vshn.appcat.vshn.io diff --git a/tests/golden/control-plane/appcat/appcat/apiserver/30_deployment.yaml b/tests/golden/control-plane/appcat/appcat/apiserver/30_deployment.yaml index 241f9bd5f..69ad37eb9 100644 --- a/tests/golden/control-plane/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/control-plane/appcat/appcat/apiserver/30_deployment.yaml @@ -29,7 +29,7 @@ spec: - --secure-port=9443 - --tls-cert-file=/apiserver.local.config/certificates/tls.crt - --tls-private-key-file=/apiserver.local.config/certificates/tls.key - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: failureThreshold: 3 httpGet: diff --git a/tests/golden/control-plane/appcat/appcat/controllers/appcat/30_deployment.yaml b/tests/golden/control-plane/appcat/appcat/controllers/appcat/30_deployment.yaml index 2354a3a7f..d5857f39b 100644 --- a/tests/golden/control-plane/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/tests/golden/control-plane/appcat/appcat/controllers/appcat/30_deployment.yaml @@ -23,7 +23,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/control-plane/appcat/appcat/sla_reporter/01_cronjob.yaml b/tests/golden/control-plane/appcat/appcat/sla_reporter/01_cronjob.yaml index c20545ab8..33a79dbe3 100644 --- a/tests/golden/control-plane/appcat/appcat/sla_reporter/01_cronjob.yaml +++ b/tests/golden/control-plane/appcat/appcat/sla_reporter/01_cronjob.yaml @@ -30,7 +30,7 @@ spec: envFrom: - secretRef: name: appcat-sla-reports-creds - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 name: sla-reporter resources: limits: diff --git a/tests/golden/control-plane/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/tests/golden/control-plane/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 769a69d9b..8ce029e64 100644 --- a/tests/golden/control-plane/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/tests/golden/control-plane/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -36,7 +36,7 @@ spec: value: 'true' - name: APPCAT_SLI_VSHNMARIADB value: 'true' - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml b/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml index 8684fe80d..e470c50b5 100644 --- a/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml @@ -6,6 +6,6 @@ metadata: argocd.argoproj.io/sync-wave: '-40' name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.114.0-func + package: ghcr.io/vshn/appcat:v4.116.0-func runtimeConfigRef: name: function-appcat diff --git a/tests/golden/defaults/appcat/appcat/apiserver/30_deployment.yaml b/tests/golden/defaults/appcat/appcat/apiserver/30_deployment.yaml index 241f9bd5f..69ad37eb9 100644 --- a/tests/golden/defaults/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/defaults/appcat/appcat/apiserver/30_deployment.yaml @@ -29,7 +29,7 @@ spec: - --secure-port=9443 - --tls-cert-file=/apiserver.local.config/certificates/tls.crt - --tls-private-key-file=/apiserver.local.config/certificates/tls.key - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: failureThreshold: 3 httpGet: diff --git a/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index f6a0fd33c..bb388192a 100644 --- a/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -36,7 +36,7 @@ spec: value: 'false' - name: APPCAT_SLI_VSHNMARIADB value: 'false' - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/dev/appcat/appcat/10_function_appcat.yaml b/tests/golden/dev/appcat/appcat/10_function_appcat.yaml index 8684fe80d..e470c50b5 100644 --- a/tests/golden/dev/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/dev/appcat/appcat/10_function_appcat.yaml @@ -6,6 +6,6 @@ metadata: argocd.argoproj.io/sync-wave: '-40' name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.114.0-func + package: ghcr.io/vshn/appcat:v4.116.0-func runtimeConfigRef: name: function-appcat diff --git a/tests/golden/dev/appcat/appcat/21_composition_vshn_keycloak.yaml b/tests/golden/dev/appcat/appcat/21_composition_vshn_keycloak.yaml index 6a42d7435..21580fbc0 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_keycloak.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_keycloak.yaml @@ -40,7 +40,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 ingress_annotations: | nginx.ingress.kubernetes.io/backend-protocol: HTTPS cert-manager.io/cluster-issuer: letsencrypt-staging diff --git a/tests/golden/dev/appcat/appcat/21_composition_vshn_mariadb.yaml b/tests/golden/dev/appcat/appcat/21_composition_vshn_mariadb.yaml index d0028b61d..5abb923b0 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_mariadb.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_mariadb.yaml @@ -40,7 +40,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 isOpenshift: 'false' maintenanceSA: helm-based-service-maintenance mode: standalone diff --git a/tests/golden/dev/appcat/appcat/21_composition_vshn_nextcloud.yaml b/tests/golden/dev/appcat/appcat/21_composition_vshn_nextcloud.yaml index 8016c7e2e..c23145778 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_nextcloud.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_nextcloud.yaml @@ -45,7 +45,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 ingress_annotations: | cert-manager.io/cluster-issuer: letsencrypt-staging isOpenshift: 'false' diff --git a/tests/golden/dev/appcat/appcat/21_composition_vshn_postgres.yaml b/tests/golden/dev/appcat/appcat/21_composition_vshn_postgres.yaml index f336503ae..ee3d625b0 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_postgres.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_postgres.yaml @@ -41,7 +41,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 initContainers: '{"clusterReconciliationCycle": {"limits": {"cpu": "300m", "memory": "200Mi"}, "requests": {"cpu": "100m", "memory": "100Mi"}}, "pgbouncerAuthFile": {"limits": {"cpu": "300m", "memory": "500Mi"}, "requests": {"cpu": "100m", diff --git a/tests/golden/dev/appcat/appcat/21_composition_vshn_redis.yaml b/tests/golden/dev/appcat/appcat/21_composition_vshn_redis.yaml index 0f69c1eda..94b518fda 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_redis.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_redis.yaml @@ -597,7 +597,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 isOpenshift: 'false' maintenanceSA: helm-based-service-maintenance ownerGroup: vshn.appcat.vshn.io diff --git a/tests/golden/dev/appcat/appcat/apiserver/30_deployment.yaml b/tests/golden/dev/appcat/appcat/apiserver/30_deployment.yaml index 241f9bd5f..69ad37eb9 100644 --- a/tests/golden/dev/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/dev/appcat/appcat/apiserver/30_deployment.yaml @@ -29,7 +29,7 @@ spec: - --secure-port=9443 - --tls-cert-file=/apiserver.local.config/certificates/tls.crt - --tls-private-key-file=/apiserver.local.config/certificates/tls.key - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: failureThreshold: 3 httpGet: diff --git a/tests/golden/dev/appcat/appcat/controllers/appcat/30_deployment.yaml b/tests/golden/dev/appcat/appcat/controllers/appcat/30_deployment.yaml index 2354a3a7f..d5857f39b 100644 --- a/tests/golden/dev/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/tests/golden/dev/appcat/appcat/controllers/appcat/30_deployment.yaml @@ -23,7 +23,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/dev/appcat/appcat/sla_reporter/01_cronjob.yaml b/tests/golden/dev/appcat/appcat/sla_reporter/01_cronjob.yaml index c20545ab8..33a79dbe3 100644 --- a/tests/golden/dev/appcat/appcat/sla_reporter/01_cronjob.yaml +++ b/tests/golden/dev/appcat/appcat/sla_reporter/01_cronjob.yaml @@ -30,7 +30,7 @@ spec: envFrom: - secretRef: name: appcat-sla-reports-creds - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 name: sla-reporter resources: limits: diff --git a/tests/golden/dev/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/tests/golden/dev/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index fceef2890..d41870b45 100644 --- a/tests/golden/dev/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/tests/golden/dev/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -36,7 +36,7 @@ spec: value: 'true' - name: APPCAT_SLI_VSHNMARIADB value: 'true' - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/service-cluster/appcat/appcat/controllers/appcat/30_deployment.yaml b/tests/golden/service-cluster/appcat/appcat/controllers/appcat/30_deployment.yaml index 60305fb56..a75af48e2 100644 --- a/tests/golden/service-cluster/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/tests/golden/service-cluster/appcat/appcat/controllers/appcat/30_deployment.yaml @@ -31,7 +31,7 @@ spec: name: vcluster-kubeconfig - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/vshn-cloud/appcat/appcat/10_function_appcat.yaml b/tests/golden/vshn-cloud/appcat/appcat/10_function_appcat.yaml index 8684fe80d..e470c50b5 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/10_function_appcat.yaml @@ -6,6 +6,6 @@ metadata: argocd.argoproj.io/sync-wave: '-40' name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.114.0-func + package: ghcr.io/vshn/appcat:v4.116.0-func runtimeConfigRef: name: function-appcat diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_keycloak.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_keycloak.yaml index 3d9516cc2..8f7d47ded 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_keycloak.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_keycloak.yaml @@ -40,7 +40,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 ingress_annotations: | nginx.ingress.kubernetes.io/backend-protocol: HTTPS cert-manager.io/cluster-issuer: letsencrypt-staging diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_mariadb.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_mariadb.yaml index b59c18c3d..7ac0665bc 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_mariadb.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_mariadb.yaml @@ -40,7 +40,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 isOpenshift: 'true' maintenanceSA: helm-based-service-maintenance mode: standalone diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_minio.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_minio.yaml index 59580bc01..62a8021c6 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_minio.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_minio.yaml @@ -40,7 +40,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 isOpenshift: 'true' maintenanceSA: helm-based-service-maintenance minioChartRepository: https://charts.min.io diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_nextcloud.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_nextcloud.yaml index 62cc22fa5..554309318 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_nextcloud.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_nextcloud.yaml @@ -45,7 +45,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 ingress_annotations: | cert-manager.io/cluster-issuer: letsencrypt-staging isOpenshift: 'true' diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_postgres.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_postgres.yaml index 1d03a559e..930ee0d7f 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_postgres.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_postgres.yaml @@ -41,7 +41,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 initContainers: '{"clusterReconciliationCycle": {"limits": {"cpu": "300m", "memory": "200Mi"}, "requests": {"cpu": "100m", "memory": "100Mi"}}, "pgbouncerAuthFile": {"limits": {"cpu": "300m", "memory": "500Mi"}, "requests": {"cpu": "100m", diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_redis.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_redis.yaml index cf12aa484..c15704db9 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_redis.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_redis.yaml @@ -597,7 +597,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 isOpenshift: 'true' maintenanceSA: helm-based-service-maintenance ownerGroup: vshn.appcat.vshn.io diff --git a/tests/golden/vshn-cloud/appcat/appcat/apiserver/30_deployment.yaml b/tests/golden/vshn-cloud/appcat/appcat/apiserver/30_deployment.yaml index 5cc3cdd3d..0fc45ae9f 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/apiserver/30_deployment.yaml @@ -29,7 +29,7 @@ spec: - --secure-port=9443 - --tls-cert-file=/apiserver.local.config/certificates/tls.crt - --tls-private-key-file=/apiserver.local.config/certificates/tls.key - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: failureThreshold: 3 httpGet: diff --git a/tests/golden/vshn-cloud/appcat/appcat/billing/11_backfill.yaml b/tests/golden/vshn-cloud/appcat/appcat/billing/11_backfill.yaml index a21d328b3..519bfd250 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/billing/11_backfill.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/billing/11_backfill.yaml @@ -84,7 +84,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -172,7 +172,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -258,7 +258,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -344,7 +344,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -432,7 +432,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -520,7 +520,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -606,7 +606,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -692,7 +692,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -780,7 +780,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -868,7 +868,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -954,7 +954,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1040,7 +1040,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1128,7 +1128,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1216,7 +1216,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1302,7 +1302,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1388,7 +1388,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1476,7 +1476,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1564,7 +1564,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1650,7 +1650,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1736,7 +1736,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1824,7 +1824,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1912,7 +1912,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1998,7 +1998,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -2084,4 +2084,4 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 diff --git a/tests/golden/vshn-cloud/appcat/appcat/billing/12_backfill_addons.yaml b/tests/golden/vshn-cloud/appcat/appcat/billing/12_backfill_addons.yaml new file mode 100644 index 000000000..8d40346e0 --- /dev/null +++ b/tests/golden/vshn-cloud/appcat/appcat/billing/12_backfill_addons.yaml @@ -0,0 +1,347 @@ +apiVersion: batch/v1 +kind: CronJob +metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-besteffort + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + name: appcat-vshn-nextcloud-office-besteffort-cloud + name: appcat-vshn-nextcloud-office-besteffort-cloud + namespace: syn-appcat +spec: + failedJobsHistoryLimit: 3 + jobTemplate: + metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-besteffort + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + cron-job-name: appcat-vshn-nextcloud-office-besteffort-cloud + spec: + template: + metadata: + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + spec: + containers: + - args: + - appuio-reporting report --timerange 1h --begin=$(date -d "now -3 + hours" -u +"%Y-%m-%dT%H:00:00Z") --repeat-until=$(date -u +"%Y-%m-%dT%H:00:00Z") + command: + - sh + - -c + env: + - name: AR_ODOO_OAUTH_TOKEN_URL + valueFrom: + secretKeyRef: + key: token_endpoint + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_ID + valueFrom: + secretKeyRef: + key: client_id + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_SECRET + valueFrom: + secretKeyRef: + key: client_secret + name: odoo-credentials + - name: AR_ODOO_URL + value: https://test.central.vshn.ch/api/v2/product_usage_report_POST + - name: AR_PROM_URL + value: http://prometheus-operated.prometheus-system:9090/prometheus + - name: AR_ORG_ID + value: appuio-cloud-metering-c-appuio-cloudscale-lpg-2|appuio-cloud-metering-c-appuio-exoscale-ch-gva-2-0 + - name: AR_PRODUCT_ID + value: appcat-vshn-nextcloud-office-besteffort + - name: AR_QUERY + value: sum_over_time(appcat:metering{label_appuio_io_billing_name="appcat-nextcloud-office",label_appcat_vshn_io_sla="besteffort", + tenant_name="APPUiO"}[59m:1m])/60 * on(label_appuio_io_organization) + group_left(sales_order) label_replace(appuio_control_organization_info{namespace="appuio-control-api-production"}, + "label_appuio_io_organization", "$1", "organization", "(.*)") + - name: AR_INSTANCE_JSONNET + value: local labels = std.extVar("labels"); "%(cluster_id)s/%(label_appcat_vshn_io_claim_namespace)s/%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_ITEM_GROUP_DESCRIPTION_JSONNET + value: 'local labels = std.extVar("labels"); "APPUiO Cloud - Zone: + Kind - Local Test 0 / Namespace: %(label_appcat_vshn_io_claim_namespace)s" + % labels' + - name: AR_ITEM_DESCRIPTION_JSONNET + value: local labels = std.extVar("labels"); "%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_UNIT_ID + value: uom_uom_45_1e112771 + image: ghcr.io/appuio/appuio-reporting:v0.2.1 + name: backfill + resources: {} + initContainers: [] + restartPolicy: OnFailure + schedule: 30 * * * * + startingDeadlineSeconds: 180 + successfulJobsHistoryLimit: 1 +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-guaranteed + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + name: appcat-vshn-nextcloud-office-guaranteed-cloud + name: appcat-vshn-nextcloud-office-guaranteed-cloud + namespace: syn-appcat +spec: + failedJobsHistoryLimit: 3 + jobTemplate: + metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-guaranteed + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + cron-job-name: appcat-vshn-nextcloud-office-guaranteed-cloud + spec: + template: + metadata: + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + spec: + containers: + - args: + - appuio-reporting report --timerange 1h --begin=$(date -d "now -3 + hours" -u +"%Y-%m-%dT%H:00:00Z") --repeat-until=$(date -u +"%Y-%m-%dT%H:00:00Z") + command: + - sh + - -c + env: + - name: AR_ODOO_OAUTH_TOKEN_URL + valueFrom: + secretKeyRef: + key: token_endpoint + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_ID + valueFrom: + secretKeyRef: + key: client_id + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_SECRET + valueFrom: + secretKeyRef: + key: client_secret + name: odoo-credentials + - name: AR_ODOO_URL + value: https://test.central.vshn.ch/api/v2/product_usage_report_POST + - name: AR_PROM_URL + value: http://prometheus-operated.prometheus-system:9090/prometheus + - name: AR_ORG_ID + value: appuio-cloud-metering-c-appuio-cloudscale-lpg-2|appuio-cloud-metering-c-appuio-exoscale-ch-gva-2-0 + - name: AR_PRODUCT_ID + value: appcat-vshn-nextcloud-office-guaranteed + - name: AR_QUERY + value: sum_over_time(appcat:metering{label_appuio_io_billing_name="appcat-nextcloud-office",label_appcat_vshn_io_sla="guaranteed", + tenant_name="APPUiO"}[59m:1m])/60 * on(label_appuio_io_organization) + group_left(sales_order) label_replace(appuio_control_organization_info{namespace="appuio-control-api-production"}, + "label_appuio_io_organization", "$1", "organization", "(.*)") + - name: AR_INSTANCE_JSONNET + value: local labels = std.extVar("labels"); "%(cluster_id)s/%(label_appcat_vshn_io_claim_namespace)s/%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_ITEM_GROUP_DESCRIPTION_JSONNET + value: 'local labels = std.extVar("labels"); "APPUiO Cloud - Zone: + Kind - Local Test 0 / Namespace: %(label_appcat_vshn_io_claim_namespace)s" + % labels' + - name: AR_ITEM_DESCRIPTION_JSONNET + value: local labels = std.extVar("labels"); "%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_UNIT_ID + value: uom_uom_45_1e112771 + image: ghcr.io/appuio/appuio-reporting:v0.2.1 + name: backfill + resources: {} + initContainers: [] + restartPolicy: OnFailure + schedule: 30 * * * * + startingDeadlineSeconds: 180 + successfulJobsHistoryLimit: 1 +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-besteffort + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + name: appcat-vshn-nextcloud-office-besteffort-managed + name: appcat-vshn-nextcloud-office-besteffort-managed + namespace: syn-appcat +spec: + failedJobsHistoryLimit: 3 + jobTemplate: + metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-besteffort + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + cron-job-name: appcat-vshn-nextcloud-office-besteffort-managed + spec: + template: + metadata: + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + spec: + containers: + - args: + - appuio-reporting report --timerange 1h --begin=$(date -d "now -3 + hours" -u +"%Y-%m-%dT%H:00:00Z") --repeat-until=$(date -u +"%Y-%m-%dT%H:00:00Z") + command: + - sh + - -c + env: + - name: AR_ODOO_OAUTH_TOKEN_URL + valueFrom: + secretKeyRef: + key: token_endpoint + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_ID + valueFrom: + secretKeyRef: + key: client_id + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_SECRET + valueFrom: + secretKeyRef: + key: client_secret + name: odoo-credentials + - name: AR_ODOO_URL + value: https://test.central.vshn.ch/api/v2/product_usage_report_POST + - name: AR_PROM_URL + value: http://prometheus-operated.prometheus-system:9090/prometheus + - name: AR_ORG_ID + value: appuio-managed-openshift-billing + - name: AR_PRODUCT_ID + value: appcat-vshn-nextcloud-office-besteffort + - name: AR_QUERY + value: sum_over_time(appcat:metering{label_appuio_io_billing_name="appcat-nextcloud-office",label_appcat_vshn_io_sla="besteffort", + tenant_name!="APPUiO"}[59m:1m])/60 + - name: AR_INSTANCE_JSONNET + value: local labels = std.extVar("labels"); "%(cluster_id)s/%(label_appcat_vshn_io_claim_namespace)s/%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_ITEM_GROUP_DESCRIPTION_JSONNET + value: 'local labels = std.extVar("labels"); "APPUiO Managed - Cluster: + kind / Namespace: %(label_appcat_vshn_io_claim_namespace)s" % + labels' + - name: AR_ITEM_DESCRIPTION_JSONNET + value: local labels = std.extVar("labels"); "%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_UNIT_ID + value: uom_uom_45_1e112771 + image: ghcr.io/appuio/appuio-reporting:v0.2.1 + name: backfill + resources: {} + initContainers: [] + restartPolicy: OnFailure + schedule: 30 * * * * + startingDeadlineSeconds: 180 + successfulJobsHistoryLimit: 1 +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-guaranteed + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + name: appcat-vshn-nextcloud-office-guaranteed-managed + name: appcat-vshn-nextcloud-office-guaranteed-managed + namespace: syn-appcat +spec: + failedJobsHistoryLimit: 3 + jobTemplate: + metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-guaranteed + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + cron-job-name: appcat-vshn-nextcloud-office-guaranteed-managed + spec: + template: + metadata: + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + spec: + containers: + - args: + - appuio-reporting report --timerange 1h --begin=$(date -d "now -3 + hours" -u +"%Y-%m-%dT%H:00:00Z") --repeat-until=$(date -u +"%Y-%m-%dT%H:00:00Z") + command: + - sh + - -c + env: + - name: AR_ODOO_OAUTH_TOKEN_URL + valueFrom: + secretKeyRef: + key: token_endpoint + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_ID + valueFrom: + secretKeyRef: + key: client_id + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_SECRET + valueFrom: + secretKeyRef: + key: client_secret + name: odoo-credentials + - name: AR_ODOO_URL + value: https://test.central.vshn.ch/api/v2/product_usage_report_POST + - name: AR_PROM_URL + value: http://prometheus-operated.prometheus-system:9090/prometheus + - name: AR_ORG_ID + value: appuio-managed-openshift-billing + - name: AR_PRODUCT_ID + value: appcat-vshn-nextcloud-office-guaranteed + - name: AR_QUERY + value: sum_over_time(appcat:metering{label_appuio_io_billing_name="appcat-nextcloud-office",label_appcat_vshn_io_sla="guaranteed", + tenant_name!="APPUiO"}[59m:1m])/60 + - name: AR_INSTANCE_JSONNET + value: local labels = std.extVar("labels"); "%(cluster_id)s/%(label_appcat_vshn_io_claim_namespace)s/%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_ITEM_GROUP_DESCRIPTION_JSONNET + value: 'local labels = std.extVar("labels"); "APPUiO Managed - Cluster: + kind / Namespace: %(label_appcat_vshn_io_claim_namespace)s" % + labels' + - name: AR_ITEM_DESCRIPTION_JSONNET + value: local labels = std.extVar("labels"); "%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_UNIT_ID + value: uom_uom_45_1e112771 + image: ghcr.io/appuio/appuio-reporting:v0.2.1 + name: backfill + resources: {} + initContainers: [] + restartPolicy: OnFailure + schedule: 30 * * * * + startingDeadlineSeconds: 180 + successfulJobsHistoryLimit: 1 diff --git a/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/30_deployment.yaml b/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/30_deployment.yaml index 2354a3a7f..d5857f39b 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/30_deployment.yaml @@ -23,7 +23,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/vshn-cloud/appcat/appcat/sla_reporter/01_cronjob.yaml b/tests/golden/vshn-cloud/appcat/appcat/sla_reporter/01_cronjob.yaml index c20545ab8..33a79dbe3 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/sla_reporter/01_cronjob.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/sla_reporter/01_cronjob.yaml @@ -30,7 +30,7 @@ spec: envFrom: - secretRef: name: appcat-sla-reports-creds - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 name: sla-reporter resources: limits: diff --git a/tests/golden/vshn-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/tests/golden/vshn-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 75f925ba0..c74bca460 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -36,7 +36,7 @@ spec: value: 'true' - name: APPCAT_SLI_VSHNMARIADB value: 'true' - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/vshn-managed/appcat/appcat/10_function_appcat.yaml b/tests/golden/vshn-managed/appcat/appcat/10_function_appcat.yaml index 8684fe80d..e470c50b5 100644 --- a/tests/golden/vshn-managed/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/10_function_appcat.yaml @@ -6,6 +6,6 @@ metadata: argocd.argoproj.io/sync-wave: '-40' name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.114.0-func + package: ghcr.io/vshn/appcat:v4.116.0-func runtimeConfigRef: name: function-appcat diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_keycloak.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_keycloak.yaml index 278bcaa85..919e98c6b 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_keycloak.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_keycloak.yaml @@ -40,7 +40,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 ingress_annotations: | nginx.ingress.kubernetes.io/backend-protocol: HTTPS cert-manager.io/cluster-issuer: letsencrypt-staging diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_mariadb.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_mariadb.yaml index b1c8c3d38..9b69d0fa8 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_mariadb.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_mariadb.yaml @@ -40,7 +40,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 isOpenshift: 'true' maintenanceSA: helm-based-service-maintenance mode: standalone diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_minio.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_minio.yaml index 82daa1dcb..ec6258f1b 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_minio.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_minio.yaml @@ -40,7 +40,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 isOpenshift: 'true' maintenanceSA: helm-based-service-maintenance minioChartRepository: https://charts.min.io diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_nextcloud.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_nextcloud.yaml index b1c77037e..c16d58878 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_nextcloud.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_nextcloud.yaml @@ -45,7 +45,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 ingress_annotations: | cert-manager.io/cluster-issuer: letsencrypt-staging isOpenshift: 'true' diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_postgres.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_postgres.yaml index 31dab62bf..31edfc66a 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_postgres.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_postgres.yaml @@ -41,7 +41,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 initContainers: '{"clusterReconciliationCycle": {"limits": {"cpu": "300m", "memory": "200Mi"}, "requests": {"cpu": "100m", "memory": "100Mi"}}, "pgbouncerAuthFile": {"limits": {"cpu": "300m", "memory": "500Mi"}, "requests": {"cpu": "100m", diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_redis.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_redis.yaml index 89a3d97dd..0d2d6c035 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_redis.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_redis.yaml @@ -597,7 +597,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test - imageTag: v4.114.0 + imageTag: v4.116.0 isOpenshift: 'true' maintenanceSA: helm-based-service-maintenance ownerGroup: vshn.appcat.vshn.io diff --git a/tests/golden/vshn-managed/appcat/appcat/apiserver/30_deployment.yaml b/tests/golden/vshn-managed/appcat/appcat/apiserver/30_deployment.yaml index 5cc3cdd3d..0fc45ae9f 100644 --- a/tests/golden/vshn-managed/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/apiserver/30_deployment.yaml @@ -29,7 +29,7 @@ spec: - --secure-port=9443 - --tls-cert-file=/apiserver.local.config/certificates/tls.crt - --tls-private-key-file=/apiserver.local.config/certificates/tls.key - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: failureThreshold: 3 httpGet: diff --git a/tests/golden/vshn-managed/appcat/appcat/billing/11_backfill.yaml b/tests/golden/vshn-managed/appcat/appcat/billing/11_backfill.yaml index 37e2f9319..66075c45d 100644 --- a/tests/golden/vshn-managed/appcat/appcat/billing/11_backfill.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/billing/11_backfill.yaml @@ -83,7 +83,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -170,7 +170,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -256,7 +256,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -342,7 +342,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -429,7 +429,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -516,7 +516,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -602,7 +602,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -688,7 +688,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -775,7 +775,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -862,7 +862,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -948,7 +948,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1034,7 +1034,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1121,7 +1121,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1208,7 +1208,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1294,7 +1294,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1380,7 +1380,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1467,7 +1467,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1554,7 +1554,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1640,7 +1640,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1726,7 +1726,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1813,7 +1813,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1900,7 +1900,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -1986,7 +1986,7 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 --- apiVersion: batch/v1 kind: CronJob @@ -2072,4 +2072,4 @@ spec: restartPolicy: OnFailure schedule: 30 * * * * startingDeadlineSeconds: 180 - successfulJobsHistoryLimit: 0 + successfulJobsHistoryLimit: 1 diff --git a/tests/golden/vshn-managed/appcat/appcat/billing/12_backfill_addons.yaml b/tests/golden/vshn-managed/appcat/appcat/billing/12_backfill_addons.yaml new file mode 100644 index 000000000..ca2129322 --- /dev/null +++ b/tests/golden/vshn-managed/appcat/appcat/billing/12_backfill_addons.yaml @@ -0,0 +1,345 @@ +apiVersion: batch/v1 +kind: CronJob +metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-besteffort + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + name: appcat-vshn-nextcloud-office-besteffort-cloud + name: appcat-vshn-nextcloud-office-besteffort-cloud + namespace: syn-appcat +spec: + failedJobsHistoryLimit: 3 + jobTemplate: + metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-besteffort + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + cron-job-name: appcat-vshn-nextcloud-office-besteffort-cloud + spec: + template: + metadata: + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + spec: + containers: + - args: + - appuio-reporting report --timerange 1h --begin=$(date -d "now -3 + hours" -u +"%Y-%m-%dT%H:00:00Z") --repeat-until=$(date -u +"%Y-%m-%dT%H:00:00Z") + command: + - sh + - -c + env: + - name: AR_ODOO_OAUTH_TOKEN_URL + valueFrom: + secretKeyRef: + key: token_endpoint + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_ID + valueFrom: + secretKeyRef: + key: client_id + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_SECRET + valueFrom: + secretKeyRef: + key: client_secret + name: odoo-credentials + - name: AR_ODOO_URL + value: https://test.central.vshn.ch/api/v2/product_usage_report_POST + - name: AR_PROM_URL + value: http://prometheus-operated.prometheus-system:9090/prometheus + - name: AR_ORG_ID + value: appuio-cloud-metering-c-appuio-cloudscale-lpg-2|appuio-cloud-metering-c-appuio-exoscale-ch-gva-2-0 + - name: AR_PRODUCT_ID + value: appcat-vshn-nextcloud-office-besteffort + - name: AR_QUERY + value: sum_over_time(appcat:metering{label_appuio_io_billing_name="appcat-nextcloud-office",label_appcat_vshn_io_sla="besteffort", + tenant_name="APPUiO"}[59m:1m])/60 * on(label_appuio_io_organization) + group_left(sales_order) label_replace(appuio_control_organization_info{namespace="appuio-control-api-production"}, + "label_appuio_io_organization", "$1", "organization", "(.*)") + - name: AR_INSTANCE_JSONNET + value: local labels = std.extVar("labels"); "%(cluster_id)s/%(label_appcat_vshn_io_claim_namespace)s/%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_ITEM_GROUP_DESCRIPTION_JSONNET + value: 'local labels = std.extVar("labels"); "APPUiO Cloud - Zone: / + Namespace: %(label_appcat_vshn_io_claim_namespace)s" % labels' + - name: AR_ITEM_DESCRIPTION_JSONNET + value: local labels = std.extVar("labels"); "%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_UNIT_ID + value: uom_uom_45_1e112771 + image: ghcr.io/appuio/appuio-reporting:v0.2.1 + name: backfill + resources: {} + initContainers: [] + restartPolicy: OnFailure + schedule: 30 * * * * + startingDeadlineSeconds: 180 + successfulJobsHistoryLimit: 1 +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-guaranteed + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + name: appcat-vshn-nextcloud-office-guaranteed-cloud + name: appcat-vshn-nextcloud-office-guaranteed-cloud + namespace: syn-appcat +spec: + failedJobsHistoryLimit: 3 + jobTemplate: + metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-guaranteed + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + cron-job-name: appcat-vshn-nextcloud-office-guaranteed-cloud + spec: + template: + metadata: + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + spec: + containers: + - args: + - appuio-reporting report --timerange 1h --begin=$(date -d "now -3 + hours" -u +"%Y-%m-%dT%H:00:00Z") --repeat-until=$(date -u +"%Y-%m-%dT%H:00:00Z") + command: + - sh + - -c + env: + - name: AR_ODOO_OAUTH_TOKEN_URL + valueFrom: + secretKeyRef: + key: token_endpoint + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_ID + valueFrom: + secretKeyRef: + key: client_id + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_SECRET + valueFrom: + secretKeyRef: + key: client_secret + name: odoo-credentials + - name: AR_ODOO_URL + value: https://test.central.vshn.ch/api/v2/product_usage_report_POST + - name: AR_PROM_URL + value: http://prometheus-operated.prometheus-system:9090/prometheus + - name: AR_ORG_ID + value: appuio-cloud-metering-c-appuio-cloudscale-lpg-2|appuio-cloud-metering-c-appuio-exoscale-ch-gva-2-0 + - name: AR_PRODUCT_ID + value: appcat-vshn-nextcloud-office-guaranteed + - name: AR_QUERY + value: sum_over_time(appcat:metering{label_appuio_io_billing_name="appcat-nextcloud-office",label_appcat_vshn_io_sla="guaranteed", + tenant_name="APPUiO"}[59m:1m])/60 * on(label_appuio_io_organization) + group_left(sales_order) label_replace(appuio_control_organization_info{namespace="appuio-control-api-production"}, + "label_appuio_io_organization", "$1", "organization", "(.*)") + - name: AR_INSTANCE_JSONNET + value: local labels = std.extVar("labels"); "%(cluster_id)s/%(label_appcat_vshn_io_claim_namespace)s/%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_ITEM_GROUP_DESCRIPTION_JSONNET + value: 'local labels = std.extVar("labels"); "APPUiO Cloud - Zone: / + Namespace: %(label_appcat_vshn_io_claim_namespace)s" % labels' + - name: AR_ITEM_DESCRIPTION_JSONNET + value: local labels = std.extVar("labels"); "%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_UNIT_ID + value: uom_uom_45_1e112771 + image: ghcr.io/appuio/appuio-reporting:v0.2.1 + name: backfill + resources: {} + initContainers: [] + restartPolicy: OnFailure + schedule: 30 * * * * + startingDeadlineSeconds: 180 + successfulJobsHistoryLimit: 1 +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-besteffort + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + name: appcat-vshn-nextcloud-office-besteffort-managed + name: appcat-vshn-nextcloud-office-besteffort-managed + namespace: syn-appcat +spec: + failedJobsHistoryLimit: 3 + jobTemplate: + metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-besteffort + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + cron-job-name: appcat-vshn-nextcloud-office-besteffort-managed + spec: + template: + metadata: + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + spec: + containers: + - args: + - appuio-reporting report --timerange 1h --begin=$(date -d "now -3 + hours" -u +"%Y-%m-%dT%H:00:00Z") --repeat-until=$(date -u +"%Y-%m-%dT%H:00:00Z") + command: + - sh + - -c + env: + - name: AR_ODOO_OAUTH_TOKEN_URL + valueFrom: + secretKeyRef: + key: token_endpoint + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_ID + valueFrom: + secretKeyRef: + key: client_id + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_SECRET + valueFrom: + secretKeyRef: + key: client_secret + name: odoo-credentials + - name: AR_ODOO_URL + value: https://test.central.vshn.ch/api/v2/product_usage_report_POST + - name: AR_PROM_URL + value: http://prometheus-operated.prometheus-system:9090/prometheus + - name: AR_ORG_ID + value: appuio-managed-openshift-billing + - name: AR_PRODUCT_ID + value: appcat-vshn-nextcloud-office-besteffort + - name: AR_QUERY + value: sum_over_time(appcat:metering{label_appuio_io_billing_name="appcat-nextcloud-office",label_appcat_vshn_io_sla="besteffort", + tenant_name!="APPUiO"}[59m:1m])/60 + - name: AR_INSTANCE_JSONNET + value: local labels = std.extVar("labels"); "%(cluster_id)s/%(label_appcat_vshn_io_claim_namespace)s/%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_ITEM_GROUP_DESCRIPTION_JSONNET + value: 'local labels = std.extVar("labels"); "APPUiO Managed - Cluster: + kind / Namespace: %(label_appcat_vshn_io_claim_namespace)s" % + labels' + - name: AR_ITEM_DESCRIPTION_JSONNET + value: local labels = std.extVar("labels"); "%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_UNIT_ID + value: uom_uom_45_1e112771 + image: ghcr.io/appuio/appuio-reporting:v0.2.1 + name: backfill + resources: {} + initContainers: [] + restartPolicy: OnFailure + schedule: 30 * * * * + startingDeadlineSeconds: 180 + successfulJobsHistoryLimit: 1 +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-guaranteed + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + name: appcat-vshn-nextcloud-office-guaranteed-managed + name: appcat-vshn-nextcloud-office-guaranteed-managed + namespace: syn-appcat +spec: + failedJobsHistoryLimit: 3 + jobTemplate: + metadata: + annotations: + product-id: appcat-vshn-nextcloud-office-guaranteed + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + cron-job-name: appcat-vshn-nextcloud-office-guaranteed-managed + spec: + template: + metadata: + labels: + app.kubernetes.io/managed-by: commodore + app.kubernetes.io/name: appuio-reporting + app.kubernetes.io/part-of: syn + spec: + containers: + - args: + - appuio-reporting report --timerange 1h --begin=$(date -d "now -3 + hours" -u +"%Y-%m-%dT%H:00:00Z") --repeat-until=$(date -u +"%Y-%m-%dT%H:00:00Z") + command: + - sh + - -c + env: + - name: AR_ODOO_OAUTH_TOKEN_URL + valueFrom: + secretKeyRef: + key: token_endpoint + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_ID + valueFrom: + secretKeyRef: + key: client_id + name: odoo-credentials + - name: AR_ODOO_OAUTH_CLIENT_SECRET + valueFrom: + secretKeyRef: + key: client_secret + name: odoo-credentials + - name: AR_ODOO_URL + value: https://test.central.vshn.ch/api/v2/product_usage_report_POST + - name: AR_PROM_URL + value: http://prometheus-operated.prometheus-system:9090/prometheus + - name: AR_ORG_ID + value: appuio-managed-openshift-billing + - name: AR_PRODUCT_ID + value: appcat-vshn-nextcloud-office-guaranteed + - name: AR_QUERY + value: sum_over_time(appcat:metering{label_appuio_io_billing_name="appcat-nextcloud-office",label_appcat_vshn_io_sla="guaranteed", + tenant_name!="APPUiO"}[59m:1m])/60 + - name: AR_INSTANCE_JSONNET + value: local labels = std.extVar("labels"); "%(cluster_id)s/%(label_appcat_vshn_io_claim_namespace)s/%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_ITEM_GROUP_DESCRIPTION_JSONNET + value: 'local labels = std.extVar("labels"); "APPUiO Managed - Cluster: + kind / Namespace: %(label_appcat_vshn_io_claim_namespace)s" % + labels' + - name: AR_ITEM_DESCRIPTION_JSONNET + value: local labels = std.extVar("labels"); "%(label_appcat_vshn_io_claim_name)s" + % labels + - name: AR_UNIT_ID + value: uom_uom_45_1e112771 + image: ghcr.io/appuio/appuio-reporting:v0.2.1 + name: backfill + resources: {} + initContainers: [] + restartPolicy: OnFailure + schedule: 30 * * * * + startingDeadlineSeconds: 180 + successfulJobsHistoryLimit: 1 diff --git a/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/30_deployment.yaml b/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/30_deployment.yaml index 2354a3a7f..d5857f39b 100644 --- a/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/30_deployment.yaml @@ -23,7 +23,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: httpGet: path: /healthz diff --git a/tests/golden/vshn-managed/appcat/appcat/sla_reporter/01_cronjob.yaml b/tests/golden/vshn-managed/appcat/appcat/sla_reporter/01_cronjob.yaml index c20545ab8..33a79dbe3 100644 --- a/tests/golden/vshn-managed/appcat/appcat/sla_reporter/01_cronjob.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/sla_reporter/01_cronjob.yaml @@ -30,7 +30,7 @@ spec: envFrom: - secretRef: name: appcat-sla-reports-creds - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 name: sla-reporter resources: limits: diff --git a/tests/golden/vshn-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/tests/golden/vshn-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 75f925ba0..c74bca460 100644 --- a/tests/golden/vshn-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -36,7 +36,7 @@ spec: value: 'true' - name: APPCAT_SLI_VSHNMARIADB value: 'true' - image: ghcr.io/vshn/appcat:v4.114.0 + image: ghcr.io/vshn/appcat:v4.116.0 livenessProbe: httpGet: path: /healthz