Skip to content

Commit 97512de

Browse files
committed
kubeadm install gets netctl from container
netctl used to be added in the minimal installer, but was removed. The binary is in the netplugin container that is run on every node, so instead of including it in the minimal installer, extract it from the container. Signed-off-by: Chris Plock <[email protected]>
1 parent a973348 commit 97512de

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

install/k8s/install.sh

+11-3
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,17 @@ echo "Applying contiv installation"
276276
grep -q -F "netmaster" /etc/hosts || echo "$netmaster netmaster" >>/etc/hosts
277277
echo "To customize the installation press Ctrl+C and edit $contiv_yaml."
278278
sleep 5
279-
chmod +x ./netctl
280-
rm -f /usr/bin/netctl
281-
cp ./netctl /usr/bin/
279+
280+
# extract netctl from netplugin container
281+
echo "Extracting netctl from netplugin container"
282+
netplugin_version=$(
283+
sed '/contiv_network_version/!d;s/.*\: \?"\(.*\)".*/\1/' \
284+
install/ansible/env.json)
285+
docker rm netplugin-tmp >/dev/null 2>/dev/null || :
286+
c_id=$(docker create --name netplugin-tmp contiv/netplugin:$netplugin_version)
287+
docker cp ${c_id}:/contiv/bin/netctl /usr/bin
288+
docker rm ${c_id}
289+
282290
# Install Contiv
283291
$kubectl apply -f $contiv_yaml
284292

0 commit comments

Comments
 (0)