From 10dd886d97c637fe580234aaf2cbe888e40ec9ed Mon Sep 17 00:00:00 2001 From: Simon Beck Date: Thu, 4 Jan 2024 16:05:15 +0100 Subject: [PATCH] Remove connection secret --- component/class/defaults.yml | 2 +- component/component/vshn_redis.jsonnet | 80 --- .../appcat/appcat/10_function_appcat.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- .../controllers/appcat/30_deployment.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- .../appcat/21_composition_vshn_minio.yaml | 2 +- .../controllers/appcat/30_deployment.yaml | 2 +- .../appcat/sla_reporter/01_cronjob.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- .../appcat/appcat/10_function_appcat.yaml | 2 +- .../appcat/21_composition_vshn_mariadb.yaml | 2 +- .../appcat/21_composition_vshn_postgres.yaml | 2 +- .../21_composition_vshn_postgresrestore.yaml | 2 +- .../appcat/21_composition_vshn_redis.yaml | 157 +----- .../appcat/appcat/billing/10_odoo_secret.yaml | 17 - .../appcat/appcat/billing/11_backfill.yaml | 521 ------------------ .../vshn/appcat/appcat/billing/50_alerts.yaml | 29 - .../controllers/appcat/30_deployment.yaml | 2 +- .../appcat/sla_reporter/01_cronjob.yaml | 2 +- ...appcat-sliexporter-controller-manager.yaml | 2 +- component/tests/vshn.yml | 2 +- package/main.yaml | 2 +- 37 files changed, 33 insertions(+), 835 deletions(-) delete mode 100644 component/tests/golden/vshn/appcat/appcat/billing/10_odoo_secret.yaml delete mode 100644 component/tests/golden/vshn/appcat/appcat/billing/11_backfill.yaml delete mode 100644 component/tests/golden/vshn/appcat/appcat/billing/50_alerts.yaml diff --git a/component/class/defaults.yml b/component/class/defaults.yml index b484ec2be..7d51c2d45 100644 --- a/component/class/defaults.yml +++ b/component/class/defaults.yml @@ -42,7 +42,7 @@ parameters: appcat: registry: ghcr.io repository: vshn/appcat - tag: v4.45.2 + tag: v4.46.0 apiserver: registry: ghcr.io repository: vshn/appcat-apiserver diff --git a/component/component/vshn_redis.jsonnet b/component/component/vshn_redis.jsonnet index 71a5fdc2c..97bf9ec4e 100644 --- a/component/component/vshn_redis.jsonnet +++ b/component/component/vshn_redis.jsonnet @@ -251,68 +251,6 @@ local composition = }, }, }; - local secret = comp.KubeObject('v1', 'Secret') + - { - spec+: { - forProvider+: { - manifest+: { - metadata: {}, - stringData: { - REDIS_USERNAME: defaultUser, - REDIS_PORT: defaultPort, - REDIS_HOST: '', - }, - }, - }, - references: [ - { - patchesFrom: { - apiVersion: 'v1', - kind: 'Secret', - namespace: '', - name: 'redis', - fieldPath: 'data.redis-password', - }, - toFieldPath: 'data.REDIS_PASSWORD', - }, - { - patchesFrom: { - apiVersion: 'v1', - kind: 'Secret', - name: clientCertificateSecretName, - namespace: '', - fieldPath: 'data[ca.crt]', - }, - toFieldPath: 'data[ca.crt]', - }, - { - patchesFrom: { - apiVersion: 'v1', - kind: 'Secret', - name: clientCertificateSecretName, - namespace: '', - fieldPath: 'data[tls.crt]', - }, - toFieldPath: 'data[tls.crt]', - }, - { - patchesFrom: { - apiVersion: 'v1', - kind: 'Secret', - name: clientCertificateSecretName, - namespace: '', - fieldPath: 'data[tls.key]', - }, - toFieldPath: 'data[tls.key]', - }, - ], - // Make crossplane aware of the connection secret we are creating in this object - writeConnectionSecretToRef: { - name: 'redis', - namespace: '', - }, - }, - }; local prometheusRule = prom.GeneratePrometheusNonSLORules('redis', 'redis', []) + { patches: [ @@ -505,24 +443,6 @@ local composition = comp.CombineCompositeFromOneFieldPath('metadata.labels[crossplane.io/composite]', 'spec.forProvider.manifest.spec.dnsNames[1]', 'redis-headless.vshn-redis-%s.svc'), ], }, - { - name: 'connection', - base: secret, - connectionDetails: comp.conn.AllFromSecretKeys(connectionSecretKeys), - patches: [ - comp.FromCompositeFieldPathWithTransformSuffix('metadata.labels[crossplane.io/composite]', 'metadata.name', 'connection'), - comp.FromCompositeFieldPathWithTransformPrefix('metadata.labels[crossplane.io/composite]', 'spec.forProvider.manifest.metadata.namespace', 'vshn-redis'), - comp.FromCompositeFieldPathWithTransformSuffix('metadata.labels[crossplane.io/composite]', 'spec.forProvider.manifest.metadata.name', 'connection'), - - comp.CombineCompositeFromOneFieldPath('metadata.labels[crossplane.io/composite]', 'spec.forProvider.manifest.stringData.REDIS_HOST', 'redis-headless.vshn-redis-%s.svc.cluster.local'), - comp.FromCompositeFieldPathWithTransformPrefix('metadata.labels[crossplane.io/composite]', 'spec.references[0].patchesFrom.namespace', 'vshn-redis'), - comp.FromCompositeFieldPathWithTransformPrefix('metadata.labels[crossplane.io/composite]', 'spec.references[1].patchesFrom.namespace', 'vshn-redis'), - comp.FromCompositeFieldPathWithTransformPrefix('metadata.labels[crossplane.io/composite]', 'spec.references[2].patchesFrom.namespace', 'vshn-redis'), - comp.FromCompositeFieldPathWithTransformPrefix('metadata.labels[crossplane.io/composite]', 'spec.references[3].patchesFrom.namespace', 'vshn-redis'), - comp.FromCompositeFieldPathWithTransformPrefix('metadata.labels[crossplane.io/composite]', 'spec.writeConnectionSecretToRef.namespace', 'vshn-redis'), - comp.FromCompositeFieldPathWithTransformSuffix('metadata.labels[crossplane.io/composite]', 'spec.writeConnectionSecretToRef.name', 'connection'), - ], - }, { name: 'release', base: redisHelmChart, diff --git a/component/tests/golden/apiserver/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/apiserver/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/apiserver/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/apiserver/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/component/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 0426cb296..73d49a3e8 100644 --- a/component/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/component/tests/golden/cloudscale-metrics-collector-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "false" - name: APPCAT_SLI_VSHNREDIS value: "false" - image: ghcr.io/vshn/appcat:v4.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/component/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 0426cb296..73d49a3e8 100644 --- a/component/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/component/tests/golden/cloudscale-metrics-collector-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "false" - name: APPCAT_SLI_VSHNREDIS value: "false" - image: ghcr.io/vshn/appcat:v4.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/golden/cloudscale/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/cloudscale/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/cloudscale/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/cloudscale/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/controllers/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/controllers/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/controllers/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/controllers/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/controllers/appcat/appcat/controllers/appcat/30_deployment.yaml b/component/tests/golden/controllers/appcat/appcat/controllers/appcat/30_deployment.yaml index b17400d04..169ab4c3b 100644 --- a/component/tests/golden/controllers/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/component/tests/golden/controllers/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.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/component/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 0426cb296..73d49a3e8 100644 --- a/component/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/component/tests/golden/defaults/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "false" - name: APPCAT_SLI_VSHNREDIS value: "false" - image: ghcr.io/vshn/appcat:v4.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 0426cb296..73d49a3e8 100644 --- a/component/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/component/tests/golden/exoscale-metrics-collector-cloud/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "false" - name: APPCAT_SLI_VSHNREDIS value: "false" - image: ghcr.io/vshn/appcat:v4.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/component/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 0426cb296..73d49a3e8 100644 --- a/component/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/component/tests/golden/exoscale-metrics-collector-managed/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "false" - name: APPCAT_SLI_VSHNREDIS value: "false" - image: ghcr.io/vshn/appcat:v4.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/golden/exoscale/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/exoscale/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/exoscale/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/exoscale/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/minio/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/minio/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/minio/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/minio/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/minio/appcat/appcat/21_composition_vshn_minio.yaml b/component/tests/golden/minio/appcat/appcat/21_composition_vshn_minio.yaml index c57dfefcb..d9c6e092a 100644 --- a/component/tests/golden/minio/appcat/appcat/21_composition_vshn_minio.yaml +++ b/component/tests/golden/minio/appcat/appcat/21_composition_vshn_minio.yaml @@ -28,7 +28,7 @@ spec: data: controlNamespace: syn-appcat-control defaultPlan: standard-1 - imageTag: v4.45.2 + imageTag: v4.46.0 maintenanceSA: helm-based-service-maintenance minioChartRepository: https://charts.min.io minioChartVersion: 5.0.13 diff --git a/component/tests/golden/minio/appcat/appcat/controllers/appcat/30_deployment.yaml b/component/tests/golden/minio/appcat/appcat/controllers/appcat/30_deployment.yaml index b17400d04..169ab4c3b 100644 --- a/component/tests/golden/minio/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/component/tests/golden/minio/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.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/golden/minio/appcat/appcat/sla_reporter/01_cronjob.yaml b/component/tests/golden/minio/appcat/appcat/sla_reporter/01_cronjob.yaml index 216391939..55536dc15 100644 --- a/component/tests/golden/minio/appcat/appcat/sla_reporter/01_cronjob.yaml +++ b/component/tests/golden/minio/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.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 name: sla-reporter resources: limits: diff --git a/component/tests/golden/minio/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/component/tests/golden/minio/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 0426cb296..73d49a3e8 100644 --- a/component/tests/golden/minio/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/component/tests/golden/minio/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "false" - name: APPCAT_SLI_VSHNREDIS value: "false" - image: ghcr.io/vshn/appcat:v4.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/golden/openshift/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/openshift/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/openshift/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/openshift/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/openshift/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/component/tests/golden/openshift/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 0426cb296..73d49a3e8 100644 --- a/component/tests/golden/openshift/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/component/tests/golden/openshift/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "false" - name: APPCAT_SLI_VSHNREDIS value: "false" - image: ghcr.io/vshn/appcat:v4.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/golden/vshn/appcat/appcat/10_function_appcat.yaml b/component/tests/golden/vshn/appcat/appcat/10_function_appcat.yaml index f0455d6bb..718834ab5 100644 --- a/component/tests/golden/vshn/appcat/appcat/10_function_appcat.yaml +++ b/component/tests/golden/vshn/appcat/appcat/10_function_appcat.yaml @@ -3,6 +3,6 @@ kind: Function metadata: name: function-appcat spec: - package: ghcr.io/vshn/appcat:v4.45.2-func + package: ghcr.io/vshn/appcat:v4.46.0-func runtimeConfigRef: name: function-appcat diff --git a/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_mariadb.yaml b/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_mariadb.yaml index bd3a33721..e588436aa 100644 --- a/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_mariadb.yaml +++ b/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_mariadb.yaml @@ -31,7 +31,7 @@ spec: chartRepository: https://charts.bitnami.com/bitnami chartVersion: 10.1.3 controlNamespace: syn-appcat-control - imageTag: v4.45.2 + imageTag: v4.46.0 isOpenshift: 'false' maintenanceSA: helm-based-service-maintenance plans: '{"standard-1": {"size": {"cpu": "250m", "disk": "16Gi", "enabled": diff --git a/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgres.yaml b/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgres.yaml index 2e63e8a01..81bdb73f1 100644 --- a/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgres.yaml +++ b/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgres.yaml @@ -1016,7 +1016,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: myuser@example.com externalDatabaseConnectionsEnabled: 'true' - imageTag: v4.45.2 + imageTag: v4.46.0 quotasEnabled: 'false' serviceName: postgresql sgNamespace: stackgres diff --git a/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgresrestore.yaml b/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgresrestore.yaml index faa6a095e..5f3a29fae 100644 --- a/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgresrestore.yaml +++ b/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_postgresrestore.yaml @@ -1118,7 +1118,7 @@ spec: emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: myuser@example.com externalDatabaseConnectionsEnabled: 'true' - imageTag: v4.45.2 + imageTag: v4.46.0 quotasEnabled: 'false' serviceName: postgresql sgNamespace: stackgres diff --git a/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_redis.yaml b/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_redis.yaml index e77cd35e6..767451b57 100644 --- a/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_redis.yaml +++ b/component/tests/golden/vshn/appcat/appcat/21_composition_vshn_redis.yaml @@ -479,161 +479,6 @@ spec: - fromFieldPath: metadata.labels[crossplane.io/composite] toFieldPath: spec.forProvider.manifest.spec.dnsNames[1] type: CombineFromComposite - - base: - apiVersion: kubernetes.crossplane.io/v1alpha1 - kind: Object - metadata: {} - spec: - forProvider: - manifest: - apiVersion: v1 - kind: Secret - metadata: {} - stringData: - REDIS_HOST: '' - REDIS_PORT: '6379' - REDIS_USERNAME: default - providerConfigRef: - name: kubernetes - references: - - patchesFrom: - apiVersion: v1 - fieldPath: data.redis-password - kind: Secret - name: redis - namespace: '' - toFieldPath: data.REDIS_PASSWORD - - patchesFrom: - apiVersion: v1 - fieldPath: data[ca.crt] - kind: Secret - name: tls-client-certificate - namespace: '' - toFieldPath: data[ca.crt] - - patchesFrom: - apiVersion: v1 - fieldPath: data[tls.crt] - kind: Secret - name: tls-client-certificate - namespace: '' - toFieldPath: data[tls.crt] - - patchesFrom: - apiVersion: v1 - fieldPath: data[tls.key] - kind: Secret - name: tls-client-certificate - namespace: '' - toFieldPath: data[tls.key] - writeConnectionSecretToRef: - name: redis - namespace: '' - connectionDetails: - - fromConnectionSecretKey: ca.crt - name: ca.crt - type: FromConnectionSecretKey - - fromConnectionSecretKey: tls.crt - name: tls.crt - type: FromConnectionSecretKey - - fromConnectionSecretKey: tls.key - name: tls.key - type: FromConnectionSecretKey - - fromConnectionSecretKey: REDIS_HOST - name: REDIS_HOST - type: FromConnectionSecretKey - - fromConnectionSecretKey: REDIS_PORT - name: REDIS_PORT - type: FromConnectionSecretKey - - fromConnectionSecretKey: REDIS_USERNAME - name: REDIS_USERNAME - type: FromConnectionSecretKey - - fromConnectionSecretKey: REDIS_PASSWORD - name: REDIS_PASSWORD - type: FromConnectionSecretKey - - fromConnectionSecretKey: REDIS_URL - name: REDIS_URL - type: FromConnectionSecretKey - name: connection - patches: - - fromFieldPath: metadata.labels[crossplane.io/composite] - toFieldPath: metadata.name - transforms: - - string: - fmt: '%s-connection' - type: Format - type: string - type: FromCompositeFieldPath - - fromFieldPath: metadata.labels[crossplane.io/composite] - toFieldPath: spec.forProvider.manifest.metadata.namespace - transforms: - - string: - fmt: vshn-redis-%s - type: Format - type: string - type: FromCompositeFieldPath - - fromFieldPath: metadata.labels[crossplane.io/composite] - toFieldPath: spec.forProvider.manifest.metadata.name - transforms: - - string: - fmt: '%s-connection' - type: Format - type: string - type: FromCompositeFieldPath - - combine: - strategy: string - string: - fmt: redis-headless.vshn-redis-%s.svc.cluster.local - variables: - - fromFieldPath: metadata.labels[crossplane.io/composite] - toFieldPath: spec.forProvider.manifest.stringData.REDIS_HOST - type: CombineFromComposite - - fromFieldPath: metadata.labels[crossplane.io/composite] - toFieldPath: spec.references[0].patchesFrom.namespace - transforms: - - string: - fmt: vshn-redis-%s - type: Format - type: string - type: FromCompositeFieldPath - - fromFieldPath: metadata.labels[crossplane.io/composite] - toFieldPath: spec.references[1].patchesFrom.namespace - transforms: - - string: - fmt: vshn-redis-%s - type: Format - type: string - type: FromCompositeFieldPath - - fromFieldPath: metadata.labels[crossplane.io/composite] - toFieldPath: spec.references[2].patchesFrom.namespace - transforms: - - string: - fmt: vshn-redis-%s - type: Format - type: string - type: FromCompositeFieldPath - - fromFieldPath: metadata.labels[crossplane.io/composite] - toFieldPath: spec.references[3].patchesFrom.namespace - transforms: - - string: - fmt: vshn-redis-%s - type: Format - type: string - type: FromCompositeFieldPath - - fromFieldPath: metadata.labels[crossplane.io/composite] - toFieldPath: spec.writeConnectionSecretToRef.namespace - transforms: - - string: - fmt: vshn-redis-%s - type: Format - type: string - type: FromCompositeFieldPath - - fromFieldPath: metadata.labels[crossplane.io/composite] - toFieldPath: spec.writeConnectionSecretToRef.name - transforms: - - string: - fmt: '%s-connection' - type: Format - type: string - type: FromCompositeFieldPath - base: apiVersion: helm.crossplane.io/v1beta1 kind: Release @@ -861,7 +706,7 @@ spec: emailAlertingSmtpFromAddress: myuser@example.com emailAlertingSmtpHost: smtp.eu.mailgun.org:465 emailAlertingSmtpUsername: myuser@example.com - imageTag: v4.45.2 + imageTag: v4.46.0 maintenanceSA: helm-based-service-maintenance quotasEnabled: 'false' restoreSA: redisrestoreserviceaccount diff --git a/component/tests/golden/vshn/appcat/appcat/billing/10_odoo_secret.yaml b/component/tests/golden/vshn/appcat/appcat/billing/10_odoo_secret.yaml deleted file mode 100644 index 3a68e3287..000000000 --- a/component/tests/golden/vshn/appcat/appcat/billing/10_odoo_secret.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -data: {} -kind: Secret -metadata: - annotations: {} - labels: - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: appuio-reporting - app.kubernetes.io/part-of: syn - name: odoo-credentials - name: odoo-credentials - namespace: syn-appcat -stringData: - client_id: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-id - client_secret: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-secret - token_endpoint: https://test.central.vshn.ch/api/v2/authentication/oauth2/token -type: Opaque diff --git a/component/tests/golden/vshn/appcat/appcat/billing/11_backfill.yaml b/component/tests/golden/vshn/appcat/appcat/billing/11_backfill.yaml deleted file mode 100644 index 603ecbfc8..000000000 --- a/component/tests/golden/vshn/appcat/appcat/billing/11_backfill.yaml +++ /dev/null @@ -1,521 +0,0 @@ -apiVersion: batch/v1 -kind: CronJob -metadata: - annotations: - product-id: appcat-vshn-minio-besteffort - labels: - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: appuio-reporting - app.kubernetes.io/part-of: syn - name: appcat-vshn-minio-besteffort-cloud - name: appcat-vshn-minio-besteffort-cloud - namespace: syn-appcat -spec: - failedJobsHistoryLimit: 10 - jobTemplate: - metadata: - annotations: - product-id: appcat-vshn-minio-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-minio-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-minio-besteffort - - name: AR_QUERY - value: appcat:metering{label_appuio_io_billing_name="appcat-minio",label_appcat_vshn_io_sla="besteffort"} - * 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: 3 ---- -apiVersion: batch/v1 -kind: CronJob -metadata: - annotations: - product-id: appcat-vshn-minio-guaranteed - labels: - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: appuio-reporting - app.kubernetes.io/part-of: syn - name: appcat-vshn-minio-guaranteed-cloud - name: appcat-vshn-minio-guaranteed-cloud - namespace: syn-appcat -spec: - failedJobsHistoryLimit: 10 - jobTemplate: - metadata: - annotations: - product-id: appcat-vshn-minio-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-minio-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-minio-guaranteed - - name: AR_QUERY - value: appcat:metering{label_appuio_io_billing_name="appcat-minio",label_appcat_vshn_io_sla="guaranteed"} - * 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: 3 ---- -apiVersion: batch/v1 -kind: CronJob -metadata: - annotations: - product-id: appcat-vshn-postgres-besteffort - labels: - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: appuio-reporting - app.kubernetes.io/part-of: syn - name: appcat-vshn-postgres-besteffort-cloud - name: appcat-vshn-postgres-besteffort-cloud - namespace: syn-appcat -spec: - failedJobsHistoryLimit: 10 - jobTemplate: - metadata: - annotations: - product-id: appcat-vshn-postgres-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-postgres-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-postgres-besteffort - - name: AR_QUERY - value: appcat:metering{label_appuio_io_billing_name="appcat-postgresql",label_appcat_vshn_io_sla="besteffort"} - * 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: 3 ---- -apiVersion: batch/v1 -kind: CronJob -metadata: - annotations: - product-id: appcat-vshn-postgres-guaranteed - labels: - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: appuio-reporting - app.kubernetes.io/part-of: syn - name: appcat-vshn-postgres-guaranteed-cloud - name: appcat-vshn-postgres-guaranteed-cloud - namespace: syn-appcat -spec: - failedJobsHistoryLimit: 10 - jobTemplate: - metadata: - annotations: - product-id: appcat-vshn-postgres-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-postgres-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-postgres-guaranteed - - name: AR_QUERY - value: appcat:metering{label_appuio_io_billing_name="appcat-postgresql",label_appcat_vshn_io_sla="guaranteed"} - * 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: 3 ---- -apiVersion: batch/v1 -kind: CronJob -metadata: - annotations: - product-id: appcat-vshn-redis-besteffort - labels: - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: appuio-reporting - app.kubernetes.io/part-of: syn - name: appcat-vshn-redis-besteffort-cloud - name: appcat-vshn-redis-besteffort-cloud - namespace: syn-appcat -spec: - failedJobsHistoryLimit: 10 - jobTemplate: - metadata: - annotations: - product-id: appcat-vshn-redis-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-redis-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-redis-besteffort - - name: AR_QUERY - value: appcat:metering{label_appuio_io_billing_name="appcat-redis",label_appcat_vshn_io_sla="besteffort"} - * 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: 3 ---- -apiVersion: batch/v1 -kind: CronJob -metadata: - annotations: - product-id: appcat-vshn-redis-guaranteed - labels: - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: appuio-reporting - app.kubernetes.io/part-of: syn - name: appcat-vshn-redis-guaranteed-cloud - name: appcat-vshn-redis-guaranteed-cloud - namespace: syn-appcat -spec: - failedJobsHistoryLimit: 10 - jobTemplate: - metadata: - annotations: - product-id: appcat-vshn-redis-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-redis-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-redis-guaranteed - - name: AR_QUERY - value: appcat:metering{label_appuio_io_billing_name="appcat-redis",label_appcat_vshn_io_sla="guaranteed"} - * 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: 3 diff --git a/component/tests/golden/vshn/appcat/appcat/billing/50_alerts.yaml b/component/tests/golden/vshn/appcat/appcat/billing/50_alerts.yaml deleted file mode 100644 index 8e1013c5a..000000000 --- a/component/tests/golden/vshn/appcat/appcat/billing/50_alerts.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - annotations: {} - labels: - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: appuio-reporting - app.kubernetes.io/part-of: syn - name: appuio-reporting - name: appuio-reporting - namespace: syn-appcat -spec: - groups: - - name: appuio-reporting.alerts - rules: - - alert: AppCatReportingDatabaseBackfillingFailed - annotations: - description: AppCat Reporting backfilling metrics into Odoo failed - message: AppCat Reporting backfilling metrics into Odoo failed. - runbook_url: https://hub.syn.tools/appcat/runbooks/vshn-billing.html#AppCatReportingDatabaseBackfillingFailed - summary: AppCat Reporting backfilling metrics into Odoo failed. - expr: | - kube_job_failed{job="kube-state-metrics",namespace="syn-appcat",job_name=~"appcat-.*"} > 0 - for: 10m - labels: - severity: warning - syn: 'true' - syn_component: appuio-reporting - syn_team: schedar diff --git a/component/tests/golden/vshn/appcat/appcat/controllers/appcat/30_deployment.yaml b/component/tests/golden/vshn/appcat/appcat/controllers/appcat/30_deployment.yaml index b17400d04..169ab4c3b 100644 --- a/component/tests/golden/vshn/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/component/tests/golden/vshn/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.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/golden/vshn/appcat/appcat/sla_reporter/01_cronjob.yaml b/component/tests/golden/vshn/appcat/appcat/sla_reporter/01_cronjob.yaml index 7677fd6b9..0c8101cc4 100644 --- a/component/tests/golden/vshn/appcat/appcat/sla_reporter/01_cronjob.yaml +++ b/component/tests/golden/vshn/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.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 name: sla-reporter resources: limits: diff --git a/component/tests/golden/vshn/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/component/tests/golden/vshn/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 7b2b0e8ce..126a683fb 100644 --- a/component/tests/golden/vshn/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/component/tests/golden/vshn/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -28,7 +28,7 @@ spec: value: "true" - name: APPCAT_SLI_VSHNREDIS value: "true" - image: ghcr.io/vshn/appcat:v4.45.2 + image: ghcr.io/vshn/appcat:v4.46.0 livenessProbe: httpGet: path: /healthz diff --git a/component/tests/vshn.yml b/component/tests/vshn.yml index 9018a1b97..17c1864a2 100644 --- a/component/tests/vshn.yml +++ b/component/tests/vshn.yml @@ -21,7 +21,7 @@ parameters: billing: salesOrder: ST10120 vshn: - enableCronjobs: true + enableCronjobs: false meteringRules: true enableMockOrgInfo: true instanceUOM: uom_uom_45_1e112771 diff --git a/package/main.yaml b/package/main.yaml index 574f2cb1f..f2b24917d 100644 --- a/package/main.yaml +++ b/package/main.yaml @@ -7,7 +7,7 @@ parameters: image: registry: ghcr.io repository: vshn/appcat - tag: v4.45.2 + tag: v4.46.0 components: appcat: url: https://github.com/vshn/component-appcat.git