pnnl-miscscripts/tenant-namespace

Chart version: 0.6.7
Api version: v1
App version: 0.6.7
Chart for setting up a tenants namespace with all the goodies
application
Chart Type
Active
Status
Unknown
License
196
Downloads
https://pnnl-miscscripts.github.io/charts
Set me up:
helm repo add center https://repo.chartcenter.io
Install Chart:
helm install tenant-namespace center/pnnl-miscscripts/tenant-namespace
Versions (0)

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" }}'