69 lines
1.6 KiB
YAML
69 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: productzilla-web-pz
|
|
namespace: {{namespace}}
|
|
labels:
|
|
app: web-pz
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: web-pz
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: web-pz
|
|
spec:
|
|
containers:
|
|
- name: web-pz
|
|
image: productzilla/web-pz:{{tags}}
|
|
imagePullPolicy: Always
|
|
resources:
|
|
requests:
|
|
memory: '64Mi'
|
|
cpu: '250m'
|
|
limits:
|
|
memory: '256Mi'
|
|
cpu: '500m'
|
|
ports:
|
|
- containerPort: 3000
|
|
env:
|
|
- name: NODE_ENV
|
|
value: production
|
|
- name: DB_HOST
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: productzilla-secret
|
|
key: mariadb-host
|
|
- name: DB_PORT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: productzilla-secret
|
|
key: mariadb-port
|
|
- name: DB_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: productzilla-password-secret
|
|
key: mariadb-username
|
|
- name: DB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: productzilla-password-secret
|
|
key: mariadb-password
|
|
- name: DB_NAME
|
|
value: web-pz
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: web-pz-svc
|
|
namespace: {{namespace}}
|
|
spec:
|
|
selector:
|
|
app: web-pz
|
|
ports:
|
|
- protocol: TCP
|
|
port: 3000
|
|
targetPort: 3000 # should match containerPort
|