mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-06 13:27:41 +02:00
install kind as GO modules
This commit is contained in:
+1
-4
@@ -43,10 +43,7 @@ push: docker
|
||||
|
||||
tools: docker
|
||||
# install pinned version of 'kind'
|
||||
# leave the name as is to avoid overwriting official binary named `kind`
|
||||
wget https://github.com/kubernetes-sigs/kind/releases/download/v0.5.1/kind-linux-amd64
|
||||
chmod +x kind-linux-amd64
|
||||
mv kind-linux-amd64 $(KIND_PATH)
|
||||
GO111MODULE=on go get sigs.k8s.io/kind@v0.6.0
|
||||
|
||||
test:
|
||||
./run.sh
|
||||
|
||||
+7
-7
@@ -30,15 +30,15 @@ function pull_images(){
|
||||
function start_kind(){
|
||||
|
||||
# avoid interference with previous test runs
|
||||
if [[ $(kind-linux-amd64 get clusters | grep "^${cluster_name}*") != "" ]]
|
||||
if [[ $(kind get clusters | grep "^${cluster_name}*") != "" ]]
|
||||
then
|
||||
kind-linux-amd64 delete cluster --name ${cluster_name}
|
||||
kind delete cluster --name ${cluster_name}
|
||||
fi
|
||||
|
||||
kind-linux-amd64 create cluster --name ${cluster_name} --config kind-cluster-postgres-operator-e2e-tests.yaml
|
||||
kind-linux-amd64 load docker-image "${operator_image}" --name ${cluster_name}
|
||||
kind-linux-amd64 load docker-image "${e2e_test_image}" --name ${cluster_name}
|
||||
KUBECONFIG="$(kind-linux-amd64 get kubeconfig-path --name=${cluster_name})"
|
||||
kind create cluster --name ${cluster_name} --config kind-cluster-postgres-operator-e2e-tests.yaml
|
||||
kind load docker-image "${operator_image}" --name ${cluster_name}
|
||||
kind load docker-image "${e2e_test_image}" --name ${cluster_name}
|
||||
KUBECONFIG="$(kind get kubeconfig-path --name=${cluster_name})"
|
||||
export KUBECONFIG
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ function run_tests(){
|
||||
|
||||
function clean_up(){
|
||||
unset KUBECONFIG
|
||||
kind-linux-amd64 delete cluster --name ${cluster_name}
|
||||
kind delete cluster --name ${cluster_name}
|
||||
rm -rf ${kubeconfig_path}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user