460cab6a99
Make the CNI config and binary locations parametrized so it is suitable for more kinds of deployment. Implements: blueprint kubeadminstallable Change-Id: I01c7540641fe120faec902008ebd842339b50384 Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com> Co-Authored-By: Michał Dulko <mdulko@redhat.com>
14 lines
523 B
Bash
14 lines
523 B
Bash
#!/bin/bash -ex
|
|
rm -f /opt/kuryr-kubernetes/kuryr-cni
|
|
rm -f /opt/kuryr-kubernetes/kuryr-cni-bin
|
|
pbr_version=$(find /usr/local/lib/python3.5/site-packages/ -type d \
|
|
-name 'kuryr_kubernetes*info' -exec basename {} \; \
|
|
| awk -F"-" '{sub(/\.dist/,"",$2); print $2}')
|
|
cat > /opt/kuryr-kubernetes/kuryr-cni << EOF
|
|
#!/bin/bash
|
|
export PBR_VERSION='$pbr_version'
|
|
${CNI_BIN_DIR_PATH}/kuryr-cni-bin
|
|
EOF
|
|
cp /dist/kuryr-cni /opt/kuryr-kubernetes/kuryr-cni-bin
|
|
chmod 744 /opt/kuryr-kubernetes/kuryr-cni
|