mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
added vagrant vsphere support
updated vsphere-dummy box for the vagrant vsphere using vagrant vsphere plugin added solution for cases when the NETWORK_IF_NAME was left empty
This commit is contained in:
committed by
Roman Dembitsky
parent
2ac788b492
commit
2117c068bb
@@ -30,6 +30,12 @@ function provision-network-node {
|
||||
NETWORK_CONF_PATH=/etc/sysconfig/network-scripts/
|
||||
if_to_edit=$( find ${NETWORK_CONF_PATH}ifcfg-* | xargs grep -l VAGRANT-BEGIN )
|
||||
NETWORK_IF_NAME=`echo ${if_to_edit} | awk -F- '{ print $3 }'`
|
||||
# needed for vsphere support
|
||||
# handle the case when no 'VAGRANT-BEGIN' comment was defined in network-scripts
|
||||
# set the NETWORK_IF_NAME to have a default value in such case
|
||||
if [[ -z "$NETWORK_IF_NAME" ]]; then
|
||||
NETWORK_IF_NAME=${DEFAULT_NETWORK_IF_NAME}
|
||||
fi
|
||||
cat <<EOF >/etc/sysconfig/flanneld
|
||||
FLANNEL_ETCD="${FLANNEL_ETCD_URL}"
|
||||
FLANNEL_ETCD_KEY="/coreos.com/network"
|
||||
|
||||
Reference in New Issue
Block a user