From 428cd743665bbe211ed69bf78c7e9ae50ca66bf2 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Fri, 12 Apr 2024 23:02:03 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A(k8s)=20move=20tilt=20config=20to?= =?UTF-8?q?=20bin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move tilt config to bin directory to keep the root directory clean. Add makefile cmd about k8s. --- Makefile | 11 ++++++++++- Tiltfile => bin/Tiltfile | 14 +++++++------- start-kind.sh => bin/start-kind.sh | 0 3 files changed, 17 insertions(+), 8 deletions(-) rename Tiltfile => bin/Tiltfile (88%) rename start-kind.sh => bin/start-kind.sh (100%) diff --git a/Makefile b/Makefile index aaaf7154..3f0e669b 100644 --- a/Makefile +++ b/Makefile @@ -321,4 +321,13 @@ frontend-i18n-generate: \ frontend-i18n-compile: ## Format the crowin json files used deploy to the apps cd $(PATH_FRONT) && yarn i18n:deploy -.PHONY: frontend-i18n-compile \ No newline at end of file +.PHONY: frontend-i18n-compile + +# -- K8S +build-k8s-cluster: ## build the kubernetes cluster using kind + ./bin/start-kind.sh +.PHONY: build-k8s-cluster + +start-tilt: ## start the kubernetes cluster using kind + tilt up -f ./bin/Tiltfile +.PHONY: build-k8s-cluster \ No newline at end of file diff --git a/Tiltfile b/bin/Tiltfile similarity index 88% rename from Tiltfile rename to bin/Tiltfile index 21aaca3a..b89aab0a 100644 --- a/Tiltfile +++ b/bin/Tiltfile @@ -4,12 +4,12 @@ namespace_create('impress') docker_build( 'localhost:5001/impress-backend:latest', - context='.', - dockerfile='./Dockerfile', + context='..', + dockerfile='../Dockerfile', only=['./src/backend', './src/mail', './docker'], target = 'backend-development', live_update=[ - sync('./src/backend', '/app'), + sync('../src/backend', '/app'), run( 'pip install -r /app/requirements.txt', trigger=['./api/requirements.txt'] @@ -19,17 +19,17 @@ docker_build( docker_build( 'localhost:5001/impress-frontend:latest', - context='.', - dockerfile='./Dockerfile', + context='..', + dockerfile='../Dockerfile', build_args={'ENV': 'dev'}, only=['./src/frontend', './src/mail', './docker'], target = 'frontend-builder-1', live_update=[ - sync('./src/frontend', '/builder'), + sync('../src/frontend', '/builder'), ] ) -k8s_yaml(local('cd src/helm && helmfile -n impress -e dev template .')) +k8s_yaml(local('cd ../src/helm && helmfile -n impress -e dev template .')) migration = ''' set -eu diff --git a/start-kind.sh b/bin/start-kind.sh similarity index 100% rename from start-kind.sh rename to bin/start-kind.sh