github.com/verrazzano/verrazzano@v1.7.0/ci/make/kind.mk (about)

     1  # Copyright (C) 2022, 2023, Oracle and/or its affiliates.
     2  # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  
     4  include env.mk
     5  
     6  export CLUSTER_NAME ?= kind
     7  
     8  setup-kind: export INSTALL_CONFIG_FILE_KIND ?= ${TEST_SCRIPTS_DIR}/v1beta1/install-verrazzano-kind.yaml
     9  setup-kind: export CREATE_CLUSTER_USE_CALICO ?= false
    10  setup-kind: export CALICO_HOME ?= ${CI_SCRIPTS_DIR}/calico
    11  setup-kind: export TESTS_EXECUTED_FILE ?= ${WORKSPACE}/tests_executed_file.tmp
    12  setup-kind: export KUBERNETES_CLUSTER_VERSION ?= 1.27
    13  .PHONY: setup-kind
    14  setup-kind:
    15  	@echo "Setup KIND cluster"
    16  	${CI_SCRIPTS_DIR}/setup_kind.sh ${CREATE_CLUSTER_USE_CALICO}
    17  
    18  #clean-kind: export KUBECONFIG ?= "${WORKSPACE}/test_kubeconfig"
    19  .PHONY: clean-kind
    20  clean-kind:
    21  	@echo "Cleanup kind cluster ${CLUSTER_NAME}, KUBECONFIG=${KUBECONFIG}"
    22  	${CI_SCRIPTS_DIR}/cleanup_kind_clusters.sh ${CLUSTER_NAME} ${KUBECONFIG}
    23  
    24  .PHONY: clean-kind-all
    25  clean-kind-all:
    26  	@echo "Deleting all kind clusters"
    27  	kind delete clusters --all