74 lines
1.7 KiB
Plaintext
74 lines
1.7 KiB
Plaintext
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: us-dop-api
|
|
labels:
|
|
app: us-dop-api
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: us-dop-api
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: us-dop-api
|
|
name: us-dop-api
|
|
spec:
|
|
containers:
|
|
- name: us-dop-pi
|
|
image: localhost:32000/us-dop-api:latest
|
|
env:
|
|
- name: DOLLAR_SERVICE_URL
|
|
value: "dolar-grpc-svc:80"
|
|
- name: HOST
|
|
value: "0.0.0.0"
|
|
- name: NATSURI
|
|
value: "nats://nats-svc:4222"
|
|
- name: PORT
|
|
value: "8080"
|
|
volumeMounts:
|
|
- name: database
|
|
mountPath: /app/dolardb
|
|
volumes:
|
|
- name: database
|
|
persistentVolumeClaim:
|
|
claimName: bank-crawler-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: us-dop-api-svc
|
|
spec:
|
|
type: LoadBalancer
|
|
selector:
|
|
app: us-dop-api
|
|
ports:
|
|
- port: 80
|
|
targetPort: 8080
|
|
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: us-dop-api-ingress
|
|
spec:
|
|
rules:
|
|
- host: cambio.maximotejeda.com
|
|
http:
|
|
paths:
|
|
- pathType: Prefix
|
|
path: "/"
|
|
backend:
|
|
service:
|
|
name: us-dop-api-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.
|