-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(ingress): use k8s ingress instead of frontend nginx
- Loading branch information
1 parent
2b48e37
commit e7829ef
Showing
8 changed files
with
359 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,22 +23,16 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Create k8s Kind Cluster | ||
uses: helm/[email protected] | ||
with: | ||
cluster_name: basegun-testing | ||
config: ./infra/kube/kind/kind-config.yml | ||
wait: 60s | ||
verbosity: 2 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.11.2 | ||
|
||
- name: Set up ingress controller | ||
run: | | ||
kind create cluster --config ./infra/kube/kind/kind-config.yml | ||
helm repo add traefik https://traefik.github.io/charts && helm repo update | ||
helm install --namespace ingress-traefik --create-namespace traefik traefik/traefik --values ./infra/kube/kind/traefik-values.yml | ||
helm upgrade \ | ||
--install \ | ||
--wait \ | ||
--namespace traefik \ | ||
--create-namespace \ | ||
--values ./infra/kube/kind/traefik-values.yml \ | ||
traefik traefik/traefik | ||
- name: Add hosts to /etc/hosts | ||
run: | | ||
|
@@ -50,23 +44,22 @@ jobs: | |
run: | | ||
TAG=$(make get-current-tag) BUILD_TARGET=test docker-compose -f docker-compose-prod.yml build | ||
kind load docker-image \ | ||
basegun-backend:$(make get-current-tag)-prod \ | ||
basegun-frontend:$(make get-current-tag)-prod \ | ||
--name basegun-testing | ||
basegun-backend:$(make get-current-tag) \ | ||
basegun-frontend:$(make get-current-tag) | ||
helm upgrade --install basegun ./infra/kube/helm/ \ | ||
--set ingress.hosts[0].host="$LOCAL_DOMAIN" \ | ||
--set ingress.hosts[0].paths[0].path="/" \ | ||
--set ingress.hosts[0].paths[0].pathType="Prefix" \ | ||
--set backend.image.repository="basegun-backend" \ | ||
--set backend.image.tag="$(make get-current-tag)-prod" \ | ||
--set backend.image.tag="$(make get-current-tag)" \ | ||
--set frontend.image.repository="basegun-frontend" \ | ||
--set frontend.image.tag="$(make get-current-tag)-prod" \ | ||
--set frontend.image.tag="$(make get-current-tag)" \ | ||
--set backend.secret.create="true" \ | ||
--set-string backend.secret.values.AWS_ACCESS_KEY_ID="${{ secrets.AWS_ACCESS_KEY_ID }}" \ | ||
--set-string backend.secret.values.AWS_SECRET_ACCESS_KEY="${{ secrets.AWS_SECRET_ACCESS_KEY }}" \ | ||
--set-string backend.secret.values.X_OVH_TOKEN="${{ secrets.X_OVH_TOKEN }}" \ | ||
--set-string backend.secret.values.API_OVH_TOKEN="${{ secrets.API_OVH_TOKEN }}" | ||
for i in $(kubectl get deploy -o name); do kubectl rollout status $i -w --timeout=130s; done | ||
# for i in $(kubectl get deploy -o name); do kubectl rollout status $i -w --timeout=260s; done | ||
|
||
- name: Display pod logs on failure | ||
if: failure() && steps.tests.outcome == 'failure' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.