0.1.9 • Published 3 years ago
kustodize v0.1.9
Kustodize
This project aims at providing a convention over configuration style wrapper of
kustomize.
The way that kustomize focuses on representing infrastructural differences and changes as patches
has proven to provide conformity in the language (YAML) between combined states and each composition.
And kustodize is implemented in a manner that put such harmony of kustomize in "kustody", while in return,
empower us with the realization of treating configuration files as functions of records to desired states directly.
Planned Features
- Unrestricted basic templating:
{{ VARIABLE }} - Type detection and character escaping in YAML templates
- Auto-inclusion of resource files
- Auto-inclusion of secret and configmap files as
kustomizegenerators - Automatic decryption of secrets with
ansible-vault
Usage
File structure:
~/someApp
├── base
│ ├── deployment.yaml
│ ├── kustomization.yaml
│ └── service.yaml
├── build
├── overlays
│ ├── development
│ │ ├── cpu_count.yaml
│ │ ├── kustomization.yaml
│ │ └── replica_count.yaml
│ └── production
│ ├── secret
│ │ └── credentials
│ │ └── private_key
│ ├── cpu_count.yaml
│ ├── kustomization.yaml
│ └── replica_count.yaml
└── kustodization.yamlIn addition to kustomize, kustodization.yaml marks the project root and hence the build directory for outputs.
To generate YAML (kubectl need to be available on your path):
kustodize build ~/someApp/overlays/productionOr you may apply it directly to a cluster as well:
kustodize generate ~/someApp/overlays/production | xargs kubectl apply -kInstallation
npm install -g kustodizePrerequisites
- Node.js
kubectl(optional, required for thebuildcommand)ansible-base(optional, required for decryption of secrets)