257b5a80ab
10-kuryr.conflist file from the template file kuryr.conflist.template 1. Currently kubelet's cni config file uses 10-kuryr.conf in kuryr. The kubernetes can support the config file with two suffixes, ".conf" and ".conflist", the latter can be a list containing multiple cni plugins. So I want to update the 10-kuryr.conf to 10-kuryr.conflist to satisfy the need to use multiple plug-in support. 2. If I install the kuryr-cni by pod, the 10-kuryr.conf will only be copied and overwrited from the kuryr/cni image container. What I expected is we can customize the config file more freely. So I think we can add an other file kuryr.conflist.template as the template, then we generate the 10-kuryr.conflist fron it. Change-Id: Ie3669db4e60a57b24012124cd24b524eb03f55cf
23 lines
581 B
Bash
Executable File
23 lines
581 B
Bash
Executable File
#!/bin/bash -ex
|
|
|
|
function cleanup() {
|
|
rm -f "/etc/cni/net.d/10-kuryr.conflist"
|
|
rm -f "/opt/cni/bin/kuryr-cni"
|
|
}
|
|
|
|
function deploy() {
|
|
# Copy the binary into the designated location
|
|
cp /kuryr-cni "/opt/cni/bin/kuryr-cni"
|
|
chmod +x /opt/cni/bin/kuryr-cni
|
|
if [ -f /etc/cni/net.d/kuryr.conflist.template ]; then
|
|
cp /etc/cni/net.d/kuryr.conflist.template /etc/cni/net.d/10-kuryr.conflist
|
|
else
|
|
cp /etc/kuryr-cni/kuryr.conflist.template /etc/cni/net.d/10-kuryr.conflist
|
|
fi
|
|
}
|
|
|
|
cleanup
|
|
deploy
|
|
|
|
exec kuryr-daemon --config-file /etc/kuryr/kuryr.conf
|