Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions bindata/network/multus/multus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,22 @@ spec:
priorityClassName: "system-node-critical"
tolerations:
- operator: Exists
initContainers:
- name: fix-cni-kubeconfig
image: {{.MultusImage}}
command: ["/bin/bash", "-c"]
args:
- |
KC="/host/etc/cni/net.d/multus.d/multus.kubeconfig"
[ -f "$KC" ] || exit 0
if grep -q 'server:.*://\[' "$KC"; then
sed -i -E 's|(server: https?://)(\[)([^]]+[^0-9:.])(\])|\1\3|g' "$KC"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sed -i -E 's|(server: https?://)\[([^]:]+)\]|\1\2|g' "$KC"
replace with this so that we dont break on dual stack clusters

fi
securityContext:
privileged: true
volumeMounts:
- name: system-cni-dir
mountPath: /host/etc/cni/net.d
containers:
- name: kube-multus
image: {{.MultusImage}}
Expand Down