From 5a3c6553fc7c6884c2f939cc836e758be30ef4b8 Mon Sep 17 00:00:00 2001 From: guineveresaenger Date: Fri, 8 Jun 2018 13:27:20 -0700 Subject: [PATCH 1/4] Clarifies hello-world example documentation The example documentation had a few minor discrepancies between commands suggested and expected outcomes. This pull request addresses those, making it easier for folks to use the hello-world demo. --- examples/helloWorld/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/helloWorld/README.md b/examples/helloWorld/README.md index 9ce98ec0c..ecc43943c 100644 --- a/examples/helloWorld/README.md +++ b/examples/helloWorld/README.md @@ -112,6 +112,11 @@ sed -i 's/app: hello/app: my-hello/' \ $BASE/kustomization.yaml ``` +*Note* `sed` works differently on different systems. On MacOS, for example, use this command instead: +``` +sed -i '' 's/pineapple/kiwi/' $OVERLAYS/staging/map.yaml +``` + See the effect: ``` @@ -402,7 +407,7 @@ Run kustomize again to see the new names: ``` kustomize build $OVERLAYS/staging |\ - grep -B 8 -A 1 staging-the-map + kustomize build $OVERLAYS/staging | grep -B 2 -A 3 kiwi ``` Confirm that the change in configMap content resulted @@ -413,7 +418,7 @@ uses the map: ``` test 3 == \ - $(kustomize build $OVERLAYS/staging | grep khk45ktkd9 | wc -l) + $(kustomize build $OVERLAYS/staging | grep khk45ktkd9 | wc -l); echo $? ``` Applying these resources to the cluster will result in From 4e7610a44db7ac368479be39e84b1c2e92774f51 Mon Sep 17 00:00:00 2001 From: guineveresaenger Date: Mon, 11 Jun 2018 12:35:33 -0700 Subject: [PATCH 2/4] Addresses review comments --- examples/helloWorld/README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/helloWorld/README.md b/examples/helloWorld/README.md index ecc43943c..4f32623e0 100644 --- a/examples/helloWorld/README.md +++ b/examples/helloWorld/README.md @@ -112,10 +112,11 @@ sed -i 's/app: hello/app: my-hello/' \ $BASE/kustomization.yaml ``` -*Note* `sed` works differently on different systems. On MacOS, for example, use this command instead: +On a Mac, use: ``` -sed -i '' 's/pineapple/kiwi/' $OVERLAYS/staging/map.yaml +sed -i '' $pattern $file ``` +to get in-place editing. See the effect: @@ -418,7 +419,8 @@ uses the map: ``` test 3 == \ - $(kustomize build $OVERLAYS/staging | grep khk45ktkd9 | wc -l); echo $? + $(kustomize build $OVERLAYS/staging | grep khk45ktkd9 | wc -l); \ + echo $? ``` Applying these resources to the cluster will result in From d488d9804d49b988c48b865b5f97fd9afadb428d Mon Sep 17 00:00:00 2001 From: guineveresaenger Date: Tue, 12 Jun 2018 10:29:25 -0700 Subject: [PATCH 3/4] grepping for configMap name --- examples/helloWorld/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/helloWorld/README.md b/examples/helloWorld/README.md index 4f32623e0..0b72a2146 100644 --- a/examples/helloWorld/README.md +++ b/examples/helloWorld/README.md @@ -403,12 +403,12 @@ the server will use: sed -i 's/pineapple/kiwi/' $OVERLAYS/staging/map.yaml ``` -Run kustomize again to see the new names: +Run kustomize again to see the new configMap names: ``` kustomize build $OVERLAYS/staging |\ - kustomize build $OVERLAYS/staging | grep -B 2 -A 3 kiwi + grep -B 8 -A 1 staging-the-map ``` Confirm that the change in configMap content resulted From 730597b77e0a3a4d4c73668e5b1b414c13c76f5a Mon Sep 17 00:00:00 2001 From: guineveresaenger Date: Tue, 12 Jun 2018 10:33:37 -0700 Subject: [PATCH 4/4] grepping for kiwi --- examples/helloWorld/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/helloWorld/README.md b/examples/helloWorld/README.md index 0b72a2146..aea6f2325 100644 --- a/examples/helloWorld/README.md +++ b/examples/helloWorld/README.md @@ -403,6 +403,13 @@ the server will use: sed -i 's/pineapple/kiwi/' $OVERLAYS/staging/map.yaml ``` +See the new greeting: + +``` +kustomize build $OVERLAYS/staging |\ + grep -B 2 -A 3 kiwi +``` + Run kustomize again to see the new configMap names: