diff --git a/docs/modules/ROOT/pages/how-tos/installation.adoc b/docs/modules/ROOT/pages/how-tos/installation.adoc index 59f3389..36c1f90 100644 --- a/docs/modules/ROOT/pages/how-tos/installation.adoc +++ b/docs/modules/ROOT/pages/how-tos/installation.adoc @@ -4,6 +4,13 @@ This component requires https://github.com/appuio/component-appuio-cloud-reporting[component-appuio-cloud-reporting] and is installed into the same namespace. This is required for this component to be able to access the billing database and its connection secrets. +It also requires an Exoscale IAMKey and a Kubernetes/OpenShift Service Account token in the target cluster to get `buckets.exoscale.crossplane.io` resources. + +== Sources + +The data is matched from k8s cluster and Exoscale organization. +The Kubernetes Service Account token is required to have `get` permissions on `Namespaces` and `buckets.exoscale.crossplane.io` resources. +The Access Key (IAM Key) from an Exoscale organization is required to have read access across all SOS buckets. == Example @@ -14,12 +21,7 @@ applications: parameters: exoscale_metrics_collector: - namespace: 'appuio-cloud-reporting' - secrets: - exoscale: - stringData: - api_key: "?{vaultkv:${cluster:tenant}/${cluster:name}/exoscale-metrics-collector/api_key}" - api_secret: "?{vaultkv:${cluster:tenant}/${cluster:name}/exoscale-metrics-collector/api_secret}" + schedule: '10 10,16,20 * * *' ---- See the xref:references/parameters.adoc[parameters] reference for a full list of parameters. diff --git a/docs/modules/ROOT/pages/how-tos/multi-instance.adoc b/docs/modules/ROOT/pages/how-tos/multi-instance.adoc new file mode 100644 index 0000000..b86f00e --- /dev/null +++ b/docs/modules/ROOT/pages/how-tos/multi-instance.adoc @@ -0,0 +1,44 @@ += Deploy multiple instances + +This guide provides an example how to deploy multiple instances of this component. + +== Requirements + + +. Prepare catalog by configuring 2 instances ++ +[source,yaml] +---- +applications: + - exoscale-metrics-collector as collector-exoscale-ch-gva-2 <1> + - exoscale-metrics-collector as collector-cloudscale-rma-0 <2> +parameters: + appuio_cloud_reporting: + namespace: 'appuio-cloud-reporting' + database: + name: 'reporting' + host: 'reporting-db.appuio-reporting.svc' + parameters: 'sslmode=disable' + password: 'passw0rd' + port: 5432 +---- +<1> Instance one with alias name collector-exoscale-ch-gva-2 +<2> Instance two with alias name collector-cloudscale-rma-0 ++ + +. Add relevant entries to Vault ++ +[source,bash] +---- +parent="clusters/kv/${TENANT_ID}/${CLUSTER_ID}" +instance_1="collector-exoscale-ch-gva-2" +instance_2="collector-cloudscale-rma-0" + +vault kv put "${parent}/exoscale-metrics-collector/${instance_1}" exoscale-key= exoscale-secret= cluster-server= cluster-token= +vault kv put "${parent}/exoscale-metrics-collector/${instance_2}" exoscale-key= exoscale-secret= cluster-server= cluster-token= +---- ++ + +. Compile and push the cluster catalog +. Wait until changes are applied +. Verify that the instances are up and configured correctly diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index 07c99b7..616fb89 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -27,7 +27,7 @@ default:: `10 10,16,20 * * *` The cron schedule at which the metrics collection job is spawned. -== `secrets.exoscale.stringData.api_key` +== `secrets.credentials.stringData.EXOSCALE_API_KEY` [horizontal] type:: string @@ -38,7 +38,7 @@ The Exoscale API key. You need to get the token from the https://portal.exoscale.com[Exoscale Console]. You need to select the correct account (token is limited to one account), choose "IAM" in the menu and generate a new key pair. -== `secrets.exoscale.stringData.api_secret` +== `secrets.credentials.stringData.EXOSCALE_API_SECRET` [horizontal] type:: string @@ -47,4 +47,22 @@ default:: Required. The Exoscale API secret. Second part of the Exoscale API credentials. -See api_key for instructions. +See EXOSCALE_API_KEY for instructions. + +== `secrets.credentials.stringData.K8S_SERVER_URL` + +[horizontal] +type:: string +default:: Required. + +The Kubernetes server URL. + +== `secrets.credentials.stringData.K8S_TOKEN` + +[horizontal] +type:: string +default:: Required. + +The token to connect to a Kubernetes cluster. + +The Service Account connected to this token should have `get` and `list` permissions to `buckets.exoscale.crossplane.io` managed resource.