50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
service: {{ .Values.name }}
|
|
name: {{ .Values.name }}
|
|
namespace: {{ .Values.namespace | default .Values.name }}
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
service: {{ .Values.name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
service: {{ .Values.name }}
|
|
spec:
|
|
containers:
|
|
- image: {{ .Values.image.repository }}/{{ .Values.image.name | default .Values.name }}:{{ .Values.image.tag }}
|
|
name: {{ .Values.name }}
|
|
ports:
|
|
- containerPort: {{ .Values.port }}
|
|
protocol: TCP
|
|
resources:
|
|
requests:
|
|
cpu: {{ .Values.cpuRequest }}
|
|
memory: {{ .Values.memoryRequest }}
|
|
limits:
|
|
cpu: {{ .Values.cpuLimit }}
|
|
memory: {{ .Values.memoryLimit }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: {{ .Values.port }}
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /ready
|
|
port: {{ .Values.port }}
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
startupProbe:
|
|
httpGet:
|
|
path: /ready
|
|
port: {{ .Values.port }}
|
|
failureThreshold: 30
|
|
periodSeconds: 10
|
|
imagePullSecrets:
|
|
- name: {{ .Values.imagePullSecret }}
|