An open API service indexing awesome lists of open source software.

https://github.com/hutstep/crossplane-kind-azure-bootstrap

Crossplane + kind + Azure provider family bootstrap. One-command local setup with reliable waits, cleanup, and Makefile targets.
https://github.com/hutstep/crossplane-kind-azure-bootstrap

azure bootstrap crossplane kind kubernetes local-development

Last synced: about 1 month ago
JSON representation

Crossplane + kind + Azure provider family bootstrap. One-command local setup with reliable waits, cleanup, and Makefile targets.

Awesome Lists containing this project

README

          

# crossplane-kind-azure-bootstrap

[![lint](https://github.com/hutstep/crossplane-kind-azure-bootstrap/actions/workflows/lint.yml/badge.svg)](https://github.com/hutstep/crossplane-kind-azure-bootstrap/actions/workflows/lint.yml) [![e2e-kind](https://github.com/hutstep/crossplane-kind-azure-bootstrap/actions/workflows/e2e.yml/badge.svg)](https://github.com/hutstep/crossplane-kind-azure-bootstrap/actions/workflows/e2e.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

๐Ÿš€ Bootstrap a local [kind](https://kind.sigs.k8s.io/) cluster with [Crossplane](https://crossplane.io/), the Crossplane provider family for Azure, and selected Composition Functions. Designed to be robust, idempotent, and non-interactive friendly for both local use and CI.

## โœจ Features

- ๐Ÿงฐ Creates or reuses a kind cluster (or targets current kubectl context)
- ๐Ÿ“ฆ Installs Crossplane via Helm chart (chart version controllable)
- โ˜๏ธ Installs provider family for Azure (provider-family-azure)
- ๐Ÿงฉ Installs Crossplane Composition Functions:
- function-patch-and-transform
- function-environment-configs
- โœ… Reliable health waits with JSONPath fallback
- ๐Ÿงน Cleanup modes (keep cluster, delete cluster, and force-clean leftovers)
- ๐Ÿงฐ Makefile with common targets

## โœ… Prerequisites

- ๐Ÿณ Docker (required by kind)
- ๐Ÿงฑ kind โ‰ฅ 0.20.0
- โŽˆ kubectl โ‰ฅ 1.25
- โ›ต Helm โ‰ฅ 3.11
- ๐ŸŒ Network access to:
-
-

Tip: Ensure all scripts in scripts/ are executable so you can run them directly (chmod +x scripts/\*).

## ๐Ÿšฆ Quick start

- Non-interactive default install (creates kind cluster if missing):

```bash
scripts/bootstrap-crossplane-kind.sh --yes
```

- Use existing context (no cluster creation):

```bash
scripts/bootstrap-crossplane-kind.sh --yes --skip-cluster
```

- Recreate cluster and override versions:

```bash
scripts/bootstrap-crossplane-kind.sh --yes --recreate \
--cluster-name xp-dev --kind-node-image kindest/node:v1.33.1 \
--crossplane-version v1.20.1 \
--provider-azure-version v1.13.0 \
--func-pat-version v0.9.0 \
--func-envcfg-version v0.4.0
```

## ๐Ÿงฐ Makefile targets

- Bootstrap (idempotent):

```bash
make bootstrap
```

- Dry-run (print planned actions):

```bash
make dry-run
```

- Recreate cluster then bootstrap:

```bash
make recreate
```

- Use current context (no cluster creation):

```bash
make skip-cluster
```

- Tools check (versions, network reachability):

```bash
make tools-check
```

- Cleanup providers/functions/Helm release (keep cluster):

```bash
make clean
```

- Cleanup plus remove Function package CRDs (keeps cluster):

```bash
make clean-force
```

- Cleanup and delete kind cluster:

```bash
make clean-delete-cluster
```

## โš™๏ธ Script flags (most-used)

| Flag | Description | Default |
| --- | --- | --- |
| `--yes` | Non-interactive assume-yes | `false` |
| `--cluster-name NAME` | Kind cluster name | `crossplane-kind` |
| `--kind-node-image IMAGE` | Node image | `kindest/node:v1.33.1` |
| `--crossplane-version VER` | Crossplane Helm chart version | `v1.20.1` |
| `--provider-azure-version V` | provider-family-azure version | `v1.13.0` |
| `--func-pat-version V` | function-patch-and-transform version | `v0.9.0` |
| `--func-envcfg-version V` | function-environment-configs version | `v0.4.0` |
| `--skip-cluster` | Target current kubectl context; do not create kind | `false` |
| `--recreate` | Delete existing kind cluster with the same name first | `false` |
| `--wait-timeout DURATION` | Timeout for waits (e.g., `10m`) | `10m` |
| `--cleanup` | Remove providers/functions and Crossplane Helm release | `false` |
| `--delete-cluster` | With `--cleanup`, delete the kind cluster too | `false` |
| `--force-clean` | With `--cleanup`, also remove Function package CRDs | `false` |
| `--dry-run` | Print planned actions only | `false` |
| `--verbose` | Shell tracing (`set -x`) | `false` |

## ๐Ÿ“ฆ What gets installed

- Crossplane Helm chart from charts.crossplane.io (chart version you choose)
- Provider family Azure package:
- xpkg.crossplane.io/crossplane-contrib/provider-family-azure:v1.13.0
- Composition Functions:
- xpkg.crossplane.io/crossplane-contrib/function-patch-and-transform:v0.9.0
- xpkg.crossplane.io/crossplane-contrib/function-environment-configs:v0.4.0

## ๐Ÿ” Verify installation

```bash
helm list -n crossplane-system
kubectl get providers.pkg.crossplane.io -o wide
kubectl get functions.pkg.crossplane.io -o wide
kubectl get pods -A
```

## ๐Ÿงน Cleanup

- Keep cluster, remove providers/functions and Crossplane Helm release:

```bash
scripts/bootstrap-crossplane-kind.sh --cleanup
```

- If function pods linger or are recreated by FunctionRevisions, use force-clean:

```bash
scripts/bootstrap-crossplane-kind.sh --cleanup --force-clean
```

- Delete cluster too:

```bash
scripts/bootstrap-crossplane-kind.sh --cleanup --delete-cluster --yes
```

## ๐Ÿงช CI notes

- Ensure Docker-in-Docker or Docker is available on the runner (kind requires Docker).
- Cache Helm repository data to speed up runs:
- $HOME/.cache/helm
- optionally $HOME/.config/helm/repositories.yaml

## ๐Ÿ“œ License

This project is licensed under the MIT License - see [LICENSE](LICENSE) for details.