54 lines
1.6 KiB
YAML
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 }} |