Prevent btrix helper from doing anything to k8s contexts other than docker-desktop (#2431)
The `./btrix` development helper shouldn't be used for anything other than local dev, which this commit helps to enforce. When running any command, if the k8s context is anything other than `docker-desktop` the script will now shut down immediately without doing anything and print the message: "Attempting to modify context other than docker-desktop not supported. Quitting."
This commit is contained in:
parent
67668438c0
commit
da77b066a4
5
btrix
5
btrix
@ -120,6 +120,11 @@ CONTEXT=$(cat ~/.kube/config | grep "current-context:" | sed "s/current-context:
|
||||
MICROK8S="-microk8s"
|
||||
WAIT="-wait"
|
||||
|
||||
if [ $CONTEXT != "docker-desktop" ]; then
|
||||
echo "Attempting to modify context other than docker-desktop not supported. Quitting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $1 = "setup" ]]; then
|
||||
setupLocalConfig
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user