Skip to content

Commit e554893

Browse files
Merge pull request #273473 from kaizentm/eedorenko/tutorial-fix
Tutorial fix. Explore workload management in a multi-cluster environment with GitOps.
2 parents 9cdcb8c + f94b090 commit e554893

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

articles/azure-arc/kubernetes/workload-management.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -270,31 +270,31 @@ However, only the `drone` and `large` cluster types were selected by the schedul
270270
271271
### Understand deployment target assignment manifests
272272
273-
Before you continue, take a closer look at the generated assignment manifests for the `functional-test` deployment target. There are `namespace.yaml`, `config.yaml` and `reconciler.yaml` manifest files.
273+
Before you continue, take a closer look at the generated assignment manifests for the `functional-test` deployment target. There are `namespace.yaml`, `platform-config.yaml` and `reconciler.yaml` manifest files.
274274
275275
`namespace.yaml` defines a namespace that will be created on any `drone` cluster where the `hello-world` application runs.
276276
277277
```yaml
278278
apiVersion: v1
279279
kind: Namespace
280280
metadata:
281+
name: "dev-drone-hello-world-app-functional-test"
281282
labels:
282-
deploymentTarget: hello-world-app-functional-test
283-
environment: dev
283+
environment: "dev"
284+
workspace: "kaizen-app-team"
285+
workload: "hello-world-app"
286+
deploymentTarget: "hello-world-app-functional-test"
284287
someLabel: some-value
285-
workload: hello-world-app
286-
workspace: kaizen-app-team
287-
name: dev-kaizen-app-team-hello-world-app-functional-test
288288
```
289289
290-
`config.yaml` contains all platform configuration values available on any `drone` cluster that the application can use in the `Dev` environment.
290+
`platform-config.yaml` contains all platform configuration values available on any `drone` cluster that the application can use in the `Dev` environment.
291291
292292
```yaml
293293
apiVersion: v1
294294
kind: ConfigMap
295295
metadata:
296296
name: platform-config
297-
namespace: dev-kaizen-app-team-hello-world-app-functional-test
297+
namespace: dev-drone-hello-world-app-functional-test
298298
data:
299299
CLUSTER_NAME: Drone
300300
DATABASE_URL: mysql://restricted-host:3306/mysqlrty123
@@ -309,29 +309,29 @@ data:
309309
apiVersion: source.toolkit.fluxcd.io/v1beta2
310310
kind: GitRepository
311311
metadata:
312-
name: hello-world-app-functional-test
312+
name: "hello-world-app-functional-test"
313313
namespace: flux-system
314314
spec:
315-
interval: 30s
315+
interval: 15s
316+
url: "https://github.com/eedorenko/kalypso-tut-test-app-gitops"
316317
ref:
317-
branch: dev
318+
branch: "dev"
318319
secretRef:
319-
name: repo-secret
320-
url: https://github.com/<GitHub org>/<prefix>-app-gitops
320+
name: repo-secret
321321
---
322322
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
323323
kind: Kustomization
324324
metadata:
325-
name: hello-world-app-functional-test
325+
name: "hello-world-app-functional-test"
326326
namespace: flux-system
327327
spec:
328328
interval: 30s
329-
path: ./functional-test
330-
prune: true
329+
targetNamespace: "dev-drone-hello-world-app-functional-test"
331330
sourceRef:
332331
kind: GitRepository
333-
name: hello-world-app-functional-test
334-
targetNamespace: dev-kaizen-app-team-hello-world-app-functional-test
332+
name: "hello-world-app-functional-test"
333+
path: "./functional-test"
334+
prune: true
335335
```
336336
337337
> [!NOTE]
@@ -419,7 +419,7 @@ The generated manifests are added to a pull request to the `stage` branch waitin
419419
To test the application manually on the `Dev` environment before approving the PR to the `Stage` environment, first verify how the `functional-test` application instance works on the `drone` cluster:
420420
421421
```bash
422-
kubectl port-forward svc/hello-world-service -n dev-kaizen-app-team-hello-world-app-functional-test 9090:9090 --context=drone
422+
kubectl port-forward svc/hello-world-service -n dev-drone-hello-world-app-functional-test 9090:9090 --context=drone
423423
424424
# output:
425425
# Forwarding from 127.0.0.1:9090 -> 9090
@@ -434,7 +434,7 @@ While this command is running, open `localhost:9090` in your browser. You'll see
434434
The next step is to check how the `performance-test` instance works on the `large` cluster:
435435
436436
```bash
437-
kubectl port-forward svc/hello-world-service -n dev-kaizen-app-team-hello-world-app-performance-test 8080:8080 --context=large
437+
kubectl port-forward svc/hello-world-service -n dev-large-hello-world-app-performance-test 8080:8080 --context=large
438438
439439
# output:
440440
# Forwarding from 127.0.0.1:8080 -> 8080
@@ -449,13 +449,13 @@ Once you're satisfied with the `Dev` environment, approve and merge the PR to th
449449
Run the following command for the `drone` cluster and open `localhost:8001` in your browser:
450450
451451
```bash
452-
kubectl port-forward svc/hello-world-service -n stage-kaizen-app-team-hello-world-app-uat-test 8001:8000 --context=drone
452+
kubectl port-forward svc/hello-world-service -n stage-drone-hello-world-app-uat-test 8001:8000 --context=drone
453453
```
454454
455455
Run the following command for the `large` cluster and open `localhost:8002` in your browser:
456456
457457
```bash
458-
kubectl port-forward svc/hello-world-service -n stage-kaizen-app-team-hello-world-app-uat-test 8002:8000 --context=large
458+
kubectl port-forward svc/hello-world-service -n stage-large-hello-world-app-uat-test 8002:8000 --context=large
459459
```
460460
461461
The application instance on the `large` cluster shows the following greeting page:
@@ -503,8 +503,8 @@ Once the new configuration has arrived to the `large` cluster, check the `uat-te
503503
running the following commands:
504504
505505
```bash
506-
kubectl rollout restart deployment hello-world-deployment -n stage-kaizen-app-team-hello-world-app-uat-test --context=large
507-
kubectl port-forward svc/hello-world-service -n stage-kaizen-app-team-hello-world-app-uat-test 8002:8000 --context=large
506+
kubectl rollout restart deployment hello-world-deployment -n stage-large-hello-world-app-uat-test --context=large
507+
kubectl port-forward svc/hello-world-service -n stage-large-hello-world-app-uat-test 8002:8000 --context=large
508508
```
509509
510510
You'll see the updated database url:
@@ -532,6 +532,7 @@ metadata:
532532
spec:
533533
reconciler: arc-flux
534534
namespaceService: default
535+
configType: configmap
535536
EOF
536537
537538
git add .

0 commit comments

Comments
 (0)