us-dop-api/k8s/deployment.yml.template
maximo tejeda b339c25237
All checks were successful
${{ github.actor }} executed Build Push Prod / build (push) Successful in 3m12s
${{ github.actor }} executed Build Push Prod / deploy (push) Successful in 18s
Change template
2024-12-03 23:37:33 -04:00

67 lines
1.5 KiB
Plaintext

apiVersion: apps/v1
kind: Deployment
metadata:
name: $REPONAME
labels:
app: $REPONAME
spec:
replicas: 1
selector:
matchLabels:
app: $REPONAME
template:
metadata:
labels:
app: $REPONAME
name: $REPONAME
spec:
containers:
- name: $REPONAME
image: $IMAGE
env:
- name: DOLLAR_SERVICE_URL
value: "$DOLLAR_SERVICE_URL"
- name: HOST
value: "$HOST"
- name: NATSURI
value: "$NATS_SERVICE_URL"
- name: PORT
value: "$PORT"
---
apiVersion: v1
kind: Service
metadata:
name: $REPONAME-svc
spec:
type: LoadBalancer
selector:
app: $REPONAME
ports:
- port: 80
targetPort: $PORT
name: frontend
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
# add an annotation indicating the issuer to use.
# cert-manager.io/cluster-issuer: letsencrypt
name: $REPONAME-ingress
spec:
rules:
- host: cambio.maximotejeda.com
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: $REPONAME-svc
port:
number: 80
#tls: # < placing a host in the TLS config will determine what ends up in the cert's subjectAltNames
#- hosts:
# - cambio.maximotejeda.com
# secretName: cambio.maximotejeda-cert # < cert-manager will store the created certificate in this secret.