diff --git a/.envrc.sample b/.envrc.sample index 8e66c3aa..eb1f5217 100644 --- a/.envrc.sample +++ b/.envrc.sample @@ -1,14 +1,11 @@ export KUBECONFIG=$PWD/.mgt-cluster-kubeconfig.yaml -export GIT_PROVIDER_B64=Z2l0aHVi -export GIT_ACCESS_TOKEN_B64=mybase64encodedtoken -export GIT_ORG_NAME_B64=U292ZXJlaWduQ2xvdWRTdGFjaw== -export GIT_REPOSITORY_NAME_B64=Y2x1c3Rlci1zdGFja3M= -export EXP_CLUSTER_RESOURCE_SET=true -export EXP_MACHINE_POOL=true export CLUSTER_TOPOLOGY=true -export EXP_RUNTIME_SDK=true -export EXP_MACHINE_SET_PREFLIGHT_CHECKS=true export CLUSTER_NAME=test-dfkhje export SECRET_NAME=supersecret export CLOUD_NAME=test export ENCODED_CLOUDS_YAML=mybase64encodedcloudsyamlfile +## These env variables are not needed when local_mode is enabled +# export GIT_PROVIDER_B64=Z2l0aHVi +# export GIT_ACCESS_TOKEN_B64=mybase64encodedtoken +# export GIT_ORG_NAME_B64=U292ZXJlaWduQ2xvdWRTdGFjaw== +# export GIT_REPOSITORY_NAME_B64=Y2x1c3Rlci1zdGFja3M= diff --git a/Makefile b/Makefile index a83cf263..cb3eea63 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,13 @@ all-tools: $(GOTESTSUM) $(go-cover-treemap) $(go-binsize-treemap) $(KIND) $(PACK ##@ Development env-vars-for-wl-cluster: - @./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 +ifeq ($(wildcard tilt-settings.yaml),) + @./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 +else ifeq ($(shell awk '/local_mode:/ {print tolower($$2)}' tilt-settings.yaml),true) + @./hack/ensure-env-variables.sh CLUSTER_TOPOLOGY CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML +else + @./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 +endif .PHONY: cluster cluster: $(CTLPTL) $(KUBECTL) ## Creates kind-dev Cluster @@ -589,4 +595,4 @@ get-kubeconfig-workload-cluster: .PHONY: tilt-up tilt-up: env-vars-for-wl-cluster $(ENVSUBST) $(KUBECTL) $(KUSTOMIZE) $(TILT) cluster ## Start a mgt-cluster & Tilt. Installs the CRDs and deploys the controllers - EXP_CLUSTER_RESOURCE_SET=true $(TILT) up --port=10351 + $(TILT) up --port=10351