Skip to content

Commit 874d383

Browse files
Use yaml files for tilt configuration (#863)
Signed-off-by: Prajyot-Parab <[email protected]> Signed-off-by: Prajyot-Parab <[email protected]> Co-authored-by: Prajyot-Parab <[email protected]>
1 parent 400e24d commit 874d383

File tree

3 files changed

+46
-50
lines changed

3 files changed

+46
-50
lines changed

docs/book/src/developer/tilt.md

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -27,64 +27,65 @@ kind create cluster
2727

2828
This local cluster will be running all the cluster api controllers and become the management cluster which then can be used to spin up workload clusters on IBM Cloud.
2929

30-
## Create a tilt-settings.json file
30+
## Create a tilt-settings.yaml file
3131

32-
Next, create a `tilt-settings.json` file and place it in your local copy of `cluster-api`. Here is an example:
32+
Next, create a `tilt-settings.yaml` file and place it in your local copy of `cluster-api`. Here is an example:
3333

34-
**Example `tilt-settings.json` for CAPI-IBM clusters:**
34+
**Example `tilt-settings.yaml` for CAPI-IBM clusters:**
3535

3636
Make sure to replace the parameter `IBMCLOUD_API_KEY` with a valid API key.
3737

38-
```json
39-
{
40-
"default_registry": "gcr.io/you-project-name-here",
41-
"provider_repos": ["../cluster-api-provider-ibmcloud"],
42-
"enable_providers": ["ibmcloud", "kubeadm-bootstrap", "kubeadm-control-plane"],
43-
"kustomize_substitutions": {
44-
"IBMCLOUD_API_KEY": "XXXXXXXXXXXXXXXXXX"
45-
}
46-
}
38+
```yaml
39+
default_registry: "gcr.io/you-project-name-here"
40+
provider_repos:
41+
- ../cluster-api-provider-ibmcloud
42+
enable_providers:
43+
- ibmcloud
44+
- kubeadm-bootstrap
45+
- kubeadm-control-plane
46+
kustomize_substitutions:
47+
IBMCLOUD_API_KEY: "XXXXXXXXXXXXXXXXXX"
4748
```
4849
4950
Add following extra_args to log Power VS REST API Requests/Responses
5051
51-
```json
52-
{
53-
"extra_args": {
54-
"ibmcloud": ["-v=5"]
55-
}
56-
}
52+
```yaml
53+
extra_args:
54+
ibmcloud:
55+
- '-v=5'
5756
```
5857
5958
To deploy workload cluster with [Power VS cloud controller manager](/topics/powervs/external-cloud-provider.html) which is currently in experimental stage, Set `POWERVS_PROVIDER_ID_FORMAT` to `v2` under kustomize_substitutions.
6059

61-
```json
62-
{
63-
"default_registry": "gcr.io/you-project-name-here",
64-
"provider_repos": ["../cluster-api-provider-ibmcloud"],
65-
"enable_providers": ["ibmcloud", "kubeadm-bootstrap", "kubeadm-control-plane"],
66-
"kustomize_substitutions": {
67-
"IBMCLOUD_API_KEY": "XXXXXXXXXXXXXXXXXX",
68-
"POWERVS_PROVIDER_ID_FORMAT": "v2"
69-
}
70-
}
60+
```yaml
61+
default_registry: "gcr.io/you-project-name-here"
62+
provider_repos:
63+
- ../cluster-api-provider-ibmcloud
64+
enable_providers:
65+
- ibmcloud
66+
- kubeadm-bootstrap
67+
- kubeadm-control-plane
68+
kustomize_substitutions:
69+
IBMCLOUD_API_KEY: "XXXXXXXXXXXXXXXXXX"
70+
POWERVS_PROVIDER_ID_FORMAT: "v2"
7171
```
7272

7373
To deploy workload cluster with Custom Service Endpoint, Set `SERVICE_ENDPOINT` environmental variable in semi-colon separated format: `${ServiceRegion}:${ServiceID1}=${URL1},${ServiceID2}=${URL2...}`
74-
```json
75-
{
76-
"default_registry": "gcr.io/you-project-name-here",
77-
"provider_repos": ["../cluster-api-provider-ibmcloud"],
78-
"enable_providers": ["ibmcloud", "kubeadm-bootstrap", "kubeadm-control-plane"],
79-
"kustomize_substitutions": {
80-
"IBMCLOUD_API_KEY": "XXXXXXXXXXXXXXXXXX",
81-
"SERVICE_ENDPOINT":"us-south:vpc=https://us-south-stage01.iaasdev.cloud.ibm.com,powervs=https://dal.power-iaas.test.cloud.ibm.com,rc=https://resource-controller.test.cloud.ibm.com",
82-
"IBMCLOUD_AUTH_URL":"https://iam.test.cloud.ibm.com"
83-
}
84-
}
74+
```yaml
75+
default_registry: "gcr.io/you-project-name-here"
76+
provider_repos:
77+
- ../cluster-api-provider-ibmcloud
78+
enable_providers:
79+
- ibmcloud
80+
- kubeadm-bootstrap
81+
- kubeadm-control-plane
82+
kustomize_substitutions:
83+
IBMCLOUD_API_KEY: "XXXXXXXXXXXXXXXXXX"
84+
SERVICE_ENDPOINT: "us-south:vpc=https://us-south-stage01.iaasdev.cloud.ibm.com,powervs=https://dal.power-iaas.test.cloud.ibm.com,rc=https://resource-controller.test.cloud.ibm.com"
85+
IBMCLOUD_AUTH_URL: "https://iam.test.cloud.ibm.com"
8586
```
8687

87-
**NOTE**: For information about all the fields that can be used in the `tilt-settings.json` file, check them [here](https://cluster-api.sigs.k8s.io/developer/tilt.html#tilt-settingsjson-fields).
88+
**NOTE**: For information about all the fields that can be used in the `tilt-settings.yaml` file, check them [here](https://cluster-api.sigs.k8s.io/developer/tilt.html#tilt-settings-fields).
8889

8990
## Run Tilt
9091

tilt-provider.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

tilt-provider.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: ibmcloud
2+
config:
3+
image: "gcr.io/k8s-staging-capi-ibmcloud/cluster-api-ibmcloud-controller"
4+
live_reload_deps: ["main.go", "go.mod", "go.sum", "api", "cloud", "cmd", "controllers", "pkg"]
5+
label: CAPIBM

0 commit comments

Comments
 (0)