From 0c34b6301a1333c8c13e70014f5c1dc71fac57bd Mon Sep 17 00:00:00 2001 From: Nicolas Bigler Date: Tue, 12 Dec 2023 15:00:16 +0100 Subject: [PATCH] Remove component code The component code has been moved to component-appcat Signed-off-by: Nicolas Bigler --- component/Makefile | 102 -------- component/Makefile.vars.mk | 47 ---- .../class/billing-collector-cloudservices.yml | 13 - component/class/defaults.yml | 71 ------ component/component/app.jsonnet | 11 - component/component/main.jsonnet | 241 ------------------ .../tests/billing-collector-cloudservices.yml | 0 .../cloudscale-metrics-collector-cloud.yml | 7 - .../cloudscale-metrics-collector-managed.yml | 7 - .../exoscale-metrics-collector-cloud.yml | 11 - .../exoscale-metrics-collector-managed.yml | 12 - component/tests/fromenv.yml | 45 ---- .../apps/billing-collector-cloudservices.yaml | 0 .../apps/billing-collector-cloudservices.yaml | 0 .../cloudscaleClusterRole.yaml | 23 -- .../cloudscaleConfigMap.yaml | 15 -- .../cloudscaleExporter.yaml | 57 ----- .../cloudscaleRolebinding.yaml | 15 -- .../cloudscaleSecrets.yaml | 16 -- .../cloudscaleServiceAccount.yaml | 8 - .../apps/billing-collector-cloudservices.yaml | 0 .../cloudscaleClusterRole.yaml | 23 -- .../cloudscaleConfigMap.yaml | 15 -- .../cloudscaleExporter.yaml | 57 ----- .../cloudscaleRolebinding.yaml | 15 -- .../cloudscaleSecrets.yaml | 16 -- .../cloudscaleServiceAccount.yaml | 8 - .../apps/billing-collector-cloudservices.yaml | 0 .../exoDbaasClusterRole.yaml | 27 -- .../exoDbaasConfigMap.yaml | 13 - .../exoDbaasExporter.yaml | 57 ----- .../exoDbaasRoleBinding.yaml | 15 -- .../exoDbaasSecrets.yaml | 17 -- .../exoDbaasServiceAccount.yaml | 8 - .../exoObjectStorageClusterRole.yaml | 23 -- .../exoObjectStorageConfigMap.yaml | 14 - .../exoObjectStorageExporter.yaml | 57 ----- .../exoObjectStorageRoleBinding.yaml | 15 -- .../exoObjectStorageSecrets.yaml | 17 -- .../exoObjectStorageServiceAccount.yaml | 8 - .../apps/billing-collector-cloudservices.yaml | 0 .../exoDbaasClusterRole.yaml | 27 -- .../exoDbaasConfigMap.yaml | 13 - .../exoDbaasExporter.yaml | 57 ----- .../exoDbaasRoleBinding.yaml | 15 -- .../exoDbaasSecrets.yaml | 17 -- .../exoDbaasServiceAccount.yaml | 8 - .../exoObjectStorageClusterRole.yaml | 23 -- .../exoObjectStorageConfigMap.yaml | 14 - .../exoObjectStorageExporter.yaml | 57 ----- .../exoObjectStorageRoleBinding.yaml | 15 -- .../exoObjectStorageSecrets.yaml | 17 -- .../exoObjectStorageServiceAccount.yaml | 8 - .../apps/exoscale-metrics-collector.yaml | 0 .../exoDbaasClusterRole.yaml | 27 -- .../exoDbaasConfigMap.yaml | 13 - .../exoDbaasExporter.yaml | 72 ------ .../exoDbaasPodMonitor.yaml | 11 - .../exoDbaasRoleBinding.yaml | 15 -- .../exoDbaasSecrets.yaml | 15 -- .../exoDbaasServiceAccount.yaml | 8 - .../exoObjectStorageClusterRole.yaml | 23 -- .../exoObjectStorageConfigMap.yaml | 14 - .../exoObjectStorageExporter.yaml | 72 ------ .../exoObjectStoragePodMonitor.yaml | 11 - .../exoObjectStorageRoleBinding.yaml | 15 -- .../exoObjectStorageSecrets.yaml | 15 -- .../exoObjectStorageServiceAccount.yaml | 8 - pkg/exoscale/dbaas_test.go | 2 + 69 files changed, 2 insertions(+), 1696 deletions(-) delete mode 100644 component/Makefile delete mode 100644 component/Makefile.vars.mk delete mode 100644 component/class/billing-collector-cloudservices.yml delete mode 100644 component/class/defaults.yml delete mode 100644 component/component/app.jsonnet delete mode 100644 component/component/main.jsonnet delete mode 100644 component/tests/billing-collector-cloudservices.yml delete mode 100644 component/tests/cloudscale-metrics-collector-cloud.yml delete mode 100644 component/tests/cloudscale-metrics-collector-managed.yml delete mode 100644 component/tests/exoscale-metrics-collector-cloud.yml delete mode 100644 component/tests/exoscale-metrics-collector-managed.yml delete mode 100644 component/tests/fromenv.yml delete mode 100644 component/tests/golden/billing-collector-cloudservices/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleClusterRole.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleConfigMap.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleExporter.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleRolebinding.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleSecrets.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleServiceAccount.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleClusterRole.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleConfigMap.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleExporter.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleRolebinding.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleSecrets.yaml delete mode 100644 component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleServiceAccount.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasClusterRole.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasConfigMap.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasExporter.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasRoleBinding.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasSecrets.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasServiceAccount.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageClusterRole.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageConfigMap.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageExporter.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageRoleBinding.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageSecrets.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageServiceAccount.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasClusterRole.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasConfigMap.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasExporter.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasRoleBinding.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasSecrets.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasServiceAccount.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageClusterRole.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageConfigMap.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageExporter.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageRoleBinding.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageSecrets.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageServiceAccount.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/apps/exoscale-metrics-collector.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasClusterRole.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasConfigMap.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasExporter.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasPodMonitor.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasRoleBinding.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasSecrets.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasServiceAccount.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageClusterRole.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageConfigMap.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageExporter.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStoragePodMonitor.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageRoleBinding.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageSecrets.yaml delete mode 100644 component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageServiceAccount.yaml diff --git a/component/Makefile b/component/Makefile deleted file mode 100644 index ce42429..0000000 --- a/component/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -MAKEFLAGS += --warn-undefined-variables -SHELL := bash -.SHELLFLAGS := -eu -o pipefail -c -.DEFAULT_GOAL := all -.DELETE_ON_ERROR: -.SUFFIXES: - -include Makefile.vars.mk - -.PHONY: help -help: ## Show this help - @grep -E -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = "(: ).*?## "}; {gsub(/\\:/,":", $$1)}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' - -.PHONY: all -all: lint - -.PHONY: lint -lint: lint_jsonnet lint_yaml lint_adoc lint_kubent ## All-in-one linting - -.PHONY: lint_jsonnet -lint_jsonnet: $(JSONNET_FILES) ## Lint jsonnet files - $(JSONNET_DOCKER) $(JSONNETFMT_ARGS) --test -- $? - -.PHONY: lint_yaml -lint_yaml: ## Lint yaml files - $(YAMLLINT_DOCKER) -f parsable -c $(YAMLLINT_CONFIG) $(YAMLLINT_ARGS) -- . - -.PHONY: lint_adoc -lint_adoc: ## Lint documentation - $(VALE_CMD) $(VALE_ARGS) -.PHONY: lint_kubent -lint_kubent: ## Check for deprecated Kubernetes API versions - $(KUBENT_DOCKER) $(KUBENT_ARGS) -f $(KUBENT_FILES) - -.PHONY: format -format: format_jsonnet ## All-in-one formatting - -.PHONY: format_jsonnet -format_jsonnet: $(JSONNET_FILES) ## Format jsonnet files - $(JSONNET_DOCKER) $(JSONNETFMT_ARGS) -- $? - -.PHONY: docs-serve -docs-serve: ## Preview the documentation - $(ANTORA_PREVIEW_CMD) - -.PHONY: compile -.compile: - mkdir -p dependencies - $(COMPILE_CMD) - -.PHONY: test -test: commodore_args += -f tests/$(instance).yml -test: .compile ## Compile the component - -.PHONY: gen-golden -gen-golden: commodore_args += -f tests/$(instance).yml -gen-golden: clean .compile ## Update the reference version for target `golden-diff`. - @rm -rf tests/golden/$(instance) - @mkdir -p tests/golden/$(instance) - @cp -R compiled/. tests/golden/$(instance)/. - -.PHONY: golden-diff -golden-diff: commodore_args += -f tests/$(instance).yml -golden-diff: clean .compile ## Diff compile output against the reference version. Review output and run `make gen-golden golden-diff` if this target fails. - @git diff --exit-code --minimal --no-index -- tests/golden/$(instance) compiled/ - -.PHONY: golden-diff-all -golden-diff-all: recursive_target=golden-diff -golden-diff-all: $(test_instances) ## Run golden-diff for all instances. Note: this doesn't work when running make with multiple parallel jobs (-j != 1). - -.PHONY: gen-golden-all -gen-golden-all: recursive_target=gen-golden -gen-golden-all: $(test_instances) ## Run gen-golden for all instances. Note: this doesn't work when running make with multiple parallel jobs (-j != 1). - -.PHONY: lint_kubent_all -lint_kubent_all: recursive_target=lint_kubent -lint_kubent_all: $(test_instances) ## Lint deprecated Kubernetes API versions for all golden test instances. Will exit on first error. Note: this doesn't work when running make with multiple parallel jobs (-j != 1). - -.PHONY: $(test_instances) -$(test_instances): - $(MAKE) $(recursive_target) -e instance=$(basename $(@F)) - -.PHONY: clean -clean: ## Clean the project - rm -rf .cache compiled dependencies vendor helmcharts jsonnetfile*.json || true - -.PHONY: gen-golden-from-env -instance=fromenv -gen-golden-from-env: set-credentials gen-golden reset-credentials - -.PHONY: set-credentials -set-credentials: - @test -n "$(EXOSCALE_API_KEY)" - @test -n "$(EXOSCALE_API_SECRET)" - @test -n "$(CLOUDSCALE_API_TOKEN)" - @yq e -i '.parameters.billing_collector_cloudservices.secrets.exoscale.credentials.stringData.EXOSCALE_API_KEY = "$(EXOSCALE_API_KEY)"' tests/fromenv.yml - @yq e -i '.parameters.billing_collector_cloudservices.secrets.exoscale.credentials.stringData.EXOSCALE_API_SECRET = "$(EXOSCALE_API_SECRET)"' tests/fromenv.yml - @yq e -i '.parameters.billing_collector_cloudservices.secrets.cloudscale.credentials.stringData.CLOUDSCALE_API_TOKEN = "$(CLOUDSCALE_API_TOKEN)"' tests/fromenv.yml - -.PHONY: reset-credentials -reset-credentials: - git checkout tests/fromenv.yml diff --git a/component/Makefile.vars.mk b/component/Makefile.vars.mk deleted file mode 100644 index b70f3b8..0000000 --- a/component/Makefile.vars.mk +++ /dev/null @@ -1,47 +0,0 @@ -# Commodore takes the root dir name as the component name -COMPONENT_NAME ?= billing-collector-cloudservices -COMPONENT_SUBDIR ?= $(shell basename ${PWD}) - -compiled_path ?= compiled/$(COMPONENT_NAME)/$(COMPONENT_NAME) -root_volume ?= -v "$${PWD}/../:/$(COMPONENT_NAME)" -compiled_volume ?= -v "$${PWD}/$(compiled_path):/$(COMPONENT_NAME)" -commodore_args ?= --search-paths . -n $(COMPONENT_NAME) - -ifneq "$(shell which docker 2>/dev/null)" "" - DOCKER_CMD ?= $(shell which docker) - DOCKER_USERNS ?= "" -else - DOCKER_CMD ?= podman - DOCKER_USERNS ?= keep-id -endif -DOCKER_ARGS ?= run --rm -u "$$(id -u):$$(id -g)" --userns=$(DOCKER_USERNS) -w /$(COMPONENT_NAME)/$(COMPONENT_SUBDIR) -e HOME="/$(COMPONENT_NAME)" - -JSONNET_FILES ?= $(shell find . -type f -not -path './vendor/*' \( -name '*.*jsonnet' -or -name '*.libsonnet' \)) -JSONNETFMT_ARGS ?= --in-place --pad-arrays -JSONNET_IMAGE ?= docker.io/bitnami/jsonnet:latest -JSONNET_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --entrypoint=jsonnetfmt $(JSONNET_IMAGE) - -YAMLLINT_ARGS ?= --no-warnings -YAMLLINT_CONFIG ?= .yamllint.yml -YAMLLINT_IMAGE ?= docker.io/cytopia/yamllint:latest -YAMLLINT_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) $(YAMLLINT_IMAGE) - -VALE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --volume "$${PWD}"/docs/modules:/pages docker.io/vshn/vale:2.1.1 -VALE_ARGS ?= --minAlertLevel=error --config=/pages/ROOT/pages/.vale.ini /pages - -ANTORA_PREVIEW_CMD ?= $(DOCKER_CMD) run --rm --publish 35729:35729 --publish 2020:2020 --volume "${PWD}/.git":/preview/antora/.git --volume "${PWD}/docs":/preview/antora/docs docker.io/vshn/antora-preview:3.0.1.1 --style=syn --antora=docs - - -COMMODORE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) docker.io/projectsyn/commodore:latest -COMPILE_CMD ?= $(COMMODORE_CMD) component compile . $(commodore_args) -JB_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) --entrypoint /usr/local/bin/jb docker.io/projectsyn/commodore:latest install -GOLDEN_FILES ?= $(shell find tests/golden/$(instance) -type f) - -KUBENT_FILES ?= $(shell echo "$(GOLDEN_FILES)" | sed 's/ /,/g') -KUBENT_ARGS ?= -c=false --helm2=false --helm3=false -e -# Use our own kubent image until the upstream image is available -KUBENT_IMAGE ?= docker.io/projectsyn/kubent:latest -KUBENT_DOCKER ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) --entrypoint=/app/kubent $(KUBENT_IMAGE) - -instance ?= billing-collector-cloudservices -test_instances = tests/billing-collector-cloudservices.yml tests/exoscale-metrics-collector-managed.yml tests/exoscale-metrics-collector-cloud.yml tests/cloudscale-metrics-collector-managed.yml tests/cloudscale-metrics-collector-cloud.yml tests/fromenv.yml diff --git a/component/class/billing-collector-cloudservices.yml b/component/class/billing-collector-cloudservices.yml deleted file mode 100644 index 0048892..0000000 --- a/component/class/billing-collector-cloudservices.yml +++ /dev/null @@ -1,13 +0,0 @@ -parameters: - kapitan: - compile: - - input_paths: - - ${_base_directory}/component/app.jsonnet - input_type: jsonnet - output_path: apps/ - output_type: yaml - - input_paths: - - ${_base_directory}/component/main.jsonnet - input_type: jsonnet - output_type: yaml - output_path: billing-collector-cloudservices/ diff --git a/component/class/defaults.yml b/component/class/defaults.yml deleted file mode 100644 index 0b0af70..0000000 --- a/component/class/defaults.yml +++ /dev/null @@ -1,71 +0,0 @@ -parameters: - billing_collector_cloudservices: - namespace: appuio-cloud-reporting - - secrets: - odoo: - credentials: - stringData: - ODOO_OAUTH_CLIENT_ID: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/odoo-oauth-client-id}" - ODOO_OAUTH_CLIENT_SECRET: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/odoo-oauth-client-secret}" - exoscale: - credentials: - stringData: - EXOSCALE_API_KEY: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/exoscale-key}" - EXOSCALE_API_SECRET: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/exoscale-secret}" - KUBERNETES_SERVER_URL: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/cluster-server}" - KUBERNETES_SERVER_TOKEN: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/cluster-token}" - cloudscale: - credentials: - stringData: - CLOUDSCALE_API_TOKEN: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/cloudscale-token}" - KUBERNETES_SERVER_URL: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/cluster-server}" - KUBERNETES_SERVER_TOKEN: "?{vaultkv:${cluster:tenant}/${cluster:name}/billing-collector-cloudservices/cluster-token}" - images: - collector: - registry: 'ghcr.io' - repository: 'vshn/billing-collector-cloudservices' - tag: new-billing-cloud - - appuioManaged: - enabled: false - salesOrder: "" #Update once the fact is available in Leutenant - - promUrl: localhost:9090 - clusterId: ${cluster:name} - - odoo: - url: "https://test.central.vshn.ch/api/v2/product_usage_report_POST" - tokenUrl: "https://test.central.vshn.ch/api/v2/authentication/oauth2/token" - - exoscale: - enabled: false - dbaas: - enabled: false - # in hours - collectInterval: 1 - # Exoscale metrics are generally fast - # and we are less likely to miss and dbaas instances - # in hours - objectStorage: - enabled: false - collectInterval: 23 - # Run the tool only after 6 in the morning.+ - # in hours - billingHour: 6 - - cloudscale: - enabled: false - # cloudscale.ch queries are rather slow. - # Also the metrics are fetched for the previous day, won't change often. - # in hours - collectInterval: 23 - # Run the tool only after 6 in the morning.+ - # in hours - billingHour: 6 - # How many days ago to get the metrics - # The result is always 1 day of metrics - days: 1 - - # Unit of measure map "cloud service value": "odoo16 value" - uom: {} diff --git a/component/component/app.jsonnet b/component/component/app.jsonnet deleted file mode 100644 index fc5a91d..0000000 --- a/component/component/app.jsonnet +++ /dev/null @@ -1,11 +0,0 @@ -local kap = import 'lib/kapitan.libjsonnet'; -local inv = kap.inventory(); -local params = inv.parameters.billing_collector_cloudservices; -local argocd = import 'lib/argocd.libjsonnet'; - -local instance = 'billing-collector-cloudservices'; -local app = argocd.App(instance, params.namespace); - -{ - [instance]: app, -} diff --git a/component/component/main.jsonnet b/component/component/main.jsonnet deleted file mode 100644 index 8c494f3..0000000 --- a/component/component/main.jsonnet +++ /dev/null @@ -1,241 +0,0 @@ -local kap = import 'lib/kapitan.libjsonnet'; -local inv = kap.inventory(); -local params = inv.parameters.billing_collector_cloudservices; -local kube = import 'lib/kube.libjsonnet'; -local com = import 'lib/commodore.libjsonnet'; -local collectorImage = '%(registry)s/%(repository)s:%(tag)s' % params.images.collector; -local component_name = 'billing-collector-cloudservices'; -local appuioManaged = params.appuioManaged.enabled; - -local labels = { - 'app.kubernetes.io/name': component_name, - 'app.kubernetes.io/managed-by': 'commodore', - 'app.kubernetes.io/component': component_name, -}; - -local secret(key, suf) = [ - if params.secrets[key][s] != null then - kube.Secret(s + '-' + key + if suf != '' then '-' + suf else '') { - metadata+: { - namespace: params.namespace, - }, - } + com.makeMergeable(params.secrets[key][s]) + com.makeMergeable(params.secrets['odoo'][s]) - for s in std.objectFields(params.secrets[key]) -]; - -local exoDbaasClusterRole = kube.ClusterRole('appcat:cloudcollector:exoscale:dbaas') + { - rules: [ - { - apiGroups: [ '*' ], - resources: [ 'namespaces' ], - verbs: [ 'get', 'list' ], - }, - { - apiGroups: [ 'exoscale.crossplane.io' ], - resources: [ - 'postgresqls', - 'mysqls', - 'redis', - 'opensearches', - 'kafkas', - ], - verbs: [ - 'get', - 'list', - 'watch', - ], - }, - ], -}; - -local exoObjectStorageClusterRole = kube.ClusterRole('appcat:cloudcollector:exoscale:objectstorage') + { - rules: [ - { - apiGroups: [ '*' ], - resources: [ 'namespaces' ], - verbs: [ 'get', 'list' ], - }, - { - apiGroups: [ 'exoscale.crossplane.io' ], - resources: [ - 'buckets', - ], - verbs: [ - 'get', - 'list', - 'watch', - ], - }, - ], -}; - -local cloudscaleClusterRole = kube.ClusterRole('appcat:cloudcollector:cloudscale') + { - rules: [ - { - apiGroups: [ '' ], - resources: [ 'namespaces' ], - verbs: [ 'get', 'list' ], - }, - { - apiGroups: [ 'cloudscale.crossplane.io' ], - resources: [ - 'buckets', - ], - verbs: [ - 'get', - 'list', - 'watch', - ], - }, - ], -}; - -local serviceAccount(name, clusterRole) = { - local sa = kube.ServiceAccount(name) + { - metadata+: { - namespace: params.namespace, - }, - }, - local rb = kube.ClusterRoleBinding(name) { - roleRef_: clusterRole, - subjects_: [ sa ], - }, - sa: sa, - rb: rb, -}; - -local deployment(name, args, config) = - kube.Deployment(name) { - metadata+: { - labels+: labels, - namespace: params.namespace, - }, - spec+: { - template+: { - spec+: { - serviceAccount: name, - containers_:: { - exporter: kube.Container('exporter') { - imagePullPolicy: 'IfNotPresent', - image: collectorImage, - args: args, - envFrom: [ - { - configMapRef: { - name: config, - }, - }, - { - secretRef: { - name: 'credentials-' + name, - }, - }, - ], - }, - }, - }, - }, - }, - }; - -local config(name, extraConfig) = kube.ConfigMap(name) { - metadata: { - name: name, - namespace: params.namespace, - }, - data: { - ODOO_URL: std.toString(params.odoo.url), - ODOO_OAUTH_TOKEN_URL: std.toString(params.odoo.tokenUrl), - CLUSTER_ID: std.toString(params.clusterId), - APPUIO_MANAGED_SALES_ORDER: if appuioManaged then std.toString(params.appuioManaged.salesOrder) else '', - PROM_URL: if !appuioManaged then std.toString(params.promUrl) else '', - UOM: std.toString(params.uom), - }, -} + extraConfig; - -({ - - local odoo = params.secrets.odoo, - assert odoo.credentials != null : 'odoo.credentials must be set.', - assert odoo.credentials.stringData != null : 'odoo.credentials.stringData must be set.', - assert odoo.credentials.stringData.ODOO_OAUTH_CLIENT_ID != null : 'odoo.credentials.stringData.ODOO_OAUTH_CLIENT_ID must be set.', - assert odoo.credentials.stringData.ODOO_OAUTH_CLIENT_SECRET != null : 'odoo.credentials.stringData.ODOO_OAUTH_CLIENT_SECRET must be set.', -}) -+ -(if params.exoscale.enabled && params.exoscale.dbaas.enabled then { - local name = 'exoscale-dbaas', - local secrets = params.secrets.exoscale, - local sa = serviceAccount(name, exoDbaasClusterRole), - local extraConfig = { - data+: { - COLLECT_INTERVAL: std.toString(params.exoscale.dbaas.collectInterval), - } - }, - local cm = config(name + '-env', extraConfig), - - assert secrets != null : 'secrets must be set.', - assert secrets.credentials != null : 'secrets.credentials must be set.', - assert secrets.credentials.stringData != null : 'secrets.credentials.stringData must be set.', - assert secrets.credentials.stringData.EXOSCALE_API_KEY != null : 'secrets.credentials.stringData.EXOSCALE_API_KEY must be set.', - assert secrets.credentials.stringData.EXOSCALE_API_SECRET != null : 'secrets.credentials.stringData.EXOSCALE_API_SECRET must be set.', - - exoDbaasSecrets: std.filter(function(it) it != null, secret('exoscale', 'dbaas')), - exoDbaasClusterRole: exoDbaasClusterRole, - exoDbaasServiceAccount: sa.sa, - exoDbaasRoleBinding: sa.rb, - exoDbaasConfigMap: cm, - exoDbaasExporter: deployment(name, [ 'exoscale', 'dbaas' ], name + '-env'), - } else {}) -+ -(if params.exoscale.enabled && params.exoscale.objectStorage.enabled then { - local name = 'exoscale-objectstorage', - local secrets = params.secrets.exoscale, - local sa = serviceAccount(name, exoObjectStorageClusterRole), - local extraConfig = { - data+: { - COLLECT_INTERVAL: std.toString(params.exoscale.objectStorage.collectInterval), - BILLING_HOUR: std.toString(params.exoscale.objectStorage.billingHour), - } - }, - local cm = config(name + '-env', extraConfig), - - assert secrets != null : 'secrets must be set.', - assert secrets.credentials != null : 'secrets.credentials must be set.', - assert secrets.credentials.stringData != null : 'secrets.credentials.stringData must be set.', - assert secrets.credentials.stringData.EXOSCALE_API_KEY != null : 'secrets.credentials.stringData.EXOSCALE_API_KEY must be set.', - assert secrets.credentials.stringData.EXOSCALE_API_SECRET != null : 'secrets.credentials.stringData.EXOSCALE_API_SECRET must be set.', - - exoObjectStorageSecrets: std.filter(function(it) it != null, secret('exoscale', 'objectstorage')), - exoObjectStorageClusterRole: exoObjectStorageClusterRole, - exoObjectStorageServiceAccount: sa.sa, - exoObjectStorageRoleBinding: sa.rb, - exoObjectStorageConfigMap: cm, - exoObjectStorageExporter: deployment(name, [ 'exoscale', 'objectstorage' ], name + '-env'), - - } else {}) - + -(if params.cloudscale.enabled then { - local name = 'cloudscale', - local secrets = params.secrets.cloudscale, - local sa = serviceAccount(name, cloudscaleClusterRole), - local extraConfig = { - data+: { - COLLECT_INTERVAL: std.toString(params.cloudscale.collectInterval), - BILLING_HOUR: std.toString(params.cloudscale.billingHour), - DAYS: std.toString(params.cloudscale.days), - } - }, - local cm = config(name + '-env', extraConfig), - - assert secrets != null : 'secrets must be set.', - assert secrets.credentials != null : 'secrets.credentials must be set.', - assert secrets.credentials.stringData != null : 'secrets.credentials.stringData must be set.', - assert secrets.credentials.stringData.CLOUDSCALE_API_TOKEN != null : 'secrets.credentials.stringData.CLOUDSCALE_API_TOKEN must be set.', - - cloudscaleSecrets: std.filter(function(it) it != null, secret(name, '')), - cloudscaleClusterRole: cloudscaleClusterRole, - cloudscaleServiceAccount: sa.sa, - cloudscaleRolebinding: sa.rb, - cloudscaleConfigMap: cm, - cloudscaleExporter: deployment(name, [ 'cloudscale', 'objectstorage' ], name + '-env'), - } else {}) diff --git a/component/tests/billing-collector-cloudservices.yml b/component/tests/billing-collector-cloudservices.yml deleted file mode 100644 index e69de29..0000000 diff --git a/component/tests/cloudscale-metrics-collector-cloud.yml b/component/tests/cloudscale-metrics-collector-cloud.yml deleted file mode 100644 index 7a81bc5..0000000 --- a/component/tests/cloudscale-metrics-collector-cloud.yml +++ /dev/null @@ -1,7 +0,0 @@ -parameters: - billing_collector_cloudservices: - appuioManaged: - enabled: false - promUrl: localhost:9090 - cloudscale: - enabled: true diff --git a/component/tests/cloudscale-metrics-collector-managed.yml b/component/tests/cloudscale-metrics-collector-managed.yml deleted file mode 100644 index 63e0a73..0000000 --- a/component/tests/cloudscale-metrics-collector-managed.yml +++ /dev/null @@ -1,7 +0,0 @@ -parameters: - billing_collector_cloudservices: - appuioManaged: - enabled: true - salesOrder: "12345" - cloudscale: - enabled: true diff --git a/component/tests/exoscale-metrics-collector-cloud.yml b/component/tests/exoscale-metrics-collector-cloud.yml deleted file mode 100644 index 6bb3433..0000000 --- a/component/tests/exoscale-metrics-collector-cloud.yml +++ /dev/null @@ -1,11 +0,0 @@ -parameters: - billing_collector_cloudservices: - appuioManaged: - enabled: false - promUrl: localhost:9090 - exoscale: - enabled: true - dbaas: - enabled: true - objectStorage: - enabled: true diff --git a/component/tests/exoscale-metrics-collector-managed.yml b/component/tests/exoscale-metrics-collector-managed.yml deleted file mode 100644 index 8e5be90..0000000 --- a/component/tests/exoscale-metrics-collector-managed.yml +++ /dev/null @@ -1,12 +0,0 @@ -parameters: - billing_collector_cloudservices: - namespace: appuio-cloud-reporting - appuioManaged: - enabled: true - salesOrder: "12345" - exoscale: - enabled: true - dbaas: - enabled: true - objectStorage: - enabled: true diff --git a/component/tests/fromenv.yml b/component/tests/fromenv.yml deleted file mode 100644 index d4cbe30..0000000 --- a/component/tests/fromenv.yml +++ /dev/null @@ -1,45 +0,0 @@ -parameters: - billing_collector_cloudservices: - appuioManaged: - enabled: true - salesOrder: "12345" - - promUrl: localhost:9090 - - clusterId: ${cluster:name} - - images: - collector: - tag: test - - secrets: - odoo: - credentials: - stringData: - ODOO_OAUTH_CLIENT_ID: placeholder - ODOO_OAUTH_CLIENT_SECRET: placeholder - cloudscale: - credentials: - stringData: - CLOUDSCALE_API_TOKEN: placeholder - exoscale: - credentials: - stringData: - EXOSCALE_API_KEY: placeholder - EXOSCALE_API_SECRET: placeholder-byW9I6cTHPg - - exoscale: - enabled: false - dbaas: - enabled: false - objectStorage: - enabled: false - - cloudscale: - enabled: true - - uom: - GBDay: uom_uom_78_b847edc1 - KReq: uom_uom_60_a83156c7 - GB: uom_uom_71_6f28fc21 - Instance-Hour: uom_uom_45_1e112771 diff --git a/component/tests/golden/billing-collector-cloudservices/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml b/component/tests/golden/billing-collector-cloudservices/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml b/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleClusterRole.yaml b/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleClusterRole.yaml deleted file mode 100644 index 387300a..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleClusterRole.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: {} - labels: - name: appcat-cloudcollector-cloudscale - name: appcat:cloudcollector:cloudscale -rules: - - apiGroups: - - '' - resources: - - namespaces - verbs: - - get - - list - - apiGroups: - - cloudscale.crossplane.io - resources: - - buckets - verbs: - - get - - list - - watch diff --git a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleConfigMap.yaml b/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleConfigMap.yaml deleted file mode 100644 index 38f33e9..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleConfigMap.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -data: - APPUIO_MANAGED_SALES_ORDER: '' - BILLING_HOUR: '6' - CLUSTER_ID: c-green-test-1234 - COLLECT_INTERVAL: '23' - DAYS: '1' - ODOO_OAUTH_TOKEN_URL: https://test.central.vshn.ch/api/v2/authentication/oauth2/token - ODOO_URL: https://test.central.vshn.ch/api/v2/product_usage_report_POST - PROM_URL: localhost:9090 - UOM: '{ }' -kind: ConfigMap -metadata: - name: cloudscale-env - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleExporter.yaml b/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleExporter.yaml deleted file mode 100644 index 8804797..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleExporter.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: cloudscale - name: cloudscale - namespace: appuio-cloud-reporting -spec: - minReadySeconds: 30 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: cloudscale - strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate - template: - metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: cloudscale - spec: - containers: - - args: - - cloudscale - - objectstorage - env: [] - envFrom: - - configMapRef: - name: cloudscale-env - - secretRef: - name: credentials-cloudscale - image: ghcr.io/vshn/billing-collector-cloudservices:new-billing-cloud - imagePullPolicy: IfNotPresent - name: exporter - ports: [] - stdin: false - tty: false - volumeMounts: [] - imagePullSecrets: [] - initContainers: [] - serviceAccount: cloudscale - terminationGracePeriodSeconds: 30 - volumes: [] diff --git a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleRolebinding.yaml b/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleRolebinding.yaml deleted file mode 100644 index 4e38c86..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleRolebinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: {} - labels: - name: cloudscale - name: cloudscale -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: appcat:cloudcollector:cloudscale -subjects: - - kind: ServiceAccount - name: cloudscale - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleSecrets.yaml b/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleSecrets.yaml deleted file mode 100644 index ba25253..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleSecrets.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -data: {} -kind: Secret -metadata: - annotations: {} - labels: - name: credentials-cloudscale - name: credentials-cloudscale - namespace: appuio-cloud-reporting -stringData: - CLOUDSCALE_API_TOKEN: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cloudscale-token - KUBERNETES_SERVER_TOKEN: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-token - KUBERNETES_SERVER_URL: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-server - ODOO_OAUTH_CLIENT_ID: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-id - ODOO_OAUTH_CLIENT_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-secret -type: Opaque diff --git a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleServiceAccount.yaml b/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleServiceAccount.yaml deleted file mode 100644 index dad8baf..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleServiceAccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - annotations: {} - labels: - name: cloudscale - name: cloudscale - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml b/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleClusterRole.yaml b/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleClusterRole.yaml deleted file mode 100644 index 387300a..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleClusterRole.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: {} - labels: - name: appcat-cloudcollector-cloudscale - name: appcat:cloudcollector:cloudscale -rules: - - apiGroups: - - '' - resources: - - namespaces - verbs: - - get - - list - - apiGroups: - - cloudscale.crossplane.io - resources: - - buckets - verbs: - - get - - list - - watch diff --git a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleConfigMap.yaml b/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleConfigMap.yaml deleted file mode 100644 index 7871c76..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleConfigMap.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -data: - APPUIO_MANAGED_SALES_ORDER: '12345' - BILLING_HOUR: '6' - CLUSTER_ID: c-green-test-1234 - COLLECT_INTERVAL: '23' - DAYS: '1' - ODOO_OAUTH_TOKEN_URL: https://test.central.vshn.ch/api/v2/authentication/oauth2/token - ODOO_URL: https://test.central.vshn.ch/api/v2/product_usage_report_POST - PROM_URL: '' - UOM: '{ }' -kind: ConfigMap -metadata: - name: cloudscale-env - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleExporter.yaml b/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleExporter.yaml deleted file mode 100644 index 8804797..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleExporter.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: cloudscale - name: cloudscale - namespace: appuio-cloud-reporting -spec: - minReadySeconds: 30 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: cloudscale - strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate - template: - metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: cloudscale - spec: - containers: - - args: - - cloudscale - - objectstorage - env: [] - envFrom: - - configMapRef: - name: cloudscale-env - - secretRef: - name: credentials-cloudscale - image: ghcr.io/vshn/billing-collector-cloudservices:new-billing-cloud - imagePullPolicy: IfNotPresent - name: exporter - ports: [] - stdin: false - tty: false - volumeMounts: [] - imagePullSecrets: [] - initContainers: [] - serviceAccount: cloudscale - terminationGracePeriodSeconds: 30 - volumes: [] diff --git a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleRolebinding.yaml b/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleRolebinding.yaml deleted file mode 100644 index 4e38c86..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleRolebinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: {} - labels: - name: cloudscale - name: cloudscale -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: appcat:cloudcollector:cloudscale -subjects: - - kind: ServiceAccount - name: cloudscale - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleSecrets.yaml b/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleSecrets.yaml deleted file mode 100644 index ba25253..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleSecrets.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -data: {} -kind: Secret -metadata: - annotations: {} - labels: - name: credentials-cloudscale - name: credentials-cloudscale - namespace: appuio-cloud-reporting -stringData: - CLOUDSCALE_API_TOKEN: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cloudscale-token - KUBERNETES_SERVER_TOKEN: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-token - KUBERNETES_SERVER_URL: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-server - ODOO_OAUTH_CLIENT_ID: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-id - ODOO_OAUTH_CLIENT_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-secret -type: Opaque diff --git a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleServiceAccount.yaml b/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleServiceAccount.yaml deleted file mode 100644 index dad8baf..0000000 --- a/component/tests/golden/cloudscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/cloudscaleServiceAccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - annotations: {} - labels: - name: cloudscale - name: cloudscale - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasClusterRole.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasClusterRole.yaml deleted file mode 100644 index b52c355..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasClusterRole.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: {} - labels: - name: appcat-cloudcollector-exoscale-dbaas - name: appcat:cloudcollector:exoscale:dbaas -rules: - - apiGroups: - - '*' - resources: - - namespaces - verbs: - - get - - list - - apiGroups: - - exoscale.crossplane.io - resources: - - postgresqls - - mysqls - - redis - - opensearches - - kafkas - verbs: - - get - - list - - watch diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasConfigMap.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasConfigMap.yaml deleted file mode 100644 index 4d2083a..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasConfigMap.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -data: - APPUIO_MANAGED_SALES_ORDER: '' - CLUSTER_ID: c-green-test-1234 - COLLECT_INTERVAL: '1' - ODOO_OAUTH_TOKEN_URL: https://test.central.vshn.ch/api/v2/authentication/oauth2/token - ODOO_URL: https://test.central.vshn.ch/api/v2/product_usage_report_POST - PROM_URL: localhost:9090 - UOM: '{ }' -kind: ConfigMap -metadata: - name: exoscale-dbaas-env - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasExporter.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasExporter.yaml deleted file mode 100644 index 0130a25..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasExporter.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-dbaas - name: exoscale-dbaas - namespace: appuio-cloud-reporting -spec: - minReadySeconds: 30 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-dbaas - strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate - template: - metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-dbaas - spec: - containers: - - args: - - exoscale - - dbaas - env: [] - envFrom: - - configMapRef: - name: exoscale-dbaas-env - - secretRef: - name: credentials-exoscale-dbaas - image: ghcr.io/vshn/billing-collector-cloudservices:new-billing-cloud - imagePullPolicy: IfNotPresent - name: exporter - ports: [] - stdin: false - tty: false - volumeMounts: [] - imagePullSecrets: [] - initContainers: [] - serviceAccount: exoscale-dbaas - terminationGracePeriodSeconds: 30 - volumes: [] diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasRoleBinding.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasRoleBinding.yaml deleted file mode 100644 index df8d2b0..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasRoleBinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: {} - labels: - name: exoscale-dbaas - name: exoscale-dbaas -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: appcat:cloudcollector:exoscale:dbaas -subjects: - - kind: ServiceAccount - name: exoscale-dbaas - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasSecrets.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasSecrets.yaml deleted file mode 100644 index 32aca88..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasSecrets.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -data: {} -kind: Secret -metadata: - annotations: {} - labels: - name: credentials-exoscale-dbaas - name: credentials-exoscale-dbaas - namespace: appuio-cloud-reporting -stringData: - EXOSCALE_API_KEY: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-key - EXOSCALE_API_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-secret - KUBERNETES_SERVER_TOKEN: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-token - KUBERNETES_SERVER_URL: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-server - ODOO_OAUTH_CLIENT_ID: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-id - ODOO_OAUTH_CLIENT_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-secret -type: Opaque diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasServiceAccount.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasServiceAccount.yaml deleted file mode 100644 index b5cb892..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasServiceAccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - annotations: {} - labels: - name: exoscale-dbaas - name: exoscale-dbaas - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageClusterRole.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageClusterRole.yaml deleted file mode 100644 index b64d5df..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageClusterRole.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: {} - labels: - name: appcat-cloudcollector-exoscale-objectstorage - name: appcat:cloudcollector:exoscale:objectstorage -rules: - - apiGroups: - - '*' - resources: - - namespaces - verbs: - - get - - list - - apiGroups: - - exoscale.crossplane.io - resources: - - buckets - verbs: - - get - - list - - watch diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageConfigMap.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageConfigMap.yaml deleted file mode 100644 index 2a050c5..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageConfigMap.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -data: - APPUIO_MANAGED_SALES_ORDER: '' - BILLING_HOUR: '6' - CLUSTER_ID: c-green-test-1234 - COLLECT_INTERVAL: '23' - ODOO_OAUTH_TOKEN_URL: https://test.central.vshn.ch/api/v2/authentication/oauth2/token - ODOO_URL: https://test.central.vshn.ch/api/v2/product_usage_report_POST - PROM_URL: localhost:9090 - UOM: '{ }' -kind: ConfigMap -metadata: - name: exoscale-objectstorage-env - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageExporter.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageExporter.yaml deleted file mode 100644 index 5587422..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageExporter.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-objectstorage - name: exoscale-objectstorage - namespace: appuio-cloud-reporting -spec: - minReadySeconds: 30 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-objectstorage - strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate - template: - metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-objectstorage - spec: - containers: - - args: - - exoscale - - objectstorage - env: [] - envFrom: - - configMapRef: - name: exoscale-objectstorage-env - - secretRef: - name: credentials-exoscale-objectstorage - image: ghcr.io/vshn/billing-collector-cloudservices:new-billing-cloud - imagePullPolicy: IfNotPresent - name: exporter - ports: [] - stdin: false - tty: false - volumeMounts: [] - imagePullSecrets: [] - initContainers: [] - serviceAccount: exoscale-objectstorage - terminationGracePeriodSeconds: 30 - volumes: [] diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageRoleBinding.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageRoleBinding.yaml deleted file mode 100644 index 167e6f8..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageRoleBinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: {} - labels: - name: exoscale-objectstorage - name: exoscale-objectstorage -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: appcat:cloudcollector:exoscale:objectstorage -subjects: - - kind: ServiceAccount - name: exoscale-objectstorage - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageSecrets.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageSecrets.yaml deleted file mode 100644 index ae80883..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageSecrets.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -data: {} -kind: Secret -metadata: - annotations: {} - labels: - name: credentials-exoscale-objectstorage - name: credentials-exoscale-objectstorage - namespace: appuio-cloud-reporting -stringData: - EXOSCALE_API_KEY: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-key - EXOSCALE_API_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-secret - KUBERNETES_SERVER_TOKEN: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-token - KUBERNETES_SERVER_URL: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-server - ODOO_OAUTH_CLIENT_ID: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-id - ODOO_OAUTH_CLIENT_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-secret -type: Opaque diff --git a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageServiceAccount.yaml b/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageServiceAccount.yaml deleted file mode 100644 index b74ea1d..0000000 --- a/component/tests/golden/exoscale-metrics-collector-cloud/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageServiceAccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - annotations: {} - labels: - name: exoscale-objectstorage - name: exoscale-objectstorage - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/apps/billing-collector-cloudservices.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasClusterRole.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasClusterRole.yaml deleted file mode 100644 index b52c355..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasClusterRole.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: {} - labels: - name: appcat-cloudcollector-exoscale-dbaas - name: appcat:cloudcollector:exoscale:dbaas -rules: - - apiGroups: - - '*' - resources: - - namespaces - verbs: - - get - - list - - apiGroups: - - exoscale.crossplane.io - resources: - - postgresqls - - mysqls - - redis - - opensearches - - kafkas - verbs: - - get - - list - - watch diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasConfigMap.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasConfigMap.yaml deleted file mode 100644 index 6c902cf..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasConfigMap.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -data: - APPUIO_MANAGED_SALES_ORDER: '12345' - CLUSTER_ID: c-green-test-1234 - COLLECT_INTERVAL: '1' - ODOO_OAUTH_TOKEN_URL: https://test.central.vshn.ch/api/v2/authentication/oauth2/token - ODOO_URL: https://test.central.vshn.ch/api/v2/product_usage_report_POST - PROM_URL: '' - UOM: '{ }' -kind: ConfigMap -metadata: - name: exoscale-dbaas-env - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasExporter.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasExporter.yaml deleted file mode 100644 index 0130a25..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasExporter.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-dbaas - name: exoscale-dbaas - namespace: appuio-cloud-reporting -spec: - minReadySeconds: 30 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-dbaas - strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate - template: - metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-dbaas - spec: - containers: - - args: - - exoscale - - dbaas - env: [] - envFrom: - - configMapRef: - name: exoscale-dbaas-env - - secretRef: - name: credentials-exoscale-dbaas - image: ghcr.io/vshn/billing-collector-cloudservices:new-billing-cloud - imagePullPolicy: IfNotPresent - name: exporter - ports: [] - stdin: false - tty: false - volumeMounts: [] - imagePullSecrets: [] - initContainers: [] - serviceAccount: exoscale-dbaas - terminationGracePeriodSeconds: 30 - volumes: [] diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasRoleBinding.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasRoleBinding.yaml deleted file mode 100644 index df8d2b0..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasRoleBinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: {} - labels: - name: exoscale-dbaas - name: exoscale-dbaas -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: appcat:cloudcollector:exoscale:dbaas -subjects: - - kind: ServiceAccount - name: exoscale-dbaas - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasSecrets.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasSecrets.yaml deleted file mode 100644 index 32aca88..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasSecrets.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -data: {} -kind: Secret -metadata: - annotations: {} - labels: - name: credentials-exoscale-dbaas - name: credentials-exoscale-dbaas - namespace: appuio-cloud-reporting -stringData: - EXOSCALE_API_KEY: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-key - EXOSCALE_API_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-secret - KUBERNETES_SERVER_TOKEN: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-token - KUBERNETES_SERVER_URL: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-server - ODOO_OAUTH_CLIENT_ID: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-id - ODOO_OAUTH_CLIENT_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-secret -type: Opaque diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasServiceAccount.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasServiceAccount.yaml deleted file mode 100644 index b5cb892..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoDbaasServiceAccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - annotations: {} - labels: - name: exoscale-dbaas - name: exoscale-dbaas - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageClusterRole.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageClusterRole.yaml deleted file mode 100644 index b64d5df..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageClusterRole.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: {} - labels: - name: appcat-cloudcollector-exoscale-objectstorage - name: appcat:cloudcollector:exoscale:objectstorage -rules: - - apiGroups: - - '*' - resources: - - namespaces - verbs: - - get - - list - - apiGroups: - - exoscale.crossplane.io - resources: - - buckets - verbs: - - get - - list - - watch diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageConfigMap.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageConfigMap.yaml deleted file mode 100644 index b892bb2..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageConfigMap.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -data: - APPUIO_MANAGED_SALES_ORDER: '12345' - BILLING_HOUR: '6' - CLUSTER_ID: c-green-test-1234 - COLLECT_INTERVAL: '23' - ODOO_OAUTH_TOKEN_URL: https://test.central.vshn.ch/api/v2/authentication/oauth2/token - ODOO_URL: https://test.central.vshn.ch/api/v2/product_usage_report_POST - PROM_URL: '' - UOM: '{ }' -kind: ConfigMap -metadata: - name: exoscale-objectstorage-env - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageExporter.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageExporter.yaml deleted file mode 100644 index 5587422..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageExporter.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-objectstorage - name: exoscale-objectstorage - namespace: appuio-cloud-reporting -spec: - minReadySeconds: 30 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-objectstorage - strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate - template: - metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - name: exoscale-objectstorage - spec: - containers: - - args: - - exoscale - - objectstorage - env: [] - envFrom: - - configMapRef: - name: exoscale-objectstorage-env - - secretRef: - name: credentials-exoscale-objectstorage - image: ghcr.io/vshn/billing-collector-cloudservices:new-billing-cloud - imagePullPolicy: IfNotPresent - name: exporter - ports: [] - stdin: false - tty: false - volumeMounts: [] - imagePullSecrets: [] - initContainers: [] - serviceAccount: exoscale-objectstorage - terminationGracePeriodSeconds: 30 - volumes: [] diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageRoleBinding.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageRoleBinding.yaml deleted file mode 100644 index 167e6f8..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageRoleBinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: {} - labels: - name: exoscale-objectstorage - name: exoscale-objectstorage -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: appcat:cloudcollector:exoscale:objectstorage -subjects: - - kind: ServiceAccount - name: exoscale-objectstorage - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageSecrets.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageSecrets.yaml deleted file mode 100644 index ae80883..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageSecrets.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -data: {} -kind: Secret -metadata: - annotations: {} - labels: - name: credentials-exoscale-objectstorage - name: credentials-exoscale-objectstorage - namespace: appuio-cloud-reporting -stringData: - EXOSCALE_API_KEY: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-key - EXOSCALE_API_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-secret - KUBERNETES_SERVER_TOKEN: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-token - KUBERNETES_SERVER_URL: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/cluster-server - ODOO_OAUTH_CLIENT_ID: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-id - ODOO_OAUTH_CLIENT_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/odoo-oauth-client-secret -type: Opaque diff --git a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageServiceAccount.yaml b/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageServiceAccount.yaml deleted file mode 100644 index b74ea1d..0000000 --- a/component/tests/golden/exoscale-metrics-collector-managed/billing-collector-cloudservices/billing-collector-cloudservices/exoObjectStorageServiceAccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - annotations: {} - labels: - name: exoscale-objectstorage - name: exoscale-objectstorage - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/apps/exoscale-metrics-collector.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/apps/exoscale-metrics-collector.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasClusterRole.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasClusterRole.yaml deleted file mode 100644 index b52c355..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasClusterRole.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: {} - labels: - name: appcat-cloudcollector-exoscale-dbaas - name: appcat:cloudcollector:exoscale:dbaas -rules: - - apiGroups: - - '*' - resources: - - namespaces - verbs: - - get - - list - - apiGroups: - - exoscale.crossplane.io - resources: - - postgresqls - - mysqls - - redis - - opensearches - - kafkas - verbs: - - get - - list - - watch diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasConfigMap.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasConfigMap.yaml deleted file mode 100644 index 3d9941d..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasConfigMap.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -data: - APPUIO_MANAGED_SALES_ORDER: '' - CLUSTER_ID: c-green-test-1234 - COLLECT_INTERVAL: '1' - ODOO_OAUTH_TOKEN_URL: https://test.central.vshn.ch/api/v2/authentication/oauth2/token - ODOO_URL: https://test.central.vshn.ch/api/v2/authentication/oauth2/token - PROM_URL: localhost:9090 - TENANT_ID: '' -kind: ConfigMap -metadata: - name: exoscale-dbaas-env - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasExporter.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasExporter.yaml deleted file mode 100644 index c8f58ea..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasExporter.yaml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - app.kubernetes.io/part-of: appuio-cloud-reporting - name: exoscale-dbaas - name: exoscale-dbaas - namespace: appuio-cloud-reporting -spec: - minReadySeconds: 30 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - app.kubernetes.io/part-of: appuio-cloud-reporting - name: exoscale-dbaas - strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate - template: - metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - app.kubernetes.io/part-of: appuio-cloud-reporting - name: exoscale-dbaas - spec: - containers: - - args: - - exoscale - - dbaas - env: [] - envFrom: - - configMapRef: - name: exoscale-dbaas-env - - secretRef: - name: credentials-exoscale-dbaas - image: ghcr.io/vshn/billing-collector-cloudservices:change_exporter - imagePullPolicy: IfNotPresent - livenessProbe: - httpGet: - path: /metrics - port: 9123 - periodSeconds: 30 - name: exporter - ports: - - containerPort: 9123 - name: exporter - readinessProbe: - httpGet: - path: /metrics - port: 9123 - periodSeconds: 30 - stdin: false - tty: false - volumeMounts: [] - imagePullSecrets: [] - initContainers: [] - serviceAccount: exoscale-dbaas - terminationGracePeriodSeconds: 30 - volumes: [] diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasPodMonitor.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasPodMonitor.yaml deleted file mode 100644 index a21bc3d..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasPodMonitor.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: PodMonitor -metadata: - name: exoscale-dbaas-podmonitor - namespace: appuio-cloud-reporting -spec: - podMetricsEndpoints: - - port: exporter - selector: - matchLabels: - name: exoscale-dbaas diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasRoleBinding.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasRoleBinding.yaml deleted file mode 100644 index df8d2b0..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasRoleBinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: {} - labels: - name: exoscale-dbaas - name: exoscale-dbaas -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: appcat:cloudcollector:exoscale:dbaas -subjects: - - kind: ServiceAccount - name: exoscale-dbaas - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasSecrets.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasSecrets.yaml deleted file mode 100644 index a20d548..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasSecrets.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -data: {} -kind: Secret -metadata: - annotations: {} - labels: - name: credentials-exoscale-dbaas - name: credentials-exoscale-dbaas - namespace: appuio-cloud-reporting -stringData: - EXOSCALE_API_KEY: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-metrics-collector/exoscale-key - EXOSCALE_API_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-metrics-collector/exoscale-secret - ODOO_OAUTH_CLIENT_ID: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-metrics-collector/odoo-oauth-client-id - ODOO_OAUTH_CLIENT_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-metrics-collector/odoo-oauth-client-secret -type: Opaque diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasServiceAccount.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasServiceAccount.yaml deleted file mode 100644 index b5cb892..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoDbaasServiceAccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - annotations: {} - labels: - name: exoscale-dbaas - name: exoscale-dbaas - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageClusterRole.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageClusterRole.yaml deleted file mode 100644 index b64d5df..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageClusterRole.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: {} - labels: - name: appcat-cloudcollector-exoscale-objectstorage - name: appcat:cloudcollector:exoscale:objectstorage -rules: - - apiGroups: - - '*' - resources: - - namespaces - verbs: - - get - - list - - apiGroups: - - exoscale.crossplane.io - resources: - - buckets - verbs: - - get - - list - - watch diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageConfigMap.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageConfigMap.yaml deleted file mode 100644 index 15005bc..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageConfigMap.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -data: - APPUIO_MANAGED_SALES_ORDER: '' - BILLING_HOUR: '6' - CLUSTER_ID: c-green-test-1234 - COLLECT_INTERVAL: '23' - ODOO_OAUTH_TOKEN_URL: https://test.central.vshn.ch/api/v2/authentication/oauth2/token - ODOO_URL: https://test.central.vshn.ch/api/v2/authentication/oauth2/token - PROM_URL: localhost:9090 - TENANT_ID: '' -kind: ConfigMap -metadata: - name: exoscale-objectstorage-env - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageExporter.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageExporter.yaml deleted file mode 100644 index 0452cc3..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageExporter.yaml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - app.kubernetes.io/part-of: appuio-cloud-reporting - name: exoscale-objectstorage - name: exoscale-objectstorage - namespace: appuio-cloud-reporting -spec: - minReadySeconds: 30 - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - app.kubernetes.io/part-of: appuio-cloud-reporting - name: exoscale-objectstorage - strategy: - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% - type: RollingUpdate - template: - metadata: - annotations: {} - labels: - app.kubernetes.io/component: billing-collector-cloudservices - app.kubernetes.io/managed-by: commodore - app.kubernetes.io/name: billing-collector-cloudservices - app.kubernetes.io/part-of: appuio-cloud-reporting - name: exoscale-objectstorage - spec: - containers: - - args: - - exoscale - - objectstorage - env: [] - envFrom: - - configMapRef: - name: exoscale-objectstorage-env - - secretRef: - name: credentials-exoscale-objectstorage - image: ghcr.io/vshn/billing-collector-cloudservices:change_exporter - imagePullPolicy: IfNotPresent - livenessProbe: - httpGet: - path: /metrics - port: 9123 - periodSeconds: 30 - name: exporter - ports: - - containerPort: 9123 - name: exporter - readinessProbe: - httpGet: - path: /metrics - port: 9123 - periodSeconds: 30 - stdin: false - tty: false - volumeMounts: [] - imagePullSecrets: [] - initContainers: [] - serviceAccount: exoscale-objectstorage - terminationGracePeriodSeconds: 30 - volumes: [] diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStoragePodMonitor.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStoragePodMonitor.yaml deleted file mode 100644 index add61d7..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStoragePodMonitor.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: PodMonitor -metadata: - name: exoscale-objectstorage-podmonitor - namespace: appuio-cloud-reporting -spec: - podMetricsEndpoints: - - port: exporter - selector: - matchLabels: - name: exoscale-objectstorage diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageRoleBinding.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageRoleBinding.yaml deleted file mode 100644 index 167e6f8..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageRoleBinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: {} - labels: - name: exoscale-objectstorage - name: exoscale-objectstorage -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: appcat:cloudcollector:exoscale:objectstorage -subjects: - - kind: ServiceAccount - name: exoscale-objectstorage - namespace: appuio-cloud-reporting diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageSecrets.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageSecrets.yaml deleted file mode 100644 index 5b786a9..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageSecrets.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -data: {} -kind: Secret -metadata: - annotations: {} - labels: - name: credentials-exoscale-objectstorage - name: credentials-exoscale-objectstorage - namespace: appuio-cloud-reporting -stringData: - EXOSCALE_API_KEY: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-metrics-collector/exoscale-key - EXOSCALE_API_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-metrics-collector/exoscale-secret - ODOO_OAUTH_CLIENT_ID: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-metrics-collector/odoo-oauth-client-id - ODOO_OAUTH_CLIENT_SECRET: t-silent-test-1234/c-green-test-1234/billing-collector-cloudservices/exoscale-metrics-collector/odoo-oauth-client-secret -type: Opaque diff --git a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageServiceAccount.yaml b/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageServiceAccount.yaml deleted file mode 100644 index b74ea1d..0000000 --- a/component/tests/golden/exoscale-metrics-collector/exoscale-metrics-collector/exoscale-metrics-collector/exoObjectStorageServiceAccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - annotations: {} - labels: - name: exoscale-objectstorage - name: exoscale-objectstorage - namespace: appuio-cloud-reporting diff --git a/pkg/exoscale/dbaas_test.go b/pkg/exoscale/dbaas_test.go index a744f16..7c73a21 100644 --- a/pkg/exoscale/dbaas_test.go +++ b/pkg/exoscale/dbaas_test.go @@ -14,6 +14,8 @@ import ( func TestDBaaS_aggregatedDBaaS(t *testing.T) { ctx := getTestContext(t) + ds, cancel := ts.setupDBaaS() + key1 := NewKey("vshn-xyz", "hobbyist-2", string(exofixtures.PostgresDBaaSType)) key2 := NewKey("vshn-abc", "business-128", string(exofixtures.PostgresDBaaSType))