Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zugao committed Oct 12, 2022
1 parent a7cdf1d commit 0132741
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
16 changes: 13 additions & 3 deletions docs/modules/ROOT/pages/how-tos/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

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 K8sCluster access.

== Sources

The data is matched from k8s cluster and exoscale organization.
Each source credentials are saved into the cronjob secret with a reference to vault.
The K8s Service Account token is required to have read permissions on namespace and bucket (either exoscale or cloudscale) resources.
The Access Key (IAM Key) from an exoscale organization is required to have read access across all buckets.

== Example

Expand All @@ -16,10 +24,12 @@ parameters:
exoscale_metrics_collector:
namespace: 'appuio-cloud-reporting'
secrets:
exoscale:
cronjob:
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}"
EXOSCALE_API_KEY: "?{vaultkv:${cluster:tenant}/${cluster:name}/${_instance}/exoscale-key}"
EXOSCALE_API_SECRET: "?{vaultkv:${cluster:tenant}/${cluster:name}/${_instance}/exoscale-secret}"
K8S_SERVER_URL: "?{vaultkv:${cluster:tenant}/${cluster:name}/${_instance}/cluster-server}"
K8S_TOKEN: "?{vaultkv:${cluster:tenant}/${cluster:name}/${_instance}/cluster-token}"
----

See the xref:references/parameters.adoc[parameters] reference for a full list of parameters.
24 changes: 21 additions & 3 deletions docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.exoscale.stringData.EXOSCALE_API_KEY`
[horizontal]
type:: string
Expand All @@ -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.exoscale.stringData.EXOSCALE_API_SECRET`
[horizontal]
type:: string
Expand All @@ -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.exoscale.stringData.K8S_SERVER_URL`
[horizontal]
type:: string
default:: Required.
The Kubernetes server URL.
== `secrets.exoscale.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 access to bucket managed resource.

0 comments on commit 0132741

Please sign in to comment.