Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ""