From ae5ac765393b837493ab807f3d73783a5b140d22 Mon Sep 17 00:00:00 2001 From: Philip Cristiano Date: Fri, 16 Dec 2016 11:07:54 -0500 Subject: [PATCH] Add `endpoint` resource --- README.md | 3 +++ bin/k8s-deploy | 15 +++++++++++++++ bin/k8s-example-config | 3 +++ bin/k8s-read-config | 8 ++++++++ circle.yml | 6 +++--- 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4c1d24cb..1d11b77d 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,9 @@ SECRETS=('example-app') # List of files ending in '.service.yml' in the kube directory SERVICES=('example-app') +# List of files ending in '.endpoint.yml' in the kube directory +ENDPOINTS=() + # List of files ending in '.ingress.yml' in the kube directory INGRESSES=() diff --git a/bin/k8s-deploy b/bin/k8s-deploy index 54b2e7ac..67ad6656 100755 --- a/bin/k8s-deploy +++ b/bin/k8s-deploy @@ -59,6 +59,21 @@ done echo "Done deploying Services" echo "" +echo "Deploying Endpoints" +for index in "${!ENDPOINT_FILES[@]}" +do + ENDPOINT=${ENDPOINTS[$index]##*/} + ENDPOINT_FILE=${ENDPOINT_FILES[$index]} + kubectl apply -f ${ENDPOINT_FILE} --namespace=$NAMESPACE --record + if [ $? -ne 0 ] + then + echo "Apply failed, aborting" + exit 1 + fi +done +echo "Done deploying endpoints" +echo "" + echo "Deploying Jobs" for index in "${!JOBS_FILES[@]}" do diff --git a/bin/k8s-example-config b/bin/k8s-example-config index 174d5254..8df45b35 100755 --- a/bin/k8s-example-config +++ b/bin/k8s-example-config @@ -47,6 +47,9 @@ SECRETS=('example-app') # List of files ending in '.service.yml' in the kube directory SERVICES=('example-app') +# List of files ending in '.endpoint.yml' in the kube directory +ENDPOINTS=() + # List of ingress resource files ending in '.ingress.yml' in the kube directory INGRESSES=() diff --git a/bin/k8s-read-config b/bin/k8s-read-config index eea241e6..8a0ed7c2 100755 --- a/bin/k8s-read-config +++ b/bin/k8s-read-config @@ -63,6 +63,14 @@ do done echo "[service_files]: $SERVICE_FILES" +echo "[endpoints]: $ENDPOINTS" +ENDPOINT_FILES=() +for i in "${ENDPOINTS[@]}" +do + ENDPOINT_FILES+=($BASEDIR/deploy/$i.endpoint.yml) +done +echo "[endpoint_files]: $ENDPOINT_FILES" + echo "[ingresses]: $INGRESSES" INGRESS_FILES=() for i in "${INGRESSES[@]}" diff --git a/circle.yml b/circle.yml index cc40bc0a..7b144342 100644 --- a/circle.yml +++ b/circle.yml @@ -1,7 +1,7 @@ machine: environment: GITHUB_ORGANIZATION: $CIRCLE_PROJECT_USERNAME - GITHUB_REPOSITORY: $CICLE_REPOSITORY_REPONAME + GITHUB_REPOSITORY: $CIRCLE_PROJECT_REPONAME dependencies: pre: @@ -19,5 +19,5 @@ deployment: owner: reactiveops commands: - git fetch --tags - - curl -O https://raw.githubusercontent.com/reactiveops/release.sh/v0.0.1/release.sh - - /bin/bash release.sh + - curl -O https://raw.githubusercontent.com/reactiveops/release.sh/v0.0.2/release + - /bin/bash release