common

by bhuwanupadhyay

Helm chartv0.0.1Verified publisher

Function library for bhuwanupadhyay's helm charts

About this chart

common

Function library for bhuwanupadhyay's helm charts

Since a lot of charts follow the same pattern this library was built to reduce maintenance cost between the charts that use it and try achieve a goal of being DRY.

TL;DR

$ helm repo add bhuwanupadhyay https://bhuwanupadhyay.github.io/helm-charts/
$ helm repo update
$ helm install common bhuwanupadhyay/common

Creating a new chart

First be sure to checkout the many charts that already use this like qBittorrent, node-red or the many others in this repository.

Include this chart as a dependency in your Chart.yaml e.g.

# Chart.yaml
dependencies:
  - name: common
    version: 0.0.1
    repository: https://bhuwanupadhyay.github.io/helm-charts/

Write a values.yaml with some basic defaults you want to present to the user e.g.

# Default values for node-red.

image:
  repository: nodered/node-red
  pullPolicy: IfNotPresent
  tag: 1.2.5

strategy:
  type: Recreate

# See more environment varaibles in the node-red documentation
# https://nodered.org/docs/getting-started/docker
env: {}
  # TZ:
  # NODE_OPTIONS:
  # NODE_RED_ENABLE_PROJECTS:
  # NODE_RED_ENABLE_SAFE_MODE:
  # FLOWS:

service:
  port:
    port: 80
    containerPort: 8080
    name: http
    targetPort: http

persistence:
  data:
    enabled: false
    emptyDir: false
    mountPath: /data

If not using a service, set the service.enabled to false.

...
service:
  enabled: false
...

Add files to the templates folder.

# templates/common.yaml
{{ include "common.all . }}

# templates/NOTES.txt
{{ include "common.notes.defaultNotes" . }}

If testing locally make sure you update the dependencies with:

helm dependency update

Autogenerated from chart metadata using helm-docs v1.11.0

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 v0.0.1 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