mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #1957 from mcsaucy/http
Perform basic validation on K3S_URL in install.sh
This commit is contained in:
commit
5e01bd3558
@ -153,6 +153,14 @@ setup_env() {
|
||||
if [ -z "${K3S_TOKEN}" ] && [ -z "${K3S_CLUSTER_SECRET}" ]; then
|
||||
fatal "Defaulted k3s exec command to 'agent' because K3S_URL is defined, but K3S_TOKEN or K3S_CLUSTER_SECRET is not defined."
|
||||
fi
|
||||
|
||||
case "${K3S_URL}" in
|
||||
https://*)
|
||||
;;
|
||||
*)
|
||||
fatal "Only https:// URLs are supported for K3S_URL (have ${K3S_URL})"
|
||||
;;
|
||||
esac
|
||||
CMD_K3S=agent
|
||||
fi
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user