Hexo-Async-Offends/chart/templates/deployment.yaml

87 lines
2.6 KiB
YAML
Raw Permalink Normal View History

2024-07-19 09:09:37 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.deployment.blog.name }}
labels:
app: {{ .Values.deployment.blog.labels.app }}
spec:
{{- include "argument" . | nindent 2 }}
selector:
matchLabels:
app: {{ .Values.deployment.blog.labels.app }}
template:
metadata:
labels:
app: {{ .Values.deployment.blog.labels.app }}
spec:
{{- if .Values.global.enabled }}
volumes:
- name: data
persistentVolumeClaim:
claimName: blog-pvc
{{- end }}
containers:
- name: {{ .Values.deployment.blog.name }}
image: {{ .Values.deployment.blog.image }}:{{ .Values.deployment.blog.tag }}
{{- include "imagePullPolicy" . | nindent 8 }}
ports:
- containerPort: {{ .Values.blog.targetPort }}
protocol: TCP
{{- if .Values.global.enabled }}
volumeMounts:
{{- range .Values.deployment.blog.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
{{- end }}
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 3
successThreshold: 1
tcpSocket:
port: {{ .Values.blog.targetPort }}
timeoutSeconds: 10
resources:
limits:
memory: {{ .Values.deployment.blog.limits.memory }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.deployment.blog_gateway.name }}
labels:
app: {{ .Values.deployment.blog_gateway.labels.app }}
spec:
{{- include "argument" . | nindent 2 }}
selector:
matchLabels:
app: {{ .Values.deployment.blog_gateway.labels.app }}
template:
metadata:
labels:
app: {{ .Values.deployment.blog_gateway.labels.app }}
spec:
containers:
- name: {{ .Values.deployment.blog_gateway.name }}
image: {{ .Values.deployment.blog_gateway.image }}:{{ .Values.deployment.blog_gateway.tag }}
{{- include "imagePullPolicy" . | nindent 8 }}
env:
{{- range .Values.deployment.blog_gateway.env }}
- name: {{ .name }}
value: {{ .value }}
{{- end }}
ports:
- containerPort: {{ .Values.blog_gateway.targetPort }}
protocol: TCP
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 3
successThreshold: 1
tcpSocket:
port: {{ .Values.blog_gateway.targetPort }}
timeoutSeconds: 10
resources:
limits:
memory: {{ .Values.deployment.blog_gateway.limits.memory }}