Skip to content

Commit

Permalink
Merge pull request #223 from xwu2git/master
Browse files Browse the repository at this point in the history
accumulative fixes
  • Loading branch information
xwu2git authored May 16, 2020
2 parents b77aea7 + 3b602cb commit f5f7379
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion deployment/kubernetes/analytics.yaml.m4
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
image: `ssai_analytics_'defn(`FRAMEWORK')`_'defn(`PLATFORM_SUFFIX'):latest
imagePullPolicy: IfNotPresent
env:
- name: NETWORK_PREFERENCE
- name: `NETWORK_PREFERENCE'
value: "{\"defn(`PLATFORM_DEVICE')\":\"defn(`NETWORK_PREFERENCE')\"}"
- name: VA_PRE
value: "defn(`PLATFORM')-"
Expand Down
2 changes: 1 addition & 1 deletion deployment/kubernetes/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ -x /usr/bin/kubectl ] || [ -x /usr/local/bin/kubectl ]; then
fi

# list all workers
hosts=($(kubectl get node -l vcac-zone!=yes -o jsonpath='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}:{range @.spec.taints[*]}{@.key}={@.effect};{end}{end}' | grep Ready=True | grep -v NoSchedule | cut -f1 -d':'))
hosts=($(kubectl get node -l vcac-zone!=yes -o custom-columns=NAME:metadata.name,STATUS:status.conditions[-1].type,TAINT:spec.taints | grep " Ready " | grep -v "NoSchedule" | cut -f1 -d' '))
if test ${#hosts[@]} -eq 0; then
printf "\nFailed to locate worker node(s) for shared storage\n\n"
exit -1
Expand Down
16 changes: 3 additions & 13 deletions deployment/kubernetes/stop.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
#!/bin/bash -e
#!/bin/bash

DIR=$(dirname $(readlink -f "$0"))

# delete all pods, services and deployments
for yaml in $(find "${DIR}" -maxdepth 1 \( -name "*.yaml" ! -name "*-pv.yaml" ! -name "*-pvc.yaml" \) -print); do
kubectl delete -f "$yaml" --ignore-not-found=true 2>/dev/null || echo -n ""
done

# delete all pvcs
for yaml in $(find "${DIR}" -maxdepth 1 -name "*-pvc.yaml" -print); do
kubectl delete -f "$yaml" --ignore-not-found=true 2>/dev/null || echo -n ""
done

# delete pvs and scs
for yaml in $(find "${DIR}" -maxdepth 1 -name "*-pv.yaml" -print); do
kubectl delete -f "$yaml" --ignore-not-found=true 2>/dev/null || echo -n ""
for yaml in $(find "${DIR}" -maxdepth 1 -name "*.yaml" -print); do
kubectl delete --wait=false -f "$yaml" --ignore-not-found=true 2>/dev/null
done

kubectl delete secret self-signed-certificate 2> /dev/null || echo -n ""

0 comments on commit f5f7379

Please sign in to comment.