From fea19d0f00fc802bd83455bf000db712025c62e1 Mon Sep 17 00:00:00 2001 From: Jeffrey Regan Date: Tue, 15 May 2018 11:57:16 -0700 Subject: [PATCH] fixStuffDueToKubectlDeletion --- bin/pre-commit.sh | 3 +-- demos/helloWorld.md | 7 +++---- demos/ldap.md | 21 +++++++++------------ demos/mySql.md | 6 +++--- demos/springboot.md | 7 ++++--- 5 files changed, 20 insertions(+), 24 deletions(-) diff --git a/bin/pre-commit.sh b/bin/pre-commit.sh index 21d383d2d..66df8f86a 100755 --- a/bin/pre-commit.sh +++ b/bin/pre-commit.sh @@ -44,10 +44,9 @@ function testGoTest { } function testDemos { - mdrip --mode test --label test ./demos + mdrip --mode test --label test README.md ./demos } -go install github.com/kubernetes-sigs/kustomize runTest testGoFmt runTest testGoImports runTest testGoVet diff --git a/demos/helloWorld.md b/demos/helloWorld.md index 731e7ce92..d85e77f2c 100644 --- a/demos/helloWorld.md +++ b/demos/helloWorld.md @@ -48,11 +48,10 @@ declared here as HERE documents. Download them: BASE=$DEMO_HOME/base mkdir -p $BASE -resources="https://raw.githubusercontent.com/kubernetes/kubectl\ -/master/cmd/kustomize/demos/data/helloWorld\ +curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\ +/kubernetes-sigs/kustomize\ +/master/demos/data/helloWorld\ /{configMap,deployment,kustomization,service}.yaml" - -curl -s $resources -o "$BASE/#1.yaml" ``` Look at the directory: diff --git a/demos/ldap.md b/demos/ldap.md index ae286c3c7..a79a7de17 100644 --- a/demos/ldap.md +++ b/demos/ldap.md @@ -43,11 +43,12 @@ declared here as HERE documents. Download them: BASE=$DEMO_HOME/base mkdir -p $BASE -resources="https://raw.githubusercontent.com/kubernetes/kubectl\ -/master/cmd/kustomize/demos/data/ldap/base\ -/{deployment.yaml,kustomization.yaml,service.yaml,env.startup.txt}" +CONTENT="https://raw.githubusercontent.com\ +/kubernetes-sigs/kustomize\ +/master/demos/data/ldap" -curl -s $resources -o "$BASE/#1" +curl -s -o "$BASE/#1" "$CONTENT/base\ +/{deployment.yaml,kustomization.yaml,service.yaml,env.startup.txt}" ``` Look at the directory: @@ -130,14 +131,13 @@ mkdir -p $OVERLAYS/production #### Staging Kustomization Download the staging customization and patch. + ``` -resources="https://raw.githubusercontent.com/kubernetes/kubectl\ -/master/cmd/kustomize/demos/data/ldap/overlays/staging\ +curl -s -o "$OVERLAYS/staging/#1" "$CONTENT/overlays/staging\ /{config.env,deployment.yaml,kustomization.yaml}" - -curl -s $resources -o "$OVERLAYS/staging/#1" ``` + The staging customization adds a configMap. > ```cat $OVERLAYS/staging/kustomization.yaml > (...truncated) @@ -161,11 +161,8 @@ as well as 2 replica Download the production customization and patch. ``` -resources="https://raw.githubusercontent.com/kubernetes/kubectl\ -/master/cmd/kustomize/demos/data/ldap/overlays/production\ +curl -s -o "$OVERLAYS/production/#1" "$CONTENT/overlays/production\ /{deployment.yaml,kustomization.yaml}" - -curl -s $resources -o "$OVERLAYS/production/#1" ``` The production customization adds 6 replica as well as a consistent disk. diff --git a/demos/mySql.md b/demos/mySql.md index e9504a054..2dcbb21eb 100644 --- a/demos/mySql.md +++ b/demos/mySql.md @@ -27,9 +27,9 @@ Download them: ``` -curl -s -o "$DEMO_HOME/#1.yaml" \ - "https://raw.githubusercontent.com/kubernetes/kubectl\ -/master/cmd/kustomize/demos/data/mySql\ +curl -s -o "$DEMO_HOME/#1.yaml" "https://raw.githubusercontent.com\ +/kubernetes-sigs/kustomize\ +/master/demos/data/mySql\ /{deployment,secret,service}.yaml" ``` diff --git a/demos/springboot.md b/demos/springboot.md index cac5fc256..e35bcd1b5 100644 --- a/demos/springboot.md +++ b/demos/springboot.md @@ -29,10 +29,11 @@ Download them: ``` -CONTENT="https://raw.githubusercontent.com/kubernetes/kubectl\ -/master/cmd/kustomize/demos/data/springboot" +CONTENT="https://raw.githubusercontent.com\ +/kubernetes-sigs/kustomize\ +/master/demos/data/springboot" -curl -s -o "$DEMO_HOME/#1.yaml" \ +curl -s -o "$DEMO_HOME/#1.yaml" \ "$CONTENT/base/{deployment,service}.yaml" ```