common

by emberstack

Helm chartv1.0.22App 1.0.0Verified publisher

A library Helm chart that provides common templates and helpers

About this chart

common

A library Helm chart that provides common templates and helpers used by all EmberStack charts.

Overview

This is a library chart — it cannot be installed directly. It provides reusable named templates for:

  • Names & labels — fullname, namespace, standard Kubernetes labels, match labels
  • Images — registry/repository/tag resolution with global overrides, pull secrets
  • Security — pod and container security context rendering, OpenShift compatibility
  • Secrets — secret lookup and generation helpers
  • Affinities — pod affinity/anti-affinity presets, node affinity presets
  • Resources — t-shirt size resource presets (nano, micro, small, medium, large, xlarge, 2xlarge)
  • Storage — storage class resolution with global override
  • Ingress — backend and TLS rendering for Ingress resources
  • Capabilities — API version detection for different Kubernetes versions
  • Validation — required value assertions
  • Template rendering — render strings as templates (tplvalues)
  • Annotations — annotation rendering helpers
  • Utilities — getValueFromKey, getKeyFromList, checksumTemplate helpers
  • Item helpers — enabled state resolution for list/map items

Usage

Add as a dependency in your Chart.yaml:

dependencies:
  - name: common
    version: 1.x.x
    repository: oci://ghcr.io/emberstack/helm-charts

Then use the templates in your chart:

metadata:
  name: {{ include "common.names.fullname" . }}
  labels:
    {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}

Global Values

The library respects these global overrides:

ParameterDescription
global.image.registryOverride image registry for all containers
global.image.tagOverride image tag for all containers
global.image.pullSecretsPull secrets for all containers
global.storageClassOverride storage class
global.kubeVersionOverride detected Kubernetes version
global.compatibility.openshift.adaptSecurityContextOpenShift security context adaptation (force, disabled, auto)

Deploy common with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has common 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 chartcommon is pinned at v1.0.22 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