From 290a6f989dfd2f928b4a3c4df3c7727bb30c7511 Mon Sep 17 00:00:00 2001 From: Steven Webster Date: Mon, 12 Aug 2019 17:10:23 -0500 Subject: [PATCH] Multus support for IPv6 service endpoint The K8s service host in the Multus kubeconfig file is currently not wrapped with [brackets] in the case an IPv6 cluster service endpoint has been configured. This causes issues for Multus when it attemps to get (curl) for the address. This fix ensures the IPv6 address is properly formatted for use by Multus. Closes-Bug: 1836972 Change-Id: I803edfb86a70d232d6015a7bb130da0756a56458 Signed-off-by: Steven Webster --- .../src/modules/platform/templates/multus.yaml.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/puppet-manifests/src/modules/platform/templates/multus.yaml.erb b/puppet-manifests/src/modules/platform/templates/multus.yaml.erb index b7089f5e22..abad7312d4 100644 --- a/puppet-manifests/src/modules/platform/templates/multus.yaml.erb +++ b/puppet-manifests/src/modules/platform/templates/multus.yaml.erb @@ -152,6 +152,9 @@ spec: - | #!/bin/bash sed "s|__KUBERNETES_NODE_NAME__|${KUBERNETES_NODE_NAME}|g" /tmp/multus-conf/05-multus.conf > /usr/src/multus-cni/images/05-multus.conf + <%- if @pod_network_ipversion == 6 -%> + sed -i 's#//\${KUBERNETES_SERVICE_HOST}#//\[\${KUBERNETES_SERVICE_HOST}\]#' /entrypoint.sh + <%- end -%> /entrypoint.sh --multus-conf-file=/usr/src/multus-cni/images/05-multus.conf resources: requests: