mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Support Running local-up-cluster in CI
This commit is contained in:
parent
948f28a74c
commit
d71b7a8d7d
@ -947,6 +947,15 @@ EOF
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If we are running in the CI, we need a few more things before we can start
|
||||||
|
if [[ "${KUBETEST_IN_DOCKER:-}" == "true" ]]; then
|
||||||
|
echo "Preparing to test ..."
|
||||||
|
${KUBE_ROOT}/hack/install-etcd.sh
|
||||||
|
export PATH="${KUBE_ROOT}/third_party/etcd:${PATH}"
|
||||||
|
KUBE_FASTBUILD=true make ginkgo cross
|
||||||
|
apt install -y sudo
|
||||||
|
fi
|
||||||
|
|
||||||
# validate that etcd is: not running, in path, and has minimum required version.
|
# validate that etcd is: not running, in path, and has minimum required version.
|
||||||
if [[ "${START_MODE}" != "kubeletonly" ]]; then
|
if [[ "${START_MODE}" != "kubeletonly" ]]; then
|
||||||
kube::etcd::validate
|
kube::etcd::validate
|
||||||
@ -1022,3 +1031,10 @@ print_success
|
|||||||
if [[ "${ENABLE_DAEMON}" = false ]]; then
|
if [[ "${ENABLE_DAEMON}" = false ]]; then
|
||||||
while true; do sleep 1; done
|
while true; do sleep 1; done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${KUBETEST_IN_DOCKER:-}" == "true" ]]; then
|
||||||
|
cluster/kubectl.sh config set-cluster local --server=https://localhost:6443 --certificate-authority=/var/run/kubernetes/server-ca.crt
|
||||||
|
cluster/kubectl.sh config set-credentials myself --client-key=/var/run/kubernetes/client-admin.key --client-certificate=/var/run/kubernetes/client-admin.crt
|
||||||
|
cluster/kubectl.sh config set-context local --cluster=local --user=myself
|
||||||
|
cluster/kubectl.sh config use-context local
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user