Skip to content

Commit

Permalink
Merge pull request #63 from SamYuan1990/replaceHomeDIR
Browse files Browse the repository at this point in the history
Replace home dir by project root
  • Loading branch information
SamYuan1990 authored Mar 17, 2024
2 parents 11a3e4c + e0ec910 commit 67d9c52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ declare -r PROJECT_ROOT CALLER_PROJECT_ROOT
# configuration
declare -r CTR_CMD=${CTR_CMD:-docker}
declare -r CLUSTER_PROVIDER=${CLUSTER_PROVIDER:-kind}
declare -r KUBECONFIG_ROOT_DIR=${KUBECONFIG_ROOT_DIR:-$HOME/.kube}
declare -r KUBECONFIG_ROOT_DIR=${KUBECONFIG_ROOT_DIR:-$PROJECT_ROOT/.kube}
declare -r KEPLER_KUBECONFIG=${KEPLER_KUBECONFIG:-config-kepler}

declare -r REGISTRY_PORT=${REGISTRY_PORT:-5001}
Expand Down
1 change: 1 addition & 0 deletions providers/kind/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ kind_up() {
kind_preinstall_check
_prepare_config
_setup_kind
export KUBECONFIG="$KIND_KUBECONFIG"
wait_for_cluster_ready
kind_wait_up
_run_kind_registry
Expand Down
3 changes: 2 additions & 1 deletion verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ set -eu -o pipefail

PROJECT_ROOT="$(git rev-parse --show-toplevel)"
declare -r PROJECT_ROOT
declare -r KUBECONFIG_ROOT_DIR=${KUBECONFIG_ROOT_DIR:-$PROJECT_ROOT/.kube}
# shellcheck source=lib/utils.sh
source "$PROJECT_ROOT/lib/utils.sh"

Expand All @@ -43,7 +44,7 @@ verify_bcc() {
verify_cluster() {
# basic check for k8s cluster info
info "Verifying cluster status"

export KUBECONFIG="${KUBECONFIG_ROOT_DIR}/config"
run kubectl cluster-info || die "failed to get the cluster-info"

# check k8s system pod is there...
Expand Down

0 comments on commit 67d9c52

Please sign in to comment.