Skip to content

Commit

Permalink
Update ingress and workflow for production
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarquis committed Mar 27, 2024
1 parent 1da1b8f commit 21c2270
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
release:
needs: test
runs-on: ubuntu-latest
if: ${{ vars.RUN_CICD == 'true' && success() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/prod') && (vars.DEPLOY_DEV == 'true' || vars.DEPLOY_PROD == 'true') }}
if: ${{ vars.RUN_CICD == 'true' && success() && github.ref == 'refs/heads/main' && (vars.DEPLOY_DEV == 'true' || vars.DEPLOY_PROD == 'true') }}
steps:
- name: Clone repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -134,6 +134,11 @@ jobs:
engine-announce-retries: ${{ env.DEV_ENGINE_ANNOUNCE_RETRIES }}
engine-announce-retry-delay: ${{ env.DEV_ENGINE_ANNOUNCE_RETRY_DELAY }}

- name: Remove unnecessary keys from configuration files
uses: swiss-ai-center/common-code/.github/actions/remove-unnecessary-keys-from-kubernetes-configuration-files@main
with:
configuration-files-location: ./kubernetes

- name: Deploy service on the Kubernetes cluster
uses: swiss-ai-center/common-code/.github/actions/execute-command-on-kubernetes-cluster@main
with:
Expand All @@ -150,7 +155,7 @@ jobs:
deploy-prod:
needs: release
runs-on: ubuntu-latest
if: ${{ vars.RUN_CICD == 'true' && success() && github.ref == 'refs/heads/prod' && vars.DEPLOY_PROD == 'true' }}
if: ${{ vars.RUN_CICD == 'true' && success() && github.ref == 'refs/heads/main' && vars.DEPLOY_PROD == 'true' }}
steps:
- name: Clone repository
uses: actions/checkout@v4
Expand Down
12 changes: 7 additions & 5 deletions kubernetes/ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ kind: Ingress
metadata:
name: my-service-ingress
annotations:
cert-manager.io/issuer: "letsencrypt"
nginx.ingress.kubernetes.io/proxy-body-size: "16m"
nginx.org/client-max-body-size: "16m"
spec:
rules:
- host: my-service.example.com
http:
paths:
- path: /
- host: my-service.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
Expand All @@ -19,4 +20,5 @@ spec:
number: 80
tls:
- hosts:
- my-service.example.com
- my-service.example.com
secretName: my-service-example-com-tls-cert

0 comments on commit 21c2270

Please sign in to comment.