Skip to main content

A Cookiecutter template to scaffold Helm + Kustomize Kubernetes deployments with per-environment overlays.

Project description

cookiecutter-kubernetes-deployment

CI License: MIT Python uv

A Cookiecutter template that scaffolds a Kubernetes deployment combining a Helm upstream chart with Kustomize base + per-environment overlays. A post-generation hook resolves the chart version and renders its values.yaml automatically.

Features

  • Helm + Kustomize — a vendored upstream Helm chart wrapped in a Kustomize base with development / production overlays.
  • Dynamic chart details — the post-gen hook pulls the latest chart version and values so the deployment starts up to date.
  • Generated governance — the rendered project ships its own README, CONTRIBUTING, CODE_OF_CONDUCT and a license of your choice (MIT / GPL / Proprietary).

Requirements

  • Python 3.12+
  • Helm and helm-docs on your PATH — the post-generation hook calls them (with network access to the chart repo).

Usage

Generate a deployment straight from GitHub:

uvx cookiecutter gh:goabonga/cookiecutter-kubernetes-deployment
# or: cookiecutter gh:goabonga/cookiecutter-kubernetes-deployment

Or install the published template from PyPI and bake the bundled copy:

pip install cookiecutter-kubernetes-deployment
cookiecutter "$(python -c 'import cookiecutter_kubernetes_deployment as p; print(p.__path__[0])')"

You'll be prompted for the chart name, namespace, repository, alias, author_name and license. The generated tree:

<name>/
├── base/kustomization.yaml
├── overlays/
│   ├── development/{kustomization,secret-generator}.yaml
│   └── production/{kustomization,secret-generator}.yaml
├── resources/kustomization.yaml
├── upstream/                 # Helm chart (Chart.yaml, values.yaml, …)
├── upstream.sh
└── README.md / CONTRIBUTING.md / CODE_OF_CONDUCT.md / LICENSE

Deploy with Kustomize:

kubectl apply -k overlays/development
kubectl apply -k overlays/production

Development

git clone https://github.com/goabonga/cookiecutter-kubernetes-deployment.git
cd cookiecutter-kubernetes-deployment
uv sync
uv run pytest          # bakes the template (needs Helm + helm-docs + network)
uvx cookiecutter .     # generate a project from the working copy

See CONTRIBUTING.md for the workflow, the commit-message convention and the release process. By participating you agree to the Code of Conduct. Security issues: see SECURITY.md.

License

Distributed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cookiecutter_kubernetes_deployment-0.2.3.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file cookiecutter_kubernetes_deployment-0.2.3.tar.gz.

File metadata

File hashes

Hashes for cookiecutter_kubernetes_deployment-0.2.3.tar.gz
Algorithm Hash digest
SHA256 58fd65a6a8e7000ed6b79a8953cb024d30a13d1ea7cc8c288a67a3b5ce63a386
MD5 9092fedec3e0aed28529cff5e518a516
BLAKE2b-256 2ec13b266a5f1cebc2dc23a3e4424fe6d6f80d46f234d4e2cc0dfc04775eb3de

See more details on using hashes here.

Provenance

The following attestation bundles were made for cookiecutter_kubernetes_deployment-0.2.3.tar.gz:

Publisher: ci.yml on goabonga/cookiecutter-kubernetes-deployment

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cookiecutter_kubernetes_deployment-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for cookiecutter_kubernetes_deployment-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6b921418faff6b5f1568b40c881ab5805c0f68ab1f293e51c7f8f24ce4e8617a
MD5 ea7635d0e9ee53e63b5b7c443b682de5
BLAKE2b-256 21dfbc5cfb2e9bd61c3a8bb550068447380c8d3c8b0fa284370f27f30161bc75

See more details on using hashes here.

Provenance

The following attestation bundles were made for cookiecutter_kubernetes_deployment-0.2.3-py3-none-any.whl:

Publisher: ci.yml on goabonga/cookiecutter-kubernetes-deployment

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page