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 <steven.webster@windriver.com>
This commit is contained in:
Steven Webster 2019-08-12 17:10:23 -05:00
parent 20c122a2dc
commit 290a6f989d
1 changed files with 3 additions and 0 deletions

View File

@ -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: