From 4aa11efe049d205dbbe05d00db8ce185b504789a Mon Sep 17 00:00:00 2001 From: Alistair Mackay <34012094+fireflycons@users.noreply.github.com> Date: Sun, 16 Oct 2022 11:16:17 +0100 Subject: [PATCH] Updated --- docs/15-dns-addon.md | 4 ++-- docs/16-smoke-test.md | 2 +- tools/lab-script-generator.py | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/15-dns-addon.md b/docs/15-dns-addon.md index e634506..5ca224c 100644 --- a/docs/15-dns-addon.md +++ b/docs/15-dns-addon.md @@ -27,7 +27,7 @@ service/kube-dns created List the pods created by the `kube-dns` deployment: -[//]: # (sleep:15) +[//]: # (command:kubectl wait deployment -n kube-system coredns --for condition=Available=True --timeout=90s) ```bash kubectl get pods -l k8s-app=kube-dns -n kube-system @@ -51,7 +51,7 @@ Create a `busybox` pod: kubectl run busybox --image=busybox:1.28 --command -- sleep 3600 ``` -[//]: # (sleep:10) +[//]: # (command:kubectl wait pods -n default -l run=busybox --for condition=Ready --timeout=90s) List the pod created by the `busybox` pod: diff --git a/docs/16-smoke-test.md b/docs/16-smoke-test.md index b0788dc..6e4af80 100644 --- a/docs/16-smoke-test.md +++ b/docs/16-smoke-test.md @@ -64,7 +64,7 @@ Create a deployment for the [nginx](https://nginx.org/en/) web server: kubectl create deployment nginx --image=nginx:1.23.1 ``` -[//]: # (sleep:15) +[//]: # (command:kubectl wait deployment -n default nginx --for condition=Available=True --timeout=90s) List the pod created by the `nginx` deployment: diff --git a/tools/lab-script-generator.py b/tools/lab-script-generator.py index ba5c20e..a0d5d39 100644 --- a/tools/lab-script-generator.py +++ b/tools/lab-script-generator.py @@ -89,6 +89,11 @@ for doc in glob.glob(os.path.join(docs_path, '*.md')): f'sleep {value}', newline ]) + elif token == 'command': + script.extend([ + value, + newline + ]) elif token == 'comment': script.extend([ '#######################################################################',