74 lines
2.4 KiB
YAML
74 lines
2.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ .Release.Name }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
|
app.kubernetes.io/component: web
|
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
|
spec:
|
|
revisionHistoryLimit: 3
|
|
replicas: {{ .Values.deployment.replicas }}
|
|
strategy:
|
|
type: {{ .Values.deployment.strategy }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ .Release.Name }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ .Release.Name }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
spec:
|
|
serviceAccountName: {{ .Release.Name }}
|
|
containers:
|
|
- name: {{ .Release.Name }}
|
|
image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}"
|
|
imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: {{ .Values.service.http.port }}
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /config
|
|
name: cops-config
|
|
- mountPath: /books
|
|
name: cops-books
|
|
resources:
|
|
{{- toYaml .Values.deployment.resources | nindent 12 }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: {{ .Values.service.http.port }}
|
|
initialDelaySeconds: 0
|
|
failureThreshold: 5
|
|
timeoutSeconds: 1
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: {{ .Values.service.http.port }}
|
|
initialDelaySeconds: 0
|
|
failureThreshold: 5
|
|
timeoutSeconds: 1
|
|
periodSeconds: 10
|
|
startupProbe:
|
|
httpGet:
|
|
path: /
|
|
port: {{ .Values.service.http.port }}
|
|
initialDelaySeconds: 5
|
|
failureThreshold: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 1
|
|
volumes:
|
|
- name: cops-config
|
|
persistentVolumeClaim:
|
|
claimName: cops-config
|
|
- name: cops-books
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.persistence.books.claimName }}
|