Commit a73f8b17 authored by Erik Wilson's avatar Erik Wilson

Update check-config.sh for k3s

parent b0d1ca9c
...@@ -29,6 +29,7 @@ func main() { ...@@ -29,6 +29,7 @@ func main() {
cmds.NewKubectlCommand(externalCLIAction("kubectl")), cmds.NewKubectlCommand(externalCLIAction("kubectl")),
cmds.NewCRICTL(externalCLIAction("crictl")), cmds.NewCRICTL(externalCLIAction("crictl")),
cmds.NewCtrCommand(externalCLIAction("ctr")), cmds.NewCtrCommand(externalCLIAction("ctr")),
cmds.NewCheckConfigCommand(externalCLIAction("check-config")),
} }
err := app.Run(os.Args) err := app.Run(os.Args)
......
package cmds
import (
"github.com/urfave/cli"
)
func NewCheckConfigCommand(action func(*cli.Context) error) cli.Command {
return cli.Command{
Name: "check-config",
Usage: "Run config check",
SkipFlagParsing: true,
SkipArgReorder: true,
Action: action,
}
}
...@@ -17,11 +17,24 @@ for i in bridge flannel host-local loopback portmap; do ...@@ -17,11 +17,24 @@ for i in bridge flannel host-local loopback portmap; do
ln -s cni ./bin/$i ln -s cni ./bin/$i
done done
cp contrib/util/check-config.sh bin/check-config
rm -rf build/data rm -rf build/data
mkdir -p build/data build/out mkdir -p build/data build/out
mkdir -p dist/artifacts mkdir -p dist/artifacts
(
set +x
cd bin
find . -not -path '*/\.*' -type f -exec sha256sum {} \; | sed -e 's| \./| |' | sort -k2 >.sha256sums
(
for f in $(find . -type l); do
echo $f $(readlink $f)
done
) | sed -e 's|^\./||' | sort >.links
set -x
)
tar cvzf ./build/out/data.tar.gz --exclude ./bin/hyperkube ./bin ./etc tar cvzf ./build/out/data.tar.gz --exclude ./bin/hyperkube ./bin ./etc
HASH=$(sha256sum ./build/out/data.tar.gz | awk '{print $1}') HASH=$(sha256sum ./build/out/data.tar.gz | awk '{print $1}')
......
...@@ -55,6 +55,7 @@ docker run -d --name ${K3S_SERVER} --privileged \ ...@@ -55,6 +55,7 @@ docker run -d --name ${K3S_SERVER} --privileged \
K3S_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${K3S_SERVER}) K3S_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${K3S_SERVER})
echo "Started ${K3S_SERVER} @ ${K3S_IP}:${K3S_PORT}" echo "Started ${K3S_SERVER} @ ${K3S_IP}:${K3S_PORT}"
docker exec ${K3S_SERVER} check-config || true
timeout --foreground 1m bash -c wait-for-kubeconfig timeout --foreground 1m bash -c wait-for-kubeconfig
verify-valid-versions ${K3S_SERVER} verify-valid-versions ${K3S_SERVER}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment