77 lines
1.4 KiB
YAML
77 lines
1.4 KiB
YAML
|
---
|
||
|
apiVersion: networking.k8s.io/v1
|
||
|
kind: Ingress
|
||
|
metadata:
|
||
|
name: app
|
||
|
annotations:
|
||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||
|
spec:
|
||
|
ingressClassName: nginx
|
||
|
tls:
|
||
|
- secretName: tls-app
|
||
|
hosts:
|
||
|
- "$BASE_URL"
|
||
|
rules:
|
||
|
- host: "$BASE_URL"
|
||
|
http:
|
||
|
paths:
|
||
|
- path: /
|
||
|
pathType: Prefix
|
||
|
backend:
|
||
|
service:
|
||
|
name: app
|
||
|
port:
|
||
|
name: http
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: app
|
||
|
labels:
|
||
|
app: app
|
||
|
spec:
|
||
|
selector:
|
||
|
app: app
|
||
|
ports:
|
||
|
- name: http
|
||
|
port: 80
|
||
|
targetPort: http
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: app
|
||
|
labels:
|
||
|
app: app
|
||
|
spec:
|
||
|
revisionHistoryLimit: 3
|
||
|
replicas: $NB_REPLICAS
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: app
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: app
|
||
|
spec:
|
||
|
serviceAccountName: homepage
|
||
|
imagePullSecrets:
|
||
|
- name: regcred
|
||
|
containers:
|
||
|
- name: app
|
||
|
image: "$IMAGEAPP"
|
||
|
ports:
|
||
|
- name: http
|
||
|
containerPort: 3000
|
||
|
volumeMounts:
|
||
|
- name: config
|
||
|
mountPath: /app/config/
|
||
|
readOnly: true
|
||
|
env:
|
||
|
- name: LOG_TARGETS
|
||
|
value: stdout
|
||
|
volumes:
|
||
|
- name: config
|
||
|
configMap:
|
||
|
name: homepage-config
|