Developing Cluster API Provider Huawei with Tilt
Overview
This document describes how to use kind and Tilt for a simplified workflow that offers easy deployments and rapid iterative builds.
Prerequisites
- Docker: v19.03 or newer (on MacOS e.g. via ObrStack)
- kind: v0.25.0 or newer
- Tilt: v0.30.8 or newer
- kustomize
- envsubst
- helm: v3.7.1 or newer
- Clone the Cluster API repository locally
- Clone the provider(s) you want to deploy locally as well
Getting started
Create a tilt-settings file
create a tilt-settings.yaml
file and place it in your local copy of cluster-api
. Here is an example that uses the components from the CAPI repo:
default_registry: localhost:5000
enable_providers:
- huawei
- kubeadm-bootstrap
- kubeadm-control-plane
provider_repos:
- ../cluster-api-provider-huawei
template_dirs:
huawei:
- ../cluster-api-provider-huawei/templates
kustomize_substitutions:
CLOUD_SDK_AK: "xxxxxxxx"
CLOUD_SDK_SK: "xxxxxxxx"
HC_REGION: "ap-southeast-1"
HC_SSH_KEY_NAME: "default"
KUBERNETES_VERSION: "1.32.0"
CLUSTER_NAME: "hello"
CONTROL_PLANE_MACHINE_COUNT: "1"
WORKER_MACHINE_COUNT: "1"
HC_CONTROL_PLANE_MACHINE_TYPE: "x1.2u.4g"
HC_NODE_MACHINE_TYPE: "x1.2u.4g"
ECS_IMAGE_ID: "4e98ff86-1c31-4ede-997c-44c39e618fd3"
Note: Please ensure that the values for CLOUD_SDK_AK
and CLOUD_SDK_SK
are base64 encoded.
Create a kind cluster and run Tilt!
To create a pre-configured kind cluster (if you have not already done so) and launch your development environment, run
make tilt-up
For details, please refer to: https://cluster-api.sigs.k8s.io/developer/core/tilt