Configuration Overview¶
kindplane uses a YAML configuration file (kindplane.yaml) to define your cluster setup.
Generating Configuration¶
Create a new configuration file with defaults:
To use a custom filename:
Configuration Structure¶
The configuration file has the following top-level sections:
cluster: # Kind cluster configuration
crossplane: # Crossplane installation settings
credentials: # Cloud provider credentials
charts: # Helm charts to install
compositions: # Crossplane compositions to apply
Schema Generation¶
The JSON Schema (kindplane.schema.json) is generated from the config package types so it stays in sync with the code. Regenerate it after changing internal/config/config.go:
Or run the generator directly:
Descriptions in the schema come from the comment and doc struct tags on config fields. You can add default, example, enum, or pattern via the jsonschema struct tag (see invopop/jsonschema) if you want richer validation.
IDE Support¶
kindplane provides a JSON Schema for configuration validation and IDE autocomplete.
Schema Versioning¶
Schemas are automatically versioned and published alongside documentation. Use versioned schemas for stable configurations:
- Latest stable:
https://kanzifucius.github.io/kindplane/latest/kindplane.schema.json - Development:
https://kanzifucius.github.io/kindplane/dev/kindplane.schema.json - Specific version:
https://kanzifucius.github.io/kindplane/1.0.0/kindplane.schema.json
The raw GitHub URL (https://raw.githubusercontent.com/kanzifucius/kindplane/main/kindplane.schema.json) is still available as a fallback but points to the main branch and may change.
Automatic Schema Detection¶
Files generated by kindplane init include a schema reference:
# yaml-language-server: $schema=https://raw.githubusercontent.com/kanzifucius/kindplane/main/kindplane.schema.json
For production configurations, consider using a versioned schema:
# yaml-language-server: $schema=https://kanzifucius.github.io/kindplane/latest/kindplane.schema.json
VS Code / Cursor Setup¶
- Install the YAML extension
- The schema comment enables:
- Autocomplete for all options
- Inline documentation on hover
- Real-time validation
Manual Schema Association¶
Add the schema comment to existing files:
# yaml-language-server: $schema=https://kanzifucius.github.io/kindplane/latest/kindplane.schema.json
cluster:
name: my-cluster
Or configure in VS Code settings:
{
"yaml.schemas": {
"https://kanzifucius.github.io/kindplane/latest/kindplane.schema.json": "kindplane.yaml"
}
}
Validating Configuration¶
Validate your configuration without creating a cluster:
Or validate a specific file:
Using a Custom Configuration¶
Specify a configuration file for any command:
kindplane up --config my-config.yaml
kindplane status --config my-config.yaml
kindplane down --config my-config.yaml --force
Complete Example¶
Here's a complete configuration example:
# yaml-language-server: $schema=https://raw.githubusercontent.com/kanzifucius/kindplane/main/kindplane.schema.json
cluster:
name: kindplane-dev
kubernetesVersion: "1.29.0"
nodes:
controlPlane: 1
workers: 1
portMappings:
- containerPort: 80
hostPort: 8080
protocol: TCP
- containerPort: 443
hostPort: 8443
protocol: TCP
ingress:
enabled: true
crossplane:
version: "1.15.0"
providers:
- name: provider-aws
package: xpkg.upbound.io/upbound/provider-aws:v1.1.0
- name: provider-kubernetes
package: xpkg.upbound.io/crossplane-contrib/provider-kubernetes:v0.12.0
credentials:
aws:
source: env
kubernetes:
source: incluster
charts:
# Example: Install External Secrets Operator
- name: external-secrets
repo: https://charts.external-secrets.io
chart: external-secrets
version: "0.9.11"
namespace: external-secrets
phase: post-providers
values:
installCRDs: true
- name: cert-manager
repo: https://charts.jetstack.io
chart: cert-manager
namespace: cert-manager
version: "1.14.0"
phase: pre-crossplane
values:
installCRDs: true
compositions:
sources:
- path: ./compositions
Configuration Sections¶
| Section | Description | Required |
|---|---|---|
| cluster | Kind cluster settings | Yes |
| cluster.registry | Local container registry | No |
| cluster.trustedCAs | Trusted CA certificates | No |
| crossplane | Crossplane installation | Yes |
| crossplane.providers | Crossplane providers | No |
| credentials | Cloud provider credentials | No |
| charts | Helm charts to install | No |
| compositions | Crossplane compositions | No |
External Secrets Operator
ESO can be installed via the charts section. See the ESO guide for details.