diff --git a/class/defaults.yml b/class/defaults.yml index 13bd8bb98..6b6ec585f 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -72,7 +72,7 @@ parameters: appcat: registry: ghcr.io repository: vshn/appcat - tag: 8af486767f62151ab7290018fb289f92d4d5e95a + tag: extended-billing functionAppcat: registry: ${appcat:images:appcat:registry} repository: ${appcat:images:appcat:repository} @@ -399,6 +399,7 @@ parameters: odooClientID: ${appcat:billing:odoo:oauth:clientID} odooClientSecret: ${appcat:billing:odoo:oauth:clientSecret} odooTokenURL: ${appcat:billing:odoo:oauth:url} + maxEventsPerProduct: 100 monitoring: crossplane_label_mapping: ${appcat:monitoring:crossplane:label_mapping} crossplane_extra_resources: ${appcat:monitoring:crossplane:extra_resources} diff --git a/component/appcat_controller.jsonnet b/component/appcat_controller.jsonnet index 623840b7e..eb2cee244 100644 --- a/component/appcat_controller.jsonnet +++ b/component/appcat_controller.jsonnet @@ -83,6 +83,10 @@ local mergedEnv = com.envList(controllersParams.extraEnv) + std.prune([ name: 'ODOO_TOKEN_URL', value: controllersParams.billing.odooTokenURL, }, + { + name: 'BILLING_MAX_EVENTS_PRODUCT', + value: std.toString(controllersParams.billing.maxEventsPerProduct), + }, ] else [] + if controllersParams.monitoringEnabled then [ { name: 'CROSSPLANE_LABEL_MAPPING', 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 4623136b6..ec5433dda 100644 --- a/tests/golden/control-plane/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/control-plane/appcat/appcat/10_function_appcat.yaml @@ -4,9 +4,9 @@ metadata: annotations: argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true argocd.argoproj.io/sync-wave: '-40' - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing spec: - package: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a-func + package: ghcr.io/vshn/appcat:extended-billing-func packagePullPolicy: IfNotPresent runtimeConfigRef: name: function-appcat diff --git a/tests/golden/control-plane/appcat/appcat/21_composition_objectstorage_minio.yaml b/tests/golden/control-plane/appcat/appcat/21_composition_objectstorage_minio.yaml index d6854650b..5ec26c5cb 100644 --- a/tests/golden/control-plane/appcat/appcat/21_composition_objectstorage_minio.yaml +++ b/tests/golden/control-plane/appcat/appcat/21_composition_objectstorage_minio.yaml @@ -21,7 +21,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: diff --git a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_codey.yaml b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_codey.yaml index 0da557308..1d3252649 100644 --- a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_codey.yaml +++ b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_codey.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-codey name: codey.io name: codey.io diff --git a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_forgejo.yaml b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_forgejo.yaml index e812b6298..c5e30d52f 100644 --- a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_forgejo.yaml +++ b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_forgejo.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-forgejo name: vshnforgejo.vshn.appcat.vshn.io name: vshnforgejo.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -48,7 +48,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: code.forgejo.org - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing ingress_annotations: | cert-manager.io/cluster-issuer: letsencrypt-production isOpenshift: 'false' 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 02b406639..16860ace2 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-keycloak name: vshnkeycloak.vshn.appcat.vshn.io name: vshnkeycloak.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -49,7 +49,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: docker-registry.inventage.com:10121/keycloak-competence-center/keycloak-managed - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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 d3fb2ecd0..f64f8975a 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-mariadb name: vshnmariadb.vshn.appcat.vshn.io name: vshnmariadb.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -48,7 +48,7 @@ spec: ignoreNamespaceForBilling: vshn-test imageRegistry: docker.io imageRepositoryPrefix: bitnamilegacy - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'false' maintenanceSA: helm-based-service-maintenance maintenanceURL: https://hub.docker.com/v2/repositories/bitnamilegacy/mariadb-galera/tags/?page_size=100 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 858569730..89a74033b 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-nextcloud name: vshnnextcloud.vshn.appcat.vshn.io name: vshnnextcloud.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -55,7 +55,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: docker.io - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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 358575522..f933a04bc 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 @@ -15,7 +15,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-postgresql name: vshnpostgres.vshn.appcat.vshn.io name: vshnpostgres.vshn.appcat.vshn.io @@ -26,7 +26,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -51,7 +51,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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_postgrescnpg.yaml b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_postgrescnpg.yaml index 0a20c34d8..5b7372717 100644 --- a/tests/golden/control-plane/appcat/appcat/21_composition_vshn_postgrescnpg.yaml +++ b/tests/golden/control-plane/appcat/appcat/21_composition_vshn_postgrescnpg.yaml @@ -15,7 +15,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-postgresql name: vshnpostgrescnpg.vshn.appcat.vshn.io name: vshnpostgrescnpg.vshn.appcat.vshn.io @@ -26,7 +26,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -51,7 +51,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'false' kubectl_image: docker.io/bitnamilegacy/kubectl:1.25.15 loadbalancerAnnotations: | 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 efaf02e67..31a8a1063 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 @@ -17,7 +17,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-redis name: vshnredis.vshn.appcat.vshn.io name: vshnredis.vshn.appcat.vshn.io @@ -28,7 +28,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -52,7 +52,7 @@ spec: ignoreNamespaceForBilling: vshn-test imageRegistry: ghcr.io imageRepositoryPrefix: vshn - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'false' kubectl_image: docker.io/bitnamilegacy/kubectl:1.25.15 maintenanceSA: helm-based-service-maintenance 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 a16d9d974..8b12164fb 100644 --- a/tests/golden/control-plane/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/control-plane/appcat/appcat/apiserver/30_deployment.yaml @@ -31,7 +31,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:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 3 diff --git a/tests/golden/control-plane/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml b/tests/golden/control-plane/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml index 9c7d784f0..0cfa2c477 100644 --- a/tests/golden/control-plane/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml +++ b/tests/golden/control-plane/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml @@ -69,28 +69,54 @@ spec: description: ItemGroupDescription describes the billing item group type: string + items: + description: |- + Items defines list of billable products for this instance + Each item represents a product with independent lifecycle and event tracking + items: + description: ItemSpec defines a single billable product/item + properties: + description: + description: Description is a human-readable description + of this product + type: string + maxEvents: + default: 100 + description: MaxEvents defines maximum events to retain + for THIS product + type: integer + productID: + description: ProductID identifies the product in the billing + system + maxLength: 100 + minLength: 1 + type: string + unit: + description: Unit defines the billing unit type for this + product + type: string + value: + description: |- + Value represents the billable metric for this product + Can be: replica count, disk size (e.g., "50Gi"), percentage, etc. + type: string + required: + - productID + - value + type: object + minItems: 1 + type: array organization: description: Organization used to identify sales order type: string - productID: - description: ProductID identifies the product in the billing - system - type: string salesOrderID: description: SalesOrderID identifies the sales order in Odoo type: string - size: - description: Size represents the size of the service instance - type: string - unitID: - description: UnitID defines the billing unit type in Odoo - type: string required: - instanceID - itemDescription - itemGroupDescription - - productID - - unitID + - items type: object type: object status: @@ -175,10 +201,6 @@ spec: description: RetryCount tracks the number of retry attempts for failed events type: integer - size: - description: Size represents the size/plan at the time of - the event - type: string state: description: State represents the current state of the event (sent, pending, failed, superseded) @@ -187,6 +209,7 @@ spec: - pending - failed - superseded + - resend type: string timestamp: description: Timestamp when the event occurred @@ -200,12 +223,17 @@ spec: - deleted - scaled type: string + value: + description: |- + Value represents the billable metric at the time of the event + Generic field supporting replica count, disk size, percentages, etc. + type: string required: - productId - - size - state - timestamp - type + - value type: object type: array type: object diff --git a/tests/golden/control-plane/appcat/appcat/controllers/appcat/10_cluster_role.yaml b/tests/golden/control-plane/appcat/appcat/controllers/appcat/10_cluster_role.yaml index 58e982533..978b1c109 100644 --- a/tests/golden/control-plane/appcat/appcat/controllers/appcat/10_cluster_role.yaml +++ b/tests/golden/control-plane/appcat/appcat/controllers/appcat/10_cluster_role.yaml @@ -127,18 +127,9 @@ rules: - xvshnpostgresqls/status - xvshnredis - xvshnredis/status - - xobjectbuckets verbs: - get - list - patch - update - watch - - apiGroups: - - apiextensions.crossplane.io - resources: - - compositeresourcedefinitions - verbs: - - get - - list - - watch 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 59826757a..53b6f8da5 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 @@ -29,7 +29,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: httpGet: diff --git a/tests/golden/control-plane/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml b/tests/golden/control-plane/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml index cc41f23dc..a5fdc2ee9 100644 --- a/tests/golden/control-plane/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml +++ b/tests/golden/control-plane/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane app.kubernetes.io/component: cloud-infrastructure-controller diff --git a/tests/golden/control-plane/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml b/tests/golden/control-plane/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml index e1a0cd11a..f7cce287a 100644 --- a/tests/golden/control-plane/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml +++ b/tests/golden/control-plane/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane-rbac-manager app.kubernetes.io/component: cloud-infrastructure-controller 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 dec265836..1d4c025d7 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:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing name: sla-reporter resources: limits: diff --git a/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml b/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml index 4623136b6..ec5433dda 100644 --- a/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/defaults/appcat/appcat/10_function_appcat.yaml @@ -4,9 +4,9 @@ metadata: annotations: argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true argocd.argoproj.io/sync-wave: '-40' - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing spec: - package: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a-func + package: ghcr.io/vshn/appcat:extended-billing-func packagePullPolicy: IfNotPresent 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 53e8805e0..9d97c6339 100644 --- a/tests/golden/defaults/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/defaults/appcat/appcat/apiserver/30_deployment.yaml @@ -31,7 +31,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:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 3 diff --git a/tests/golden/defaults/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml b/tests/golden/defaults/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml index cc41f23dc..a5fdc2ee9 100644 --- a/tests/golden/defaults/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml +++ b/tests/golden/defaults/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane app.kubernetes.io/component: cloud-infrastructure-controller diff --git a/tests/golden/defaults/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml b/tests/golden/defaults/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml index e1a0cd11a..f7cce287a 100644 --- a/tests/golden/defaults/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml +++ b/tests/golden/defaults/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane-rbac-manager app.kubernetes.io/component: cloud-infrastructure-controller 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 7725f6ca2..030a87a38 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 @@ -25,7 +25,7 @@ spec: - --health-probe-bind-address=:8081 - --metrics-bind-address=127.0.0.1:8080 env: [] - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: httpGet: diff --git a/tests/golden/dev/appcat/appcat/10_function_appcat.yaml b/tests/golden/dev/appcat/appcat/10_function_appcat.yaml index 4626166d8..96b8ae656 100644 --- a/tests/golden/dev/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/dev/appcat/appcat/10_function_appcat.yaml @@ -4,9 +4,9 @@ metadata: annotations: argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true argocd.argoproj.io/sync-wave: '-40' - name: function-appcat-debug-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-debug-extended-billing spec: - package: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a-func + package: ghcr.io/vshn/appcat:extended-billing-func packagePullPolicy: Always runtimeConfigRef: name: enable-proxy diff --git a/tests/golden/dev/appcat/appcat/21_composition_objectstorage_minio.yaml b/tests/golden/dev/appcat/appcat/21_composition_objectstorage_minio.yaml index 7478b5688..79f319dae 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_objectstorage_minio.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_objectstorage_minio.yaml @@ -21,7 +21,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-debug-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-debug-extended-billing input: apiVersion: v1 data: diff --git a/tests/golden/dev/appcat/appcat/21_composition_vshn_codey.yaml b/tests/golden/dev/appcat/appcat/21_composition_vshn_codey.yaml index eb6b0b79e..49baeb27d 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_codey.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_codey.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: lpg labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: debug-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: debug-extended-billing metadata.appcat.vshn.io/serviceID: vshn-codey name: codey.io name: codey.io diff --git a/tests/golden/dev/appcat/appcat/21_composition_vshn_forgejo.yaml b/tests/golden/dev/appcat/appcat/21_composition_vshn_forgejo.yaml index 33cf10408..47a958270 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_forgejo.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_forgejo.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: lpg labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: debug-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: debug-extended-billing metadata.appcat.vshn.io/serviceID: vshn-forgejo name: vshnforgejo.vshn.appcat.vshn.io name: vshnforgejo.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-debug-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-debug-extended-billing input: apiVersion: v1 data: @@ -48,7 +48,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: code.forgejo.org - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing ingress_annotations: | cert-manager.io/cluster-issuer: letsencrypt-production isOpenshift: 'false' 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 8b471c135..98557d5ef 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_keycloak.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_keycloak.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: lpg labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: debug-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: debug-extended-billing metadata.appcat.vshn.io/serviceID: vshn-keycloak name: vshnkeycloak.vshn.appcat.vshn.io name: vshnkeycloak.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-debug-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-debug-extended-billing input: apiVersion: v1 data: @@ -49,7 +49,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: docker-registry.inventage.com:10121/keycloak-competence-center/keycloak-managed - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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 41037220d..9e99effb3 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_mariadb.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_mariadb.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: lpg labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: debug-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: debug-extended-billing metadata.appcat.vshn.io/serviceID: vshn-mariadb name: vshnmariadb.vshn.appcat.vshn.io name: vshnmariadb.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-debug-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-debug-extended-billing input: apiVersion: v1 data: @@ -48,7 +48,7 @@ spec: ignoreNamespaceForBilling: vshn-test imageRegistry: docker.io imageRepositoryPrefix: bitnamilegacy - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'false' maintenanceSA: helm-based-service-maintenance maintenanceURL: https://hub.docker.com/v2/repositories/bitnamilegacy/mariadb-galera/tags/?page_size=100 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 a93b75686..b249dcfc4 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_nextcloud.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_nextcloud.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: lpg labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: debug-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: debug-extended-billing metadata.appcat.vshn.io/serviceID: vshn-nextcloud name: vshnnextcloud.vshn.appcat.vshn.io name: vshnnextcloud.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-debug-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-debug-extended-billing input: apiVersion: v1 data: @@ -55,7 +55,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: dockerhub.vshn.net - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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 907c9ee0e..28148f26c 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_postgres.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_postgres.yaml @@ -15,7 +15,7 @@ metadata: metadata.appcat.vshn.io/zone: lpg labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: debug-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: debug-extended-billing metadata.appcat.vshn.io/serviceID: vshn-postgresql name: vshnpostgres.vshn.appcat.vshn.io name: vshnpostgres.vshn.appcat.vshn.io @@ -26,7 +26,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-debug-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-debug-extended-billing input: apiVersion: v1 data: @@ -51,7 +51,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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_postgrescnpg.yaml b/tests/golden/dev/appcat/appcat/21_composition_vshn_postgrescnpg.yaml index 798e3878d..a9977fba2 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_postgrescnpg.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_postgrescnpg.yaml @@ -15,7 +15,7 @@ metadata: metadata.appcat.vshn.io/zone: lpg labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: debug-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: debug-extended-billing metadata.appcat.vshn.io/serviceID: vshn-postgresql name: vshnpostgrescnpg.vshn.appcat.vshn.io name: vshnpostgrescnpg.vshn.appcat.vshn.io @@ -26,7 +26,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-debug-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-debug-extended-billing input: apiVersion: v1 data: @@ -51,7 +51,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'false' kubectl_image: docker.io/bitnamilegacy/kubectl:1.25.15 loadbalancerAnnotations: | 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 e725ccea2..c37728672 100644 --- a/tests/golden/dev/appcat/appcat/21_composition_vshn_redis.yaml +++ b/tests/golden/dev/appcat/appcat/21_composition_vshn_redis.yaml @@ -17,7 +17,7 @@ metadata: metadata.appcat.vshn.io/zone: lpg labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: debug-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: debug-extended-billing metadata.appcat.vshn.io/serviceID: vshn-redis name: vshnredis.vshn.appcat.vshn.io name: vshnredis.vshn.appcat.vshn.io @@ -28,7 +28,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-debug-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-debug-extended-billing input: apiVersion: v1 data: @@ -52,7 +52,7 @@ spec: ignoreNamespaceForBilling: vshn-test imageRegistry: ghcr.io imageRepositoryPrefix: vshn - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'false' kubectl_image: docker.io/bitnamilegacy/kubectl:1.25.15 maintenanceSA: helm-based-service-maintenance diff --git a/tests/golden/dev/appcat/appcat/apiserver/30_deployment.yaml b/tests/golden/dev/appcat/appcat/apiserver/30_deployment.yaml index 10752929f..71f7d44e2 100644 --- a/tests/golden/dev/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/dev/appcat/appcat/apiserver/30_deployment.yaml @@ -31,7 +31,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:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: Always livenessProbe: failureThreshold: 3 diff --git a/tests/golden/dev/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml b/tests/golden/dev/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml index 9c7d784f0..0cfa2c477 100644 --- a/tests/golden/dev/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml +++ b/tests/golden/dev/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml @@ -69,28 +69,54 @@ spec: description: ItemGroupDescription describes the billing item group type: string + items: + description: |- + Items defines list of billable products for this instance + Each item represents a product with independent lifecycle and event tracking + items: + description: ItemSpec defines a single billable product/item + properties: + description: + description: Description is a human-readable description + of this product + type: string + maxEvents: + default: 100 + description: MaxEvents defines maximum events to retain + for THIS product + type: integer + productID: + description: ProductID identifies the product in the billing + system + maxLength: 100 + minLength: 1 + type: string + unit: + description: Unit defines the billing unit type for this + product + type: string + value: + description: |- + Value represents the billable metric for this product + Can be: replica count, disk size (e.g., "50Gi"), percentage, etc. + type: string + required: + - productID + - value + type: object + minItems: 1 + type: array organization: description: Organization used to identify sales order type: string - productID: - description: ProductID identifies the product in the billing - system - type: string salesOrderID: description: SalesOrderID identifies the sales order in Odoo type: string - size: - description: Size represents the size of the service instance - type: string - unitID: - description: UnitID defines the billing unit type in Odoo - type: string required: - instanceID - itemDescription - itemGroupDescription - - productID - - unitID + - items type: object type: object status: @@ -175,10 +201,6 @@ spec: description: RetryCount tracks the number of retry attempts for failed events type: integer - size: - description: Size represents the size/plan at the time of - the event - type: string state: description: State represents the current state of the event (sent, pending, failed, superseded) @@ -187,6 +209,7 @@ spec: - pending - failed - superseded + - resend type: string timestamp: description: Timestamp when the event occurred @@ -200,12 +223,17 @@ spec: - deleted - scaled type: string + value: + description: |- + Value represents the billable metric at the time of the event + Generic field supporting replica count, disk size, percentages, etc. + type: string required: - productId - - size - state - timestamp - type + - value type: object type: array type: object diff --git a/tests/golden/dev/appcat/appcat/controllers/appcat/10_cluster_role.yaml b/tests/golden/dev/appcat/appcat/controllers/appcat/10_cluster_role.yaml index 58e982533..978b1c109 100644 --- a/tests/golden/dev/appcat/appcat/controllers/appcat/10_cluster_role.yaml +++ b/tests/golden/dev/appcat/appcat/controllers/appcat/10_cluster_role.yaml @@ -127,18 +127,9 @@ rules: - xvshnpostgresqls/status - xvshnredis - xvshnredis/status - - xobjectbuckets verbs: - get - list - patch - update - watch - - apiGroups: - - apiextensions.crossplane.io - resources: - - compositeresourcedefinitions - verbs: - - get - - list - - watch 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 f7bf246f7..6d8263094 100644 --- a/tests/golden/dev/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/tests/golden/dev/appcat/appcat/controllers/appcat/30_deployment.yaml @@ -38,7 +38,7 @@ spec: } - name: CROSSPLANE_EXTRA_RESOURCES value: '' - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: Always livenessProbe: httpGet: diff --git a/tests/golden/dev/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml b/tests/golden/dev/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml index 1a8cf7ff9..1279ef567 100644 --- a/tests/golden/dev/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml +++ b/tests/golden/dev/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane app.kubernetes.io/component: cloud-infrastructure-controller diff --git a/tests/golden/dev/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml b/tests/golden/dev/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml index f2e0146f6..1fab94ec2 100644 --- a/tests/golden/dev/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml +++ b/tests/golden/dev/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane-rbac-manager app.kubernetes.io/component: cloud-infrastructure-controller 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 dec265836..1d4c025d7 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:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing 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 5dfd0381e..5cf22a4be 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 @@ -25,7 +25,7 @@ spec: - --health-probe-bind-address=:8081 - --metrics-bind-address=127.0.0.1:8080 env: [] - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: Always livenessProbe: httpGet: diff --git a/tests/golden/exodev/appcat/appcat/10_function_appcat.yaml b/tests/golden/exodev/appcat/appcat/10_function_appcat.yaml index 4623136b6..ec5433dda 100644 --- a/tests/golden/exodev/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/exodev/appcat/appcat/10_function_appcat.yaml @@ -4,9 +4,9 @@ metadata: annotations: argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true argocd.argoproj.io/sync-wave: '-40' - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing spec: - package: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a-func + package: ghcr.io/vshn/appcat:extended-billing-func packagePullPolicy: IfNotPresent runtimeConfigRef: name: function-appcat diff --git a/tests/golden/exodev/appcat/appcat/21_composition_objectstorage_exoscale.yaml b/tests/golden/exodev/appcat/appcat/21_composition_objectstorage_exoscale.yaml index 1e9d8e6f3..c45f52849 100644 --- a/tests/golden/exodev/appcat/appcat/21_composition_objectstorage_exoscale.yaml +++ b/tests/golden/exodev/appcat/appcat/21_composition_objectstorage_exoscale.yaml @@ -22,7 +22,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: diff --git a/tests/golden/exodev/appcat/appcat/apiserver/30_deployment.yaml b/tests/golden/exodev/appcat/appcat/apiserver/30_deployment.yaml index d5800871e..182110bfc 100644 --- a/tests/golden/exodev/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/exodev/appcat/appcat/apiserver/30_deployment.yaml @@ -31,7 +31,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:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 3 diff --git a/tests/golden/exodev/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml b/tests/golden/exodev/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml index 9c7d784f0..0cfa2c477 100644 --- a/tests/golden/exodev/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml +++ b/tests/golden/exodev/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml @@ -69,28 +69,54 @@ spec: description: ItemGroupDescription describes the billing item group type: string + items: + description: |- + Items defines list of billable products for this instance + Each item represents a product with independent lifecycle and event tracking + items: + description: ItemSpec defines a single billable product/item + properties: + description: + description: Description is a human-readable description + of this product + type: string + maxEvents: + default: 100 + description: MaxEvents defines maximum events to retain + for THIS product + type: integer + productID: + description: ProductID identifies the product in the billing + system + maxLength: 100 + minLength: 1 + type: string + unit: + description: Unit defines the billing unit type for this + product + type: string + value: + description: |- + Value represents the billable metric for this product + Can be: replica count, disk size (e.g., "50Gi"), percentage, etc. + type: string + required: + - productID + - value + type: object + minItems: 1 + type: array organization: description: Organization used to identify sales order type: string - productID: - description: ProductID identifies the product in the billing - system - type: string salesOrderID: description: SalesOrderID identifies the sales order in Odoo type: string - size: - description: Size represents the size of the service instance - type: string - unitID: - description: UnitID defines the billing unit type in Odoo - type: string required: - instanceID - itemDescription - itemGroupDescription - - productID - - unitID + - items type: object type: object status: @@ -175,10 +201,6 @@ spec: description: RetryCount tracks the number of retry attempts for failed events type: integer - size: - description: Size represents the size/plan at the time of - the event - type: string state: description: State represents the current state of the event (sent, pending, failed, superseded) @@ -187,6 +209,7 @@ spec: - pending - failed - superseded + - resend type: string timestamp: description: Timestamp when the event occurred @@ -200,12 +223,17 @@ spec: - deleted - scaled type: string + value: + description: |- + Value represents the billable metric at the time of the event + Generic field supporting replica count, disk size, percentages, etc. + type: string required: - productId - - size - state - timestamp - type + - value type: object type: array type: object diff --git a/tests/golden/exodev/appcat/appcat/controllers/appcat/10_cluster_role.yaml b/tests/golden/exodev/appcat/appcat/controllers/appcat/10_cluster_role.yaml index 58e982533..978b1c109 100644 --- a/tests/golden/exodev/appcat/appcat/controllers/appcat/10_cluster_role.yaml +++ b/tests/golden/exodev/appcat/appcat/controllers/appcat/10_cluster_role.yaml @@ -127,18 +127,9 @@ rules: - xvshnpostgresqls/status - xvshnredis - xvshnredis/status - - xobjectbuckets verbs: - get - list - patch - update - watch - - apiGroups: - - apiextensions.crossplane.io - resources: - - compositeresourcedefinitions - verbs: - - get - - list - - watch diff --git a/tests/golden/exodev/appcat/appcat/controllers/appcat/30_deployment.yaml b/tests/golden/exodev/appcat/appcat/controllers/appcat/30_deployment.yaml index f02b847bf..868bcd33d 100644 --- a/tests/golden/exodev/appcat/appcat/controllers/appcat/30_deployment.yaml +++ b/tests/golden/exodev/appcat/appcat/controllers/appcat/30_deployment.yaml @@ -29,7 +29,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: httpGet: diff --git a/tests/golden/exodev/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml b/tests/golden/exodev/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml index cc41f23dc..a5fdc2ee9 100644 --- a/tests/golden/exodev/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml +++ b/tests/golden/exodev/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane app.kubernetes.io/component: cloud-infrastructure-controller diff --git a/tests/golden/exodev/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml b/tests/golden/exodev/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml index e1a0cd11a..f7cce287a 100644 --- a/tests/golden/exodev/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml +++ b/tests/golden/exodev/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane-rbac-manager app.kubernetes.io/component: cloud-infrastructure-controller diff --git a/tests/golden/exodev/appcat/appcat/sla_reporter/01_cronjob.yaml b/tests/golden/exodev/appcat/appcat/sla_reporter/01_cronjob.yaml index dec265836..1d4c025d7 100644 --- a/tests/golden/exodev/appcat/appcat/sla_reporter/01_cronjob.yaml +++ b/tests/golden/exodev/appcat/appcat/sla_reporter/01_cronjob.yaml @@ -30,7 +30,7 @@ spec: envFrom: - secretRef: name: appcat-sla-reports-creds - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing name: sla-reporter resources: limits: diff --git a/tests/golden/service-cluster/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml b/tests/golden/service-cluster/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml index 9c7d784f0..0cfa2c477 100644 --- a/tests/golden/service-cluster/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml +++ b/tests/golden/service-cluster/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml @@ -69,28 +69,54 @@ spec: description: ItemGroupDescription describes the billing item group type: string + items: + description: |- + Items defines list of billable products for this instance + Each item represents a product with independent lifecycle and event tracking + items: + description: ItemSpec defines a single billable product/item + properties: + description: + description: Description is a human-readable description + of this product + type: string + maxEvents: + default: 100 + description: MaxEvents defines maximum events to retain + for THIS product + type: integer + productID: + description: ProductID identifies the product in the billing + system + maxLength: 100 + minLength: 1 + type: string + unit: + description: Unit defines the billing unit type for this + product + type: string + value: + description: |- + Value represents the billable metric for this product + Can be: replica count, disk size (e.g., "50Gi"), percentage, etc. + type: string + required: + - productID + - value + type: object + minItems: 1 + type: array organization: description: Organization used to identify sales order type: string - productID: - description: ProductID identifies the product in the billing - system - type: string salesOrderID: description: SalesOrderID identifies the sales order in Odoo type: string - size: - description: Size represents the size of the service instance - type: string - unitID: - description: UnitID defines the billing unit type in Odoo - type: string required: - instanceID - itemDescription - itemGroupDescription - - productID - - unitID + - items type: object type: object status: @@ -175,10 +201,6 @@ spec: description: RetryCount tracks the number of retry attempts for failed events type: integer - size: - description: Size represents the size/plan at the time of - the event - type: string state: description: State represents the current state of the event (sent, pending, failed, superseded) @@ -187,6 +209,7 @@ spec: - pending - failed - superseded + - resend type: string timestamp: description: Timestamp when the event occurred @@ -200,12 +223,17 @@ spec: - deleted - scaled type: string + value: + description: |- + Value represents the billable metric at the time of the event + Generic field supporting replica count, disk size, percentages, etc. + type: string required: - productId - - size - state - timestamp - type + - value type: object type: array type: object diff --git a/tests/golden/service-cluster/appcat/appcat/controllers/appcat/10_cluster_role.yaml b/tests/golden/service-cluster/appcat/appcat/controllers/appcat/10_cluster_role.yaml index 58e982533..978b1c109 100644 --- a/tests/golden/service-cluster/appcat/appcat/controllers/appcat/10_cluster_role.yaml +++ b/tests/golden/service-cluster/appcat/appcat/controllers/appcat/10_cluster_role.yaml @@ -127,18 +127,9 @@ rules: - xvshnpostgresqls/status - xvshnredis - xvshnredis/status - - xobjectbuckets verbs: - get - list - patch - update - watch - - apiGroups: - - apiextensions.crossplane.io - resources: - - compositeresourcedefinitions - verbs: - - get - - list - - watch 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 8590262bc..feaf8c26b 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 @@ -34,7 +34,7 @@ spec: value: syn-appcat - name: CONTROL_PLANE_KUBECONFIG value: /config/config - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: httpGet: diff --git a/tests/golden/service-cluster/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml b/tests/golden/service-cluster/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml index 8b6032c5e..1263f6429 100644 --- a/tests/golden/service-cluster/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml +++ b/tests/golden/service-cluster/appcat/appcat/sli_exporter/apps_v1_deployment_appcat-sliexporter-controller-manager.yaml @@ -27,7 +27,7 @@ spec: env: - name: KUBECONFIG value: /.kube/config - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: httpGet: 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 4623136b6..ec5433dda 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/10_function_appcat.yaml @@ -4,9 +4,9 @@ metadata: annotations: argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true argocd.argoproj.io/sync-wave: '-40' - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing spec: - package: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a-func + package: ghcr.io/vshn/appcat:extended-billing-func packagePullPolicy: IfNotPresent runtimeConfigRef: name: function-appcat diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_cloudscale.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_cloudscale.yaml index 265aea47c..c48def719 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_cloudscale.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_cloudscale.yaml @@ -21,7 +21,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_exoscale.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_exoscale.yaml index 1e9d8e6f3..c45f52849 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_exoscale.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_exoscale.yaml @@ -22,7 +22,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_minio.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_minio.yaml index d6854650b..5ec26c5cb 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_minio.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_objectstorage_minio.yaml @@ -21,7 +21,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_codey.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_codey.yaml index 0da557308..1d3252649 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_codey.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_codey.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-codey name: codey.io name: codey.io diff --git a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_forgejo.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_forgejo.yaml index 3e434e349..8c3d6adfb 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_forgejo.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_forgejo.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-forgejo name: vshnforgejo.vshn.appcat.vshn.io name: vshnforgejo.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -48,7 +48,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: code.forgejo.org - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing ingress_annotations: | cert-manager.io/cluster-issuer: letsencrypt-production isOpenshift: 'true' 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 9e3ed82fd..35601adcf 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-keycloak name: vshnkeycloak.vshn.appcat.vshn.io name: vshnkeycloak.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -49,7 +49,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: docker-registry.inventage.com:10121/keycloak-competence-center/keycloak-managed - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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 514b94cc8..292c215a5 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-mariadb name: vshnmariadb.vshn.appcat.vshn.io name: vshnmariadb.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -48,7 +48,7 @@ spec: ignoreNamespaceForBilling: vshn-test imageRegistry: dockerhub.vshn.net imageRepositoryPrefix: bitnamilegacy - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'true' maintenanceSA: helm-based-service-maintenance maintenanceURL: https://hub.docker.com/v2/repositories/bitnamilegacy/mariadb-galera/tags/?page_size=100 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 6c3a92aae..96efc6784 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'false' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-minio name: vshnminio.vshn.appcat.vshn.io name: vshnminio.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -47,7 +47,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: dockerhub.vshn.net/ - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'true' maintenanceSA: helm-based-service-maintenance maintenanceURL: https://hub.docker.com/v2/repositories/minio/minio/tags/?page_size=100 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 22918b5bb..8f8df61c2 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-nextcloud name: vshnnextcloud.vshn.appcat.vshn.io name: vshnnextcloud.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -55,7 +55,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: dockerhub.vshn.net - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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 148e095df..49b8afe7a 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 @@ -15,7 +15,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-postgresql name: vshnpostgres.vshn.appcat.vshn.io name: vshnpostgres.vshn.appcat.vshn.io @@ -26,7 +26,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -51,7 +51,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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_postgrescnpg.yaml b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_postgrescnpg.yaml index c2da61b66..8ddf514c6 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_postgrescnpg.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/21_composition_vshn_postgrescnpg.yaml @@ -15,7 +15,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-postgresql name: vshnpostgrescnpg.vshn.appcat.vshn.io name: vshnpostgrescnpg.vshn.appcat.vshn.io @@ -26,7 +26,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -51,7 +51,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'true' kubectl_image: docker.io/bitnamilegacy/kubectl:1.25.15 loadbalancerAnnotations: | 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 e5b4442bb..2ed52283e 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 @@ -17,7 +17,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-redis name: vshnredis.vshn.appcat.vshn.io name: vshnredis.vshn.appcat.vshn.io @@ -28,7 +28,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -52,7 +52,7 @@ spec: ignoreNamespaceForBilling: vshn-test imageRegistry: dockerhub.vshn.net imageRepositoryPrefix: vshn - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'true' kubectl_image: docker.io/bitnamilegacy/kubectl:1.25.15 maintenanceSA: helm-based-service-maintenance 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 6796424b0..48f17f667 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/apiserver/30_deployment.yaml @@ -31,7 +31,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:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 3 diff --git a/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml b/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml index 9c7d784f0..0cfa2c477 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml @@ -69,28 +69,54 @@ spec: description: ItemGroupDescription describes the billing item group type: string + items: + description: |- + Items defines list of billable products for this instance + Each item represents a product with independent lifecycle and event tracking + items: + description: ItemSpec defines a single billable product/item + properties: + description: + description: Description is a human-readable description + of this product + type: string + maxEvents: + default: 100 + description: MaxEvents defines maximum events to retain + for THIS product + type: integer + productID: + description: ProductID identifies the product in the billing + system + maxLength: 100 + minLength: 1 + type: string + unit: + description: Unit defines the billing unit type for this + product + type: string + value: + description: |- + Value represents the billable metric for this product + Can be: replica count, disk size (e.g., "50Gi"), percentage, etc. + type: string + required: + - productID + - value + type: object + minItems: 1 + type: array organization: description: Organization used to identify sales order type: string - productID: - description: ProductID identifies the product in the billing - system - type: string salesOrderID: description: SalesOrderID identifies the sales order in Odoo type: string - size: - description: Size represents the size of the service instance - type: string - unitID: - description: UnitID defines the billing unit type in Odoo - type: string required: - instanceID - itemDescription - itemGroupDescription - - productID - - unitID + - items type: object type: object status: @@ -175,10 +201,6 @@ spec: description: RetryCount tracks the number of retry attempts for failed events type: integer - size: - description: Size represents the size/plan at the time of - the event - type: string state: description: State represents the current state of the event (sent, pending, failed, superseded) @@ -187,6 +209,7 @@ spec: - pending - failed - superseded + - resend type: string timestamp: description: Timestamp when the event occurred @@ -200,12 +223,17 @@ spec: - deleted - scaled type: string + value: + description: |- + Value represents the billable metric at the time of the event + Generic field supporting replica count, disk size, percentages, etc. + type: string required: - productId - - size - state - timestamp - type + - value type: object type: array type: object diff --git a/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/10_cluster_role.yaml b/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/10_cluster_role.yaml index 58e982533..978b1c109 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/10_cluster_role.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/controllers/appcat/10_cluster_role.yaml @@ -127,18 +127,9 @@ rules: - xvshnpostgresqls/status - xvshnredis - xvshnredis/status - - xobjectbuckets verbs: - get - list - patch - update - watch - - apiGroups: - - apiextensions.crossplane.io - resources: - - compositeresourcedefinitions - verbs: - - get - - list - - watch 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 95a732708..305c06b9f 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 @@ -29,7 +29,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: httpGet: diff --git a/tests/golden/vshn-cloud/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml b/tests/golden/vshn-cloud/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml index 352c66d35..9a323386f 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane app.kubernetes.io/component: cloud-infrastructure-controller diff --git a/tests/golden/vshn-cloud/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml b/tests/golden/vshn-cloud/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml index b70f960a9..ea10af976 100644 --- a/tests/golden/vshn-cloud/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml +++ b/tests/golden/vshn-cloud/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane-rbac-manager app.kubernetes.io/component: cloud-infrastructure-controller 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 dec265836..1d4c025d7 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:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing 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 7725f6ca2..030a87a38 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 @@ -25,7 +25,7 @@ spec: - --health-probe-bind-address=:8081 - --metrics-bind-address=127.0.0.1:8080 env: [] - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: httpGet: 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 4623136b6..ec5433dda 100644 --- a/tests/golden/vshn-managed/appcat/appcat/10_function_appcat.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/10_function_appcat.yaml @@ -4,9 +4,9 @@ metadata: annotations: argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true argocd.argoproj.io/sync-wave: '-40' - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing spec: - package: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a-func + package: ghcr.io/vshn/appcat:extended-billing-func packagePullPolicy: IfNotPresent runtimeConfigRef: name: function-appcat diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_cloudscale.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_cloudscale.yaml index 265aea47c..c48def719 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_cloudscale.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_cloudscale.yaml @@ -21,7 +21,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_exoscale.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_exoscale.yaml index 1e9d8e6f3..c45f52849 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_exoscale.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_exoscale.yaml @@ -22,7 +22,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_minio.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_minio.yaml index d6854650b..5ec26c5cb 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_minio.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_objectstorage_minio.yaml @@ -21,7 +21,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_codey.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_codey.yaml index 0da557308..1d3252649 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_codey.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_codey.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-codey name: codey.io name: codey.io diff --git a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_forgejo.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_forgejo.yaml index e353e91a4..eb04901ea 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_forgejo.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_forgejo.yaml @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-forgejo name: vshnforgejo.vshn.appcat.vshn.io name: vshnforgejo.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -48,7 +48,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: code.forgejo.org - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing ingress_annotations: | cert-manager.io/cluster-issuer: letsencrypt-production isOpenshift: 'true' 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 e39699e86..efd735217 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-keycloak name: vshnkeycloak.vshn.appcat.vshn.io name: vshnkeycloak.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -49,7 +49,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: docker-registry.inventage.com:10121/keycloak-competence-center/keycloak-managed - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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 3edbb30b2..5ee8f2604 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-mariadb name: vshnmariadb.vshn.appcat.vshn.io name: vshnmariadb.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -48,7 +48,7 @@ spec: ignoreNamespaceForBilling: vshn-test imageRegistry: docker.io imageRepositoryPrefix: bitnamilegacy - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'true' maintenanceSA: helm-based-service-maintenance maintenanceURL: https://hub.docker.com/v2/repositories/bitnamilegacy/mariadb-galera/tags/?page_size=100 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 da5d06d68..c37ab9213 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'false' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-minio name: vshnminio.vshn.appcat.vshn.io name: vshnminio.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -47,7 +47,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: '' - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'true' maintenanceSA: helm-based-service-maintenance maintenanceURL: https://hub.docker.com/v2/repositories/minio/minio/tags/?page_size=100 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 6e755ee29..d58592035 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 @@ -13,7 +13,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-nextcloud name: vshnnextcloud.vshn.appcat.vshn.io name: vshnnextcloud.vshn.appcat.vshn.io @@ -24,7 +24,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -55,7 +55,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud ignoreNamespaceForBilling: vshn-test imageRegistry: docker.io - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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 d344a91b4..251b65ef1 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 @@ -15,7 +15,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-postgresql name: vshnpostgres.vshn.appcat.vshn.io name: vshnpostgres.vshn.appcat.vshn.io @@ -26,7 +26,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -51,7 +51,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing 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_postgrescnpg.yaml b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_postgrescnpg.yaml index 78d0cb0c1..a0b663260 100644 --- a/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_postgrescnpg.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/21_composition_vshn_postgrescnpg.yaml @@ -15,7 +15,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-postgresql name: vshnpostgrescnpg.vshn.appcat.vshn.io name: vshnpostgrescnpg.vshn.appcat.vshn.io @@ -26,7 +26,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -51,7 +51,7 @@ spec: emailAlertingSmtpUsername: appcat@appuio.cloud externalDatabaseConnectionsEnabled: 'true' ignoreNamespaceForBilling: vshn-test - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'true' kubectl_image: docker.io/bitnamilegacy/kubectl:1.25.15 loadbalancerAnnotations: | 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 43679f483..77f06eed5 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 @@ -17,7 +17,7 @@ metadata: metadata.appcat.vshn.io/zone: rma1 labels: metadata.appcat.vshn.io/offered: 'true' - metadata.appcat.vshn.io/revision: master-8af486767f62151ab7290018fb289f92d4d5e95a + metadata.appcat.vshn.io/revision: master-extended-billing metadata.appcat.vshn.io/serviceID: vshn-redis name: vshnredis.vshn.appcat.vshn.io name: vshnredis.vshn.appcat.vshn.io @@ -28,7 +28,7 @@ spec: mode: Pipeline pipeline: - functionRef: - name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a + name: function-appcat-master-extended-billing input: apiVersion: v1 data: @@ -52,7 +52,7 @@ spec: ignoreNamespaceForBilling: vshn-test imageRegistry: ghcr.io imageRepositoryPrefix: vshn - imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a + imageTag: extended-billing isOpenshift: 'true' kubectl_image: docker.io/bitnamilegacy/kubectl:1.25.15 maintenanceSA: helm-based-service-maintenance 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 6796424b0..48f17f667 100644 --- a/tests/golden/vshn-managed/appcat/appcat/apiserver/30_deployment.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/apiserver/30_deployment.yaml @@ -31,7 +31,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:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 3 diff --git a/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml b/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml index 9c7d784f0..0cfa2c477 100644 --- a/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/10_billingservice_crd.yaml @@ -69,28 +69,54 @@ spec: description: ItemGroupDescription describes the billing item group type: string + items: + description: |- + Items defines list of billable products for this instance + Each item represents a product with independent lifecycle and event tracking + items: + description: ItemSpec defines a single billable product/item + properties: + description: + description: Description is a human-readable description + of this product + type: string + maxEvents: + default: 100 + description: MaxEvents defines maximum events to retain + for THIS product + type: integer + productID: + description: ProductID identifies the product in the billing + system + maxLength: 100 + minLength: 1 + type: string + unit: + description: Unit defines the billing unit type for this + product + type: string + value: + description: |- + Value represents the billable metric for this product + Can be: replica count, disk size (e.g., "50Gi"), percentage, etc. + type: string + required: + - productID + - value + type: object + minItems: 1 + type: array organization: description: Organization used to identify sales order type: string - productID: - description: ProductID identifies the product in the billing - system - type: string salesOrderID: description: SalesOrderID identifies the sales order in Odoo type: string - size: - description: Size represents the size of the service instance - type: string - unitID: - description: UnitID defines the billing unit type in Odoo - type: string required: - instanceID - itemDescription - itemGroupDescription - - productID - - unitID + - items type: object type: object status: @@ -175,10 +201,6 @@ spec: description: RetryCount tracks the number of retry attempts for failed events type: integer - size: - description: Size represents the size/plan at the time of - the event - type: string state: description: State represents the current state of the event (sent, pending, failed, superseded) @@ -187,6 +209,7 @@ spec: - pending - failed - superseded + - resend type: string timestamp: description: Timestamp when the event occurred @@ -200,12 +223,17 @@ spec: - deleted - scaled type: string + value: + description: |- + Value represents the billable metric at the time of the event + Generic field supporting replica count, disk size, percentages, etc. + type: string required: - productId - - size - state - timestamp - type + - value type: object type: array type: object diff --git a/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/10_cluster_role.yaml b/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/10_cluster_role.yaml index 58e982533..978b1c109 100644 --- a/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/10_cluster_role.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/controllers/appcat/10_cluster_role.yaml @@ -127,18 +127,9 @@ rules: - xvshnpostgresqls/status - xvshnredis - xvshnredis/status - - xobjectbuckets verbs: - get - list - patch - update - watch - - apiGroups: - - apiextensions.crossplane.io - resources: - - compositeresourcedefinitions - verbs: - - get - - list - - watch 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 95a732708..305c06b9f 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 @@ -29,7 +29,7 @@ spec: env: - name: PLANS_NAMESPACE value: syn-appcat - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: httpGet: diff --git a/tests/golden/vshn-managed/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml b/tests/golden/vshn-managed/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml index 352c66d35..9a323386f 100644 --- a/tests/golden/vshn-managed/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/crossplane/helmchart/crossplane/templates/deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane app.kubernetes.io/component: cloud-infrastructure-controller diff --git a/tests/golden/vshn-managed/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml b/tests/golden/vshn-managed/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml index b70f960a9..ea10af976 100644 --- a/tests/golden/vshn-managed/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml +++ b/tests/golden/vshn-managed/appcat/appcat/crossplane/helmchart/crossplane/templates/rbac-manager-deployment.yaml @@ -26,7 +26,7 @@ spec: template: metadata: annotations: - function-revision: 8af486767f62151ab7290018fb289f92d4d5e95a + function-revision: extended-billing labels: app: crossplane-rbac-manager app.kubernetes.io/component: cloud-infrastructure-controller 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 dec265836..1d4c025d7 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:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing 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 7725f6ca2..030a87a38 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 @@ -25,7 +25,7 @@ spec: - --health-probe-bind-address=:8081 - --metrics-bind-address=127.0.0.1:8080 env: [] - image: ghcr.io/vshn/appcat:8af486767f62151ab7290018fb289f92d4d5e95a + image: ghcr.io/vshn/appcat:extended-billing imagePullPolicy: IfNotPresent livenessProbe: httpGet: