summaryrefslogtreecommitdiffstats
path: root/kubernetes/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/contrib')
-rwxr-xr-xkubernetes/contrib/dns-server-for-vhost-ingress-testing/deploy_dns.sh21
-rwxr-xr-xkubernetes/contrib/metallb-loadbalancer-inst/install-metallb-on-cluster.sh9
2 files changed, 20 insertions, 10 deletions
diff --git a/kubernetes/contrib/dns-server-for-vhost-ingress-testing/deploy_dns.sh b/kubernetes/contrib/dns-server-for-vhost-ingress-testing/deploy_dns.sh
index 3c66feeb46..294ae0a55e 100755
--- a/kubernetes/contrib/dns-server-for-vhost-ingress-testing/deploy_dns.sh
+++ b/kubernetes/contrib/dns-server-for-vhost-ingress-testing/deploy_dns.sh
@@ -49,10 +49,13 @@ Extra DNS server already deployed:
list_node_with_external_addrs()
{
- local WORKER_NODES=$(kubectl get no -l node-role.kubernetes.io/worker=true -o jsonpath='{.items..metadata.name}')
+ local WORKER_NODES
+ WORKER_NODES=$(kubectl get no -l node-role.kubernetes.io/worker=true -o jsonpath='{.items..metadata.name}')
for worker in $WORKER_NODES; do
- local external_ip=$(kubectl get no $worker -o jsonpath='{.metadata.annotations.rke\.cattle\.io/external-ip }')
- local internal_ip=$(kubectl get no $worker -o jsonpath='{.metadata.annotations.rke\.cattle\.io/internal-ip }')
+ local external_ip
+ external_ip=$(kubectl get no $worker -o jsonpath='{.metadata.annotations.rke\.cattle\.io/external-ip }')
+ local internal_ip
+ internal_ip=$(kubectl get no $worker -o jsonpath='{.metadata.annotations.rke\.cattle\.io/internal-ip }')
if [ $internal_ip != $external_ip ]; then
echo $external_ip
break
@@ -61,7 +64,8 @@ list_node_with_external_addrs()
}
ingress_controller_ip() {
- local metal_ns=$(kubectl get ns --no-headers --output=custom-columns=NAME:metadata.name |grep metallb-system)
+ local metal_ns
+ metal_ns=$(kubectl get ns --no-headers --output=custom-columns=NAME:metadata.name |grep metallb-system)
if [ -z $metal_ns ]; then
echo $CLUSTER_IP
else
@@ -70,13 +74,16 @@ ingress_controller_ip() {
}
deploy() {
- local ingress_ip=$(ingress_controller_ip)
+ local ingress_ip
+ ingress_ip=$(ingress_controller_ip)
initdir = $(pwd)
cd $SPATH/bind9dns
if [ $# -eq 0 ]; then
- local cl_domain="simpledemo.onap.org"
+ local cl_domain
+ cl_domain="simpledemo.onap.org"
else
- local cl_domain=$1
+ local cl_domain
+ cl_domain=$1
shift
fi
if [ $# -ne 0 ]; then
diff --git a/kubernetes/contrib/metallb-loadbalancer-inst/install-metallb-on-cluster.sh b/kubernetes/contrib/metallb-loadbalancer-inst/install-metallb-on-cluster.sh
index c62e2a51bd..495d540905 100755
--- a/kubernetes/contrib/metallb-loadbalancer-inst/install-metallb-on-cluster.sh
+++ b/kubernetes/contrib/metallb-loadbalancer-inst/install-metallb-on-cluster.sh
@@ -29,10 +29,13 @@ $0 [cluster_ip1] ... [cluster_ipn] Cluster address or ip ranges
find_nodes_with_external_addrs()
{
- local WORKER_NODES=$(kubectl get no -l node-role.kubernetes.io/worker=true -o jsonpath='{.items..metadata.name}')
+ local WORKER_NODES
+ WORKER_NODES=$(kubectl get no -l node-role.kubernetes.io/worker=true -o jsonpath='{.items..metadata.name}')
for worker in $WORKER_NODES; do
- local external_ip=$(kubectl get no $worker -o jsonpath='{.metadata.annotations.rke\.cattle\.io/external-ip }')
- local internal_ip=$(kubectl get no $worker -o jsonpath='{.metadata.annotations.rke\.cattle\.io/internal-ip }')
+ local external_ip
+ external_ip=$(kubectl get no $worker -o jsonpath='{.metadata.annotations.rke\.cattle\.io/external-ip }')
+ local internal_ip
+ internal_ip=$(kubectl get no $worker -o jsonpath='{.metadata.annotations.rke\.cattle\.io/internal-ip }')
if [ $internal_ip != $external_ip ]; then
echo $external_ip
fi