helper-odf-bucket-secret

by tjungbauer

Helm chartv1.0.6Apache-2.0Verified publisher

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:

  1. access_key_id
  2. access_key_secret
  3. bucketnames
  4. endpoint
  5. region

Dependencies

This chart has the following dependencies:

RepositoryNameVersion
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

NameEmailUrl
tjungbauer[email protected]https://blog.stderr.at/

Sources

Source:

Source code: https://github.com/tjungbauer/helm-charts/tree/main/charts/helper-odf-bucket-secret

Parameters

Values

KeyTypeDefaultDescription
bucket.namestring"bucket-name"Name of the Bucket shall has been created.
enabledboolfalseEnable Job to create a Secret.
keysobject{"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_idstringaccess_key_idOverwrite access_key_id key.
keys.access_key_secretstringaccess_key_secretOverwrite access_key_secret key.
keys.bucketstringbucketOverwrite bucket key.
keys.endpointstringendpointOverwrite endpoint key.
keys.regionstringregionOverwrite region key. Region is only set if set_region is true.
namespacestring"namespace-with-target-resource-and-bucket"Namespace where target resource is deployed and where the Secret shall be created.
secretnamestring"secretname-to-create"Name of Secret that shall be created.
set_regionboolfalseSet region key.
syncwaveint3Syncwave for Argo CD.
ttlSecondsAfterFinishedint600Seconds 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charthelper-odf-bucket-secret is pinned at v1.0.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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