Hexo-Async-Offends/chart/templates/statefulset.yaml
offends bfd9b82035
All checks were successful
continuous-integration/drone Build is passing
synchronization
2024-07-19 16:20:34 +08:00

54 lines
1.6 KiB
YAML

apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ .Values.statefulset.blog_twikoo.name }}
spec:
podManagementPolicy: OrderedReady
replicas: 1
revisionHistoryLimit: 0
selector:
matchLabels:
app: {{ .Values.statefulset.blog_twikoo.labels.app }}
serviceName: {{ .Values.statefulset.blog_twikoo.name }}
minReadySeconds: 5
template:
metadata:
labels:
app: {{ .Values.statefulset.blog_twikoo.labels.app }}
spec:
terminationGracePeriodSeconds: 5
containers:
- name: {{ .Values.statefulset.blog_twikoo.name }}
image: {{ .Values.statefulset.blog_twikoo.image }}:{{ .Values.statefulset.blog_twikoo.tag }}
env:
{{- range .Values.statefulset.blog_twikoo.env }}
- name: {{ .name }}
value: "{{ .value }}"
{{- end }}
ports:
- containerPort: {{ .Values.blog_twikoo.targetPort }}
protocol: TCP
resources:
limits:
memory: {{ .Values.statefulset.blog_twikoo.limits.memory }}
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 3
successThreshold: 1
tcpSocket:
port: {{ .Values.blog_twikoo.targetPort }}
timeoutSeconds: 20
{{- if .Values.global.enabled }}
volumeMounts:
{{- range .Values.statefulset.blog_twikoo.volumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
{{- end }}
{{- if .Values.global.enabled }}
volumes:
- name: data
persistentVolumeClaim:
claimName: twikoo-pvc
{{- end }}