mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* Moving to static htpasswd file as it is for ephermal test cluster anyway - password still remains password@123 Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com> * Moving kubeadmin to its own script Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com> * Updating script name Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com> * Adding check for non-existent KUBECONFIG Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com> * Removing reset_kubeconfig Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com> * Fixing reset_kubeconfig as it should not be called unless user wants to do it Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com> * Addressing comment by girish Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
14 lines
342 B
Bash
14 lines
342 B
Bash
#!/usr/bin/env bash
|
|
|
|
reset_kubeconfig() {
|
|
if [[ -z $ORIGINAL_KUBECONFIG || -z $ORIGINAL_KUBECONFIG ]]; then
|
|
echo "KUBECONFIG or ORIGINAL_KUBECONFIG not set"
|
|
exit 1
|
|
fi
|
|
if [[ $KUBECONFIG != $ORIGINAL_KUBECONFIG ]]; then
|
|
rm -rf $KUBECONFIG
|
|
fi
|
|
export KUBECONFIG=$ORIGINAL_KUBECONFIG
|
|
}
|
|
|
|
reset_kubeconfig |