minor clean
This commit is contained in:
@ -1,14 +1,4 @@
|
||||
#!/bin/bash
|
||||
# @author: Daniel Keszei <keszei.daniel@gmail.com>
|
||||
# @description: Kubernetes deployer
|
||||
# @created: 2019-02-15
|
||||
# @version: 1.0
|
||||
# @origin: https://github.com/szefoka/openfaas_lab
|
||||
|
||||
|
||||
# Variable(s)
|
||||
|
||||
# Script variable(s)
|
||||
PID=$$
|
||||
SCRIPTNAME="$(basename $0)"
|
||||
WORKER_LIST="worker.list"
|
||||
@ -16,23 +6,6 @@ EXTERNAL=false
|
||||
MASTER_IP=""
|
||||
TOKEN=""
|
||||
HASH=""
|
||||
|
||||
|
||||
# Functions
|
||||
|
||||
function usage {
|
||||
cat << EOF
|
||||
Usage: $SCRIPTNAME [--external|-e] <CNI>
|
||||
--external|-e : Initizalize Kubernetes on the external network
|
||||
instead of on an internal one
|
||||
Available <CNI> plugins:
|
||||
* Calico
|
||||
* Cilium
|
||||
* Flannel
|
||||
* WeaveNet
|
||||
EOF
|
||||
}
|
||||
|
||||
## Send error messages to stderr
|
||||
function echo_err {
|
||||
echo "Error: $@" >&2
|
||||
@ -75,18 +48,6 @@ if [ "$#" -lt 1 ]; then
|
||||
echo_err "Missing CNI plugin name as an argument."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Check for help parameter
|
||||
for i in "$@"
|
||||
do
|
||||
### Make the letters of the argument lowercase
|
||||
i=$(tr '[:upper:]' '[:lower:]' <<< $i)
|
||||
case $i in
|
||||
### Print out help message
|
||||
help|h|-h|--help) usage; exit 0;;
|
||||
esac
|
||||
done
|
||||
|
||||
## Check parameters and setup variables for Kubernetes installation
|
||||
for i in "$@"
|
||||
do
|
||||
@ -151,9 +112,6 @@ HASH=sha256:$(openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt |
|
||||
openssl dgst -sha256 -hex |
|
||||
sed 's/^.* //')
|
||||
|
||||
#FIXME Do I need local docker-registry?
|
||||
#./deploy/docker_registry_setup.sh $IP:5000
|
||||
|
||||
# Join the worker nodes
|
||||
for WORKERNAME in ${WORKER[@]}; do
|
||||
echo "[worker:$WORKERNAME] Deploying..."
|
||||
|
Reference in New Issue
Block a user