helper-odf-bucket-secret
by tjungbauer
Some services like Tempo require a secret with a specifc key for the object sotrage. When a S3 bucket is created via OpenShift Data Foundation, then this chart will help to generate a correct secret. (This is an evolution of helper-loki-bucket-secret)
About this chart
helper-odf-bucket-secret
Description
Some services like Tempo require a secret with a specifc key for the object sotrage. When a S3 bucket is created via OpenShift Data Foundation, then this chart will help to generate a correct secret. (This is an evolution of helper-loki-bucket-secret)
This Helm Chart is required when you create a Bucket via Open Data Foundation and the service that wants to use this bucket requires a secret object with specific keys (i.g. Loki or Tempo) The bucket in our case is created by OpenShift Data Foundation. ODF will create a Secret and a ConfigMap using the name of the Bucket. The Chart will then create a Job, that mounts the Secret and Configmap and creates a new Secret with the required keys.
This chart is an evolution of helper-loki-bucket-secret and was created to be more generic (because of TempoStack requires a different Secret than Loki ....)
The keys are:
- access_key_id
- access_key_secret
- bucketnames
- endpoint
- region
Dependencies
This chart has the following dependencies:
| Repository | Name | Version |
|---|---|---|
| https://charts.stderr.at/ | tpl | ~1.0.28 |
It is best used with a full GitOps approach such as Argo CD does. For example, https://github.com/tjungbauer/openshift-clusterconfig-gitops (see clusters/management-cluster/setup-openshift-logging)
Maintainers
| Name | Url | |
|---|---|---|
| tjungbauer | [email protected] | https://blog.stderr.at/ |
Sources
Source:
- https://github.com/tjungbauer/helm-charts
- https://charts.stderr.at/
- https://github.com/tjungbauer/openshift-clusterconfig-gitops
Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/helper-odf-bucket-secret
Parameters
Values
| Key | Type | Default | Description |
|---|---|---|---|
| bucket.name | string | "bucket-name" | Name of the Bucket shall has been created. |
| enabled | bool | false | Enable Job to create a Secret. |
| keys | object | {"access_key_id":"access_key_id","access_key_secret":"access_key_secret","bucket":"bucket","endpoint":"endpoint","region":"region"} | Keys that shall be used to create the Secret. |
| keys.access_key_id | string | access_key_id | Overwrite access_key_id key. |
| keys.access_key_secret | string | access_key_secret | Overwrite access_key_secret key. |
| keys.bucket | string | bucket | Overwrite bucket key. |
| keys.endpoint | string | endpoint | Overwrite endpoint key. |
| keys.region | string | region | Overwrite region key. Region is only set if set_region is true. |
| namespace | string | "namespace-with-target-resource-and-bucket" | Namespace where target resource is deployed and where the Secret shall be created. |
| secretname | string | "secretname-to-create" | Name of Secret that shall be created. |
| set_region | bool | false | Set region key. |
| syncwave | int | 3 | Syncwave for Argo CD. |
| ttlSecondsAfterFinished | int | 600 | Seconds to retain the finished bucket-secret Job before Kubernetes deletes it |
Example values
---
# -- Enable Job to create a Secret.
# @default -- false
enabled: true
# -- Syncwave for Argo CD.
# @default -- 3
syncwave: 3
# -- Namespace where target resource is deployed and where the Secret shall be created.
namespace: namespace-with-target-resource-and-bucket
# -- Name of Secret that shall be created.
secretname: secretname-to-create
# Bucket Configuration
bucket:
# -- Name of the Bucket shall has been created.
name: bucket-name
Installing the Chart
To install the chart with the release name my-release:
helm install my-release tjungbauer/<chart-name>>
The command deploys the chart on the Kubernetes cluster in the default configuration.
Uninstalling the Chart
To uninstall/delete the my-release deployment:
helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Autogenerated from chart metadata using helm-docs v1.14.2
Deploy helper-odf-bucket-secret with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has helper-odf-bucket-secret on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the charthelper-odf-bucket-secret is pinned at v1.0.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply