From 79de3975be8e4a1c6b8b85b002db43cd7f771e92 Mon Sep 17 00:00:00 2001 From: Barclay Hill Date: Fri, 16 Sep 2022 10:54:06 -0700 Subject: [PATCH 1/3] Changes from doing excercies. --- chapter-02/declarative-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter-02/declarative-deployment.yaml b/chapter-02/declarative-deployment.yaml index b916ff1..7b1f416 100644 --- a/chapter-02/declarative-deployment.yaml +++ b/chapter-02/declarative-deployment.yaml @@ -4,7 +4,7 @@ metadata: name: nginx-declarative annotations: environment: prod - organization: sales + organization: marketing spec: replicas: 3 selector: From a9dbebe45c91b3a32c44bdbea8181c8ac28ae855 Mon Sep 17 00:00:00 2001 From: Barclay Hill Date: Fri, 16 Sep 2022 12:57:26 -0700 Subject: [PATCH 2/3] Update controller.sh Add simple condition to ignore default config map for CA cert --- chapter-02/controller.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chapter-02/controller.sh b/chapter-02/controller.sh index a5fb803..ac9fae5 100755 --- a/chapter-02/controller.sh +++ b/chapter-02/controller.sh @@ -1,14 +1,18 @@ #!/usr/bin/env bash +SKIPPEDCONFIGMAP="kube-root-ca.crt" + kubectl get --watch --output-watch-events configmap \ -o=custom-columns=type:type,name:object.metadata.name \ --no-headers | \ + while read next; do #B NAME=$(echo $next | cut -d' ' -f2) #C EVENT=$(echo $next | cut -d' ' -f1) + if [ "$NAME" != "$SKIPPEDCONFIGMAP" ]; then case $EVENT in ADDED|MODIFIED) #D kubectl apply -f - << EOF @@ -40,4 +44,5 @@ EOF kubectl delete deploy $NAME ;; esac + fi done From c4be296bd2fe6ba86b808c528d69326cdd842510 Mon Sep 17 00:00:00 2001 From: Barclay Hill Date: Fri, 16 Sep 2022 13:00:51 -0700 Subject: [PATCH 3/3] Revert "Changes from doing excercies." This reverts commit 79de3975be8e4a1c6b8b85b002db43cd7f771e92. --- chapter-02/declarative-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter-02/declarative-deployment.yaml b/chapter-02/declarative-deployment.yaml index 7b1f416..b916ff1 100644 --- a/chapter-02/declarative-deployment.yaml +++ b/chapter-02/declarative-deployment.yaml @@ -4,7 +4,7 @@ metadata: name: nginx-declarative annotations: environment: prod - organization: marketing + organization: sales spec: replicas: 3 selector: