Skip to content

Commit

Permalink
Merge pull request #29 from reactiveops/pc/endpoints
Browse files Browse the repository at this point in the history
Add `endpoint` resource
  • Loading branch information
philipcristiano authored Dec 29, 2016
2 parents 4760cc8 + ae5ac76 commit 2a79946
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=()
Expand Down
15 changes: 15 additions & 0 deletions bin/k8s-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions bin/k8s-example-config
Original file line number Diff line number Diff line change
Expand Up @@ -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=()
Expand Down
8 changes: 8 additions & 0 deletions bin/k8s-read-config
Original file line number Diff line number Diff line change
Expand Up @@ -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[@]}"
Expand Down

0 comments on commit 2a79946

Please sign in to comment.