Skip to content

Commit

Permalink
chore(cd): remove ingress def
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-milan committed Jan 8, 2024
1 parent 66cd72b commit 50d368c
Showing 1 changed file with 1 addition and 55 deletions.
56 changes: 1 addition & 55 deletions .github/workflows/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,66 +129,12 @@ jobs:
cd api/
./kustomize edit set image gcr.io/PROJECT_ID/IMAGE_NAME:TAG=ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
./kustomize build . | kubectl apply -n unificacao-prontuarios-prod -f -
cat <<EOF | kubectl apply -n unificacao-prontuarios-prod -f -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: unificacao-prontuarios-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
cert-manager.io/cluster-issuer: "letsencrypt"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
tls:
- hosts:
- unificacao-prontuarios.dados.rio
secretName: unificacao-prontuarios-tls
rules:
- host: unificacao-prontuarios.dados.rio
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: unificacao-prontuarios
port:
number: 80
EOF
kubectl rollout status -w -n unificacao-prontuarios-prod deployment/unificacao-prontuarios
kubectl rollout status -w -n unificacao-prontuarios-prod deployment/unificacao-prontuarios
- name: Deploy (development)
if: github.ref == 'refs/heads/development'
run: |-
cd api/
./kustomize edit set image gcr.io/PROJECT_ID/IMAGE_NAME:TAG=ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ github.sha }}
./kustomize build . | kubectl apply -n unificacao-prontuarios-dev -f -
cat <<EOF | kubectl apply -n unificacao-prontuarios-prod -f -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: unificacao-prontuarios-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
cert-manager.io/cluster-issuer: "letsencrypt"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
tls:
- hosts:
- unificacao-prontuarios-dev.dados.rio
secretName: unificacao-prontuarios-tls
rules:
- host: unificacao-prontuarios-dev.dados.rio
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: unificacao-prontuarios
port:
number: 80
EOF
kubectl rollout status -w -n unificacao-prontuarios-dev deployment/unificacao-prontuarios

0 comments on commit 50d368c

Please sign in to comment.