From 718427c9b85798a7a68d8127c519e3bdad3764ed Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Fri, 6 May 2022 12:57:21 -0400 Subject: [PATCH] feat!: rename BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDRESS to BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDR Signed-off-by: Devin Buhl --- .config.sample.env | 2 +- configure.sh | 16 ++++++++-------- tmpl/ansible/kube-vip.yml | 2 +- tmpl/cluster/kube-vip-daemonset.yaml | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.config.sample.env b/.config.sample.env index ffc06277..7a79482c 100644 --- a/.config.sample.env +++ b/.config.sample.env @@ -43,7 +43,7 @@ export BOOTSTRAP_ANSIBLE_KUBE_VIP_INTERFACE="" # Pick a unused IP that is on the same network as your nodes # and also outside the ${BOOTSTRAP_METALLB_TRAEFIK_ADDR} range # e.g. 192.168.1.254 -export BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDRESS="" +export BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDR="" # # Default prefixes for hostnames assigned by Ansible diff --git a/configure.sh b/configure.sh index 182bde92..4af09810 100755 --- a/configure.sh +++ b/configure.sh @@ -174,8 +174,8 @@ verify_binaries() { } verify_kubevip() { - _has_envar "BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDRESS" - _has_valid_ip "${BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDRESS}" "BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDRESS" + _has_envar "BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDR" + _has_valid_ip "${BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDR}" "BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDR" } verify_metallb() { @@ -284,18 +284,18 @@ verify_ansible_hosts() { _has_envar "${node_control}" _has_optional_envar "${node_hostname}" - if [[ "${node_addr}" == "${BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDRESS}" ]]; then - _log "ERROR" "The kube-vip IP '${BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDRESS}' should not be the same as the IP for node '${node_addr}'" + if [[ "${!node_addr}" == "${BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDR}" ]]; then + _log "ERROR" "The kube-vip IP '${BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDR}' should not be the same as the IP for node '${!node_addr}'" exit 1 fi - if [[ "${node_addr}" == "${BOOTSTRAP_METALLB_K8S_GATEWAY_ADDR}" ]]; then - _log "ERROR" "The k8s-gateway load balancer IP '${BOOTSTRAP_METALLB_K8S_GATEWAY_ADDR}' should not be the same as the IP for node '${node_addr}'" + if [[ "${!node_addr}" == "${BOOTSTRAP_METALLB_K8S_GATEWAY_ADDR}" ]]; then + _log "ERROR" "The k8s-gateway load balancer IP '${BOOTSTRAP_METALLB_K8S_GATEWAY_ADDR}' should not be the same as the IP for node '${!node_addr}'" exit 1 fi - if [[ "${node_addr}" == "${BOOTSTRAP_METALLB_TRAEFIK_ADDR}" ]]; then - _log "ERROR" "The traefik load balancer IP '${BOOTSTRAP_METALLB_TRAEFIK_ADDR}' should not be the same as the IP for node '${node_addr}'" + if [[ "${!node_addr}" == "${BOOTSTRAP_METALLB_TRAEFIK_ADDR}" ]]; then + _log "ERROR" "The traefik load balancer IP '${BOOTSTRAP_METALLB_TRAEFIK_ADDR}' should not be the same as the IP for node '${!node_addr}'" exit 1 fi diff --git a/tmpl/ansible/kube-vip.yml b/tmpl/ansible/kube-vip.yml index 6e901889..acbf087d 100644 --- a/tmpl/ansible/kube-vip.yml +++ b/tmpl/ansible/kube-vip.yml @@ -2,4 +2,4 @@ # (string) The interface on the host kube-vip should attach to kubevip_interface: "${BOOTSTRAP_ANSIBLE_KUBE_VIP_INTERFACE}" # (string) The ARP address kube-vip broadcasts -kubevip_address: "${BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDRESS}" +kubevip_address: "${BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDR}" diff --git a/tmpl/cluster/kube-vip-daemonset.yaml b/tmpl/cluster/kube-vip-daemonset.yaml index 78c37f4f..01e1ded0 100644 --- a/tmpl/cluster/kube-vip-daemonset.yaml +++ b/tmpl/cluster/kube-vip-daemonset.yaml @@ -40,7 +40,7 @@ spec: - name: svc_enable value: "false" - name: address - value: "${BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDRESS}" + value: "${BOOTSTRAP_ANSIBLE_KUBE_VIP_ADDR}" securityContext: capabilities: add: