Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit 1d9b91e

Browse files
🌱 Remove unnecessary env variables in make target env-vars-for-wl-cluster (#102)
* Remove unnecessary env variables in make target env-vars-for-wl-cluster Based on the introduction of local_mode feature(see issue #76). Some env variables are not needed when we are using local_mode. This commit adjust .envrc.sample and also remove these unnecessary env variables in make target env-vars-for-wl-cluster. Signed-off-by: michal.gubricky <[email protected]> * Ensure that we check env variables for local_mode enabled and disabled Signed-off-by: michal.gubricky <[email protected]> --------- Signed-off-by: michal.gubricky <[email protected]>
1 parent 308ece2 commit 1d9b91e

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.envrc.sample

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
export KUBECONFIG=$PWD/.mgt-cluster-kubeconfig.yaml
2-
export GIT_PROVIDER_B64=Z2l0aHVi
3-
export GIT_ACCESS_TOKEN_B64=mybase64encodedtoken
4-
export GIT_ORG_NAME_B64=U292ZXJlaWduQ2xvdWRTdGFjaw==
5-
export GIT_REPOSITORY_NAME_B64=Y2x1c3Rlci1zdGFja3M=
6-
export EXP_CLUSTER_RESOURCE_SET=true
7-
export EXP_MACHINE_POOL=true
82
export CLUSTER_TOPOLOGY=true
9-
export EXP_RUNTIME_SDK=true
10-
export EXP_MACHINE_SET_PREFLIGHT_CHECKS=true
113
export CLUSTER_NAME=test-dfkhje
124
export SECRET_NAME=supersecret
135
export CLOUD_NAME=test
146
export ENCODED_CLOUDS_YAML=mybase64encodedcloudsyamlfile
7+
## These env variables are not needed when local_mode is enabled
8+
# export GIT_PROVIDER_B64=Z2l0aHVi
9+
# export GIT_ACCESS_TOKEN_B64=mybase64encodedtoken
10+
# export GIT_ORG_NAME_B64=U292ZXJlaWduQ2xvdWRTdGFjaw==
11+
# export GIT_REPOSITORY_NAME_B64=Y2x1c3Rlci1zdGFja3M=

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,13 @@ all-tools: $(GOTESTSUM) $(go-cover-treemap) $(go-binsize-treemap) $(KIND) $(PACK
160160
##@ Development
161161

162162
env-vars-for-wl-cluster:
163-
@./hack/ensure-env-variables.sh GIT_PROVIDER_B64 GIT_ACCESS_TOKEN_B64 GIT_ORG_NAME_B64 GIT_REPOSITORY_NAME_B64 EXP_CLUSTER_RESOURCE_SET CLUSTER_TOPOLOGY CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML
163+
ifeq ($(wildcard tilt-settings.yaml),)
164+
@./hack/ensure-env-variables.sh GIT_PROVIDER_B64 GIT_ACCESS_TOKEN_B64 GIT_ORG_NAME_B64 GIT_REPOSITORY_NAME_B64 CLUSTER_TOPOLOGY CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML
165+
else ifeq ($(shell awk '/local_mode:/ {print tolower($$2)}' tilt-settings.yaml),true)
166+
@./hack/ensure-env-variables.sh CLUSTER_TOPOLOGY CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML
167+
else
168+
@./hack/ensure-env-variables.sh GIT_PROVIDER_B64 GIT_ACCESS_TOKEN_B64 GIT_ORG_NAME_B64 GIT_REPOSITORY_NAME_B64 CLUSTER_TOPOLOGY CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML
169+
endif
164170

165171
.PHONY: cluster
166172
cluster: $(CTLPTL) $(KUBECTL) ## Creates kind-dev Cluster
@@ -589,4 +595,4 @@ get-kubeconfig-workload-cluster:
589595

590596
.PHONY: tilt-up
591597
tilt-up: env-vars-for-wl-cluster $(ENVSUBST) $(KUBECTL) $(KUSTOMIZE) $(TILT) cluster ## Start a mgt-cluster & Tilt. Installs the CRDs and deploys the controllers
592-
EXP_CLUSTER_RESOURCE_SET=true $(TILT) up --port=10351
598+
$(TILT) up --port=10351

0 commit comments

Comments
 (0)