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.5.tar.gz (14.2 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.5.tar.gz.

File metadata

File hashes

Hashes for cookiecutter_kubernetes_deployment-0.2.5.tar.gz
Algorithm Hash digest
SHA256 92a7e3e5a3ec2a614fa12d69ec57a1e8347e44f26063c07608203cc3acdf49ad
MD5 26a47a09cd484731dc228bd8f12136ca
BLAKE2b-256 79bbed803303235f40113002c0ac373becacd8563b0ecaec0c5b1fb00ebcd735

See more details on using hashes here.

Provenance

The following attestation bundles were made for cookiecutter_kubernetes_deployment-0.2.5.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.5-py3-none-any.whl.

File metadata

File hashes

Hashes for cookiecutter_kubernetes_deployment-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9d354933c541f005d28da748672713ea79f31767944e415d702144747dd5dbaf
MD5 3a9946c3e875efa393089e79ad0dc4a8
BLAKE2b-256 57de2b0d645ea0fe83d55834ecc7ba43e30964eaf19081e4a32f94fc1f942dc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cookiecutter_kubernetes_deployment-0.2.5-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