Skip to content

Commit a0d39e2

Browse files
authored
Merge pull request #697 from dmvolod/simplify-configmap-configuration
📖 Simplifying ConfigMap with metadata configuration
2 parents 507fc88 + d75be1c commit a0d39e2

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

docs/book/src/03_topics/02_configuration/01_air-gapped-environtment.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,28 +167,22 @@ For example, you have two files: `components.yaml` and `metadata.yaml`. To creat
167167
gzip -c components.yaml > components.gz
168168
```
169169

170-
2. Create a ConfigMap manifest from the archived data:
170+
2. Create a ConfigMap in your Kubernetes cluster from the archived data:
171171

172172
```sh
173-
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
173+
kubectl create configmap v1.9.3 -n capz-system --from-file=components=components.gz --from-file=metadata=metadata.yaml
174174
```
175175

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

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

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

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

186186
```sh
187-
yq eval -i '.metadata.labels += {"my-label": "label-value"}' configmap.yaml
188-
```
189-
190-
5. Create the ConfigMap in your Kubernetes cluster using kubectl:
191-
192-
```sh
193-
kubectl create -f configmap.yaml
187+
kubectl label configmap v1.9.3 -n capz-system provider-components=azure
194188
```

docs/local-development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ kind create cluster
88
```
99

1010
## Run Tilt
11-
Once the cluster is live and you've confirmed you're using the correct context, you can simply run:
11+
Once the cluster is live, and you've confirmed you're using the correct context, you can simply run:
1212
```bash
1313
tilt up
1414
```

0 commit comments

Comments
 (0)