
Turns out 99-loopback.conf file isn't really required when running kuryr-kubernetes. This commit removes its installation from DevStack plugin and CNI Docker image. Change-Id: I8f2097287df907675c4113cd225a7ee9f6cd7ef1
38 lines
958 B
Bash
Executable File
38 lines
958 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
function cleanup() {
|
|
local cni_conf_path
|
|
local cni_bin_path
|
|
cni_conf_path="$1"
|
|
cni_bin_path="$2"
|
|
|
|
rm -f "${cni_conf_path}/10-kuryr.conf"
|
|
rm -f "${cni_bin_path}/kuryr-cni"
|
|
rm -f "${cni_bin_path}/kuryr-cni-bin"
|
|
rm -rf /etc/kuryr
|
|
}
|
|
|
|
function deploy() {
|
|
local cni_conf_path
|
|
local cni_bin_path
|
|
local serviceaccount_path
|
|
|
|
cni_conf_path="$1"
|
|
cni_bin_path="$2"
|
|
serviceaccount_path="/var/run/secrets/kubernetes.io/serviceaccount"
|
|
|
|
mkdir -p /etc/kuryr
|
|
cp "${serviceaccount_path}/token" /etc/kuryr/token
|
|
cp "${serviceaccount_path}/ca.crt" /etc/kuryr/ca.crt
|
|
|
|
cp /opt/kuryr-kubernetes/etc/cni/net.d/* "$cni_conf_path"
|
|
cp /kuryr-cni-bin "${cni_bin_path}/kuryr-cni-bin"
|
|
cp /kuryr-cni "${cni_bin_path}/kuryr-cni"
|
|
cat /tmp/kuryr/* > /etc/kuryr/kuryr.conf
|
|
}
|
|
|
|
cleanup "$CNI_CONFIG_DIR_PATH" "$CNI_BIN_DIR_PATH"
|
|
deploy "$CNI_CONFIG_DIR_PATH" "$CNI_BIN_DIR_PATH"
|
|
|
|
sleep infinity
|