dff-ns
by DFF
A Helm chart for creating namespaces
About this chart
dff-ns
dff-ns is a simple Helm chart for creating one or more Kubernetes namespaces from a single deployment.
This chart is useful for preparing environments before deploying applications, especially in GitOps setups like Argo CD.
📦 Installation
1. Add the Helm repository
First, add the Helm repo hosted on GitLab Pages:
helm repo add dff-ns https://dff-helm.gitlab.io/dff-ns
helm repo update
2. Create a values.yaml file
Create a values.yaml file with the following content:
namespaces:
- name: ns1
- name: ns2
3. Install the chart
Install the chart using the following command:
helm install dff-ns dff-ns/dff-ns -f values.yaml
4. Verify the installation
Verify that the namespaces have been created:
kubectl get namespaces
5. Uninstall the chart
To uninstall the chart, run:
helm uninstall dff-ns
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: dff-ns
namespace: argocd
spec:
project: default
source:
repoURL: https://dff-helm.gitlab.io/dff-ns
chart: dff-ns
targetRevision: "0.1.0"
helm:
values: |
namespaces:
- ns-dev
- ns-qat
- ns-stg
- ns-prd
destination:
server: https://kubernetes.default.svc
namespace: default
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
Deploy dff-ns with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has dff-ns 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartdff-ns is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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