tenant-namespace

by kfox1111

Helm chartv0.6.24App 0.6.24

Chart for setting up a tenants namespace with all the goodies

About this chart

tenant-namespace is a chart that lets you quickly provision a namespace for a tenant

TL;DR;

First, put whatever cluster specific default values into mycluster-tenant-namespace-values.yaml

read -p 'Enter Tenant name: ' tenant
helm install namespace --name $tenant --namespace ${tenant}-admin \
  -f mycluster-tenant-namespace-values.yaml \
  --set magicnamespace.namespace=$tenant \
  --set ingress.controller.scope.namespace=$tenant

To get the ci secret to put into your ci system, you can do something like:

kubectl get secret -n $tenant $(kubectl get serviceaccount -n $tenant ci -o go-template='{{ (index .secrets 0).name }}') -o go-template='{{ .data.token | base64decode }}{{ printf "\n" }}'

Deploy tenant-namespace with OpenTenant

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