setup 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env bash
  2. # Copyright Materialize, Inc. and contributors. All rights reserved.
  3. #
  4. # Use of this software is governed by the Business Source License
  5. # included in the LICENSE file at the root of this repository.
  6. #
  7. # As of the Change Date specified in that file, in accordance with
  8. # the Business Source License, use of this software will be governed
  9. # by the Apache License, Version 2.0.
  10. set -euo pipefail
  11. cd "$(dirname "$0")/../.."
  12. . misc/shlib/shlib.bash
  13. . test/cloudtest/config.bash
  14. if ! kind get clusters | grep -q "$K8S_CLUSTER_NAME"; then
  15. CLUSTER_YAML=${CLOUDTEST_CLUSTER_DEFINITION_FILE:-"misc/kind/cluster.yaml"}
  16. echo "Using cluster definition specified in ${CLUSTER_YAML}"
  17. run kind create cluster --name="$K8S_CLUSTER_NAME" --config="${CLUSTER_YAML}" --wait=60s
  18. run kubectl --context="$K8S_CONTEXT" taint nodes --selector=environmentd=true "environmentd=true:NoSchedule"
  19. fi
  20. for f in misc/kind/configmaps/*; do
  21. run kubectl --context="$K8S_CONTEXT" apply -f "$f"
  22. done
  23. run kubectl --context="$K8S_CONTEXT" rollout restart -n kube-system deployment/coredns