mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-10-22 07:52:12 +00:00
Server URL in multus kubeconfig at /etc/cni/net.d/multus.d/multus.kubeconfig
is not properly setup for IPv6 installs Fix: If the API server host is IPv6 address then the server url should include square braces to separate the IP address and port correctly
This commit is contained in:
committed by
Tomofumi Hayashi
parent
a3712815fd
commit
cb3f59e7e7
@@ -191,10 +191,6 @@ if [ -f "$SERVICE_ACCOUNT_PATH/token" ]; then
|
|||||||
# We're running as a k8d pod - expect some variables.
|
# We're running as a k8d pod - expect some variables.
|
||||||
if [ -z ${KUBERNETES_SERVICE_HOST} ]; then
|
if [ -z ${KUBERNETES_SERVICE_HOST} ]; then
|
||||||
error "KUBERNETES_SERVICE_HOST not set"; exit 1;
|
error "KUBERNETES_SERVICE_HOST not set"; exit 1;
|
||||||
elif [[ ${KUBERNETES_SERVICE_HOST} == *":"* ]]; then
|
|
||||||
K8S_API_SERVICE_HOST="[${KUBERNETES_SERVICE_HOST}]"
|
|
||||||
else
|
|
||||||
K8S_API_SERVICE_HOST="${KUBERNETES_SERVICE_HOST}"
|
|
||||||
fi
|
fi
|
||||||
if [ -z ${KUBERNETES_SERVICE_PORT} ]; then
|
if [ -z ${KUBERNETES_SERVICE_PORT} ]; then
|
||||||
error "KUBERNETES_SERVICE_PORT not set"; exit 1;
|
error "KUBERNETES_SERVICE_PORT not set"; exit 1;
|
||||||
@@ -219,7 +215,7 @@ kind: Config
|
|||||||
clusters:
|
clusters:
|
||||||
- name: local
|
- name: local
|
||||||
cluster:
|
cluster:
|
||||||
server: ${KUBERNETES_SERVICE_PROTOCOL:-https}://${K8S_API_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}
|
server: ${KUBERNETES_SERVICE_PROTOCOL:-https}://[${KUBERNETES_SERVICE_HOST}]:${KUBERNETES_SERVICE_PORT}
|
||||||
$TLS_CFG
|
$TLS_CFG
|
||||||
users:
|
users:
|
||||||
- name: multus
|
- name: multus
|
||||||
|
Reference in New Issue
Block a user