Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down
4 changes: 4 additions & 0 deletions component/appcat_controller.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
mode: Pipeline
pipeline:
- functionRef:
name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a
name: function-appcat-master-extended-billing
input:
apiVersion: v1
data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,7 +24,7 @@ spec:
mode: Pipeline
pipeline:
- functionRef:
name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a
name: function-appcat-master-extended-billing
input:
apiVersion: v1
data:
Expand All @@ -48,7 +48,7 @@ spec:
emailAlertingSmtpUsername: [email protected]
ignoreNamespaceForBilling: vshn-test
imageRegistry: code.forgejo.org
imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a
imageTag: extended-billing
ingress_annotations: |
cert-manager.io/cluster-issuer: letsencrypt-production
isOpenshift: 'false'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,7 +24,7 @@ spec:
mode: Pipeline
pipeline:
- functionRef:
name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a
name: function-appcat-master-extended-billing
input:
apiVersion: v1
data:
Expand All @@ -49,7 +49,7 @@ spec:
emailAlertingSmtpUsername: [email protected]
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,7 +24,7 @@ spec:
mode: Pipeline
pipeline:
- functionRef:
name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a
name: function-appcat-master-extended-billing
input:
apiVersion: v1
data:
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,7 +24,7 @@ spec:
mode: Pipeline
pipeline:
- functionRef:
name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a
name: function-appcat-master-extended-billing
input:
apiVersion: v1
data:
Expand Down Expand Up @@ -55,7 +55,7 @@ spec:
emailAlertingSmtpUsername: [email protected]
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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +26,7 @@ spec:
mode: Pipeline
pipeline:
- functionRef:
name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a
name: function-appcat-master-extended-billing
input:
apiVersion: v1
data:
Expand All @@ -51,7 +51,7 @@ spec:
emailAlertingSmtpUsername: [email protected]
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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +26,7 @@ spec:
mode: Pipeline
pipeline:
- functionRef:
name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a
name: function-appcat-master-extended-billing
input:
apiVersion: v1
data:
Expand All @@ -51,7 +51,7 @@ spec:
emailAlertingSmtpUsername: [email protected]
externalDatabaseConnectionsEnabled: 'true'
ignoreNamespaceForBilling: vshn-test
imageTag: 8af486767f62151ab7290018fb289f92d4d5e95a
imageTag: extended-billing
isOpenshift: 'false'
kubectl_image: docker.io/bitnamilegacy/kubectl:1.25.15
loadbalancerAnnotations: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,7 +28,7 @@ spec:
mode: Pipeline
pipeline:
- functionRef:
name: function-appcat-master-8af486767f62151ab7290018fb289f92d4d5e95a
name: function-appcat-master-extended-billing
input:
apiVersion: v1
data:
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand All @@ -187,6 +209,7 @@ spec:
- pending
- failed
- superseded
- resend
type: string
timestamp:
description: Timestamp when the event occurred
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading