Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📖 Simplifying ConfigMap with metadata configuration #697

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,28 +167,22 @@ For example, you have two files: `components.yaml` and `metadata.yaml`. To creat
gzip -c components.yaml > components.gz
```

2. Create a ConfigMap manifest from the archived data:
2. Create a ConfigMap in your Kubernetes cluster from the archived data:

```sh
kubectl create configmap v1.9.3 --namespace=capz-system --from-file=components=components.gz --from-file=metadata=metadata.yaml --dry-run=client -o yaml > configmap.yaml
kubectl create configmap v1.9.3 -n capz-system --from-file=components=components.gz --from-file=metadata=metadata.yaml
```

3. Edit the file by adding "provider.cluster.x-k8s.io/compressed: true" annotation:
3. Add "provider.cluster.x-k8s.io/compressed: true" annotation to the ConfigMap:

```sh
yq eval -i '.metadata.annotations += {"provider.cluster.x-k8s.io/compressed": "true"}' configmap.yaml
kubectl annotate configmap v1.9.3 -n capz-system provider.cluster.x-k8s.io/compressed=true
```

**Note**: Without this annotation, the operator won't be able to determine if the data is compressed or not.

4. Add labels that will be used to match the ConfigMap in the `fetchConfig` section of the provider:

```sh
yq eval -i '.metadata.labels += {"my-label": "label-value"}' configmap.yaml
```

5. Create the ConfigMap in your Kubernetes cluster using kubectl:

```sh
kubectl create -f configmap.yaml
kubectl label configmap v1.9.3 -n capz-system provider-components=azure
```
2 changes: 1 addition & 1 deletion docs/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kind create cluster
```

## Run Tilt
Once the cluster is live and you've confirmed you're using the correct context, you can simply run:
Once the cluster is live, and you've confirmed you're using the correct context, you can simply run:
```bash
tilt up
```
Expand Down