2021-09-24 11:33:49 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: StatefulSet
|
|
|
|
metadata:
|
|
|
|
name: {{ include "kubezero-lib.fullname" . }}
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
labels:
|
|
|
|
{{- include "kubezero-lib.labels" . | nindent 4 }}
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "kubezero-lib.selectorLabels" . | nindent 6 }}
|
|
|
|
serviceName: {{ include "kubezero-lib.fullname" . }}
|
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
{{- include "kubezero-lib.selectorLabels" . | nindent 8 }}
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: uptime-kuma
|
2021-10-21 15:10:34 +00:00
|
|
|
{{- if .Values.version }}
|
|
|
|
image: "{{ .Values.image }}:{{ .Values.version }}"
|
|
|
|
{{- else }}
|
2022-12-06 15:44:19 +00:00
|
|
|
image: "{{ .Values.image }}:{{ .Chart.AppVersion }}"
|
2021-10-21 15:10:34 +00:00
|
|
|
{{- end }}
|
|
|
|
env:
|
|
|
|
- name: UPTIME_KUMA_PORT
|
|
|
|
value: "3001"
|
2021-09-24 11:33:49 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 3001
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /app/data
|
|
|
|
name: storage
|
|
|
|
livenessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- node
|
|
|
|
- extra/healthcheck.js
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
periodSeconds: 30
|
|
|
|
timeoutSeconds: 3
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /
|
|
|
|
port: 3001
|
|
|
|
scheme: HTTP
|
|
|
|
resources:
|
|
|
|
{{- toYaml .Values.resources | nindent 10 }}
|
|
|
|
#securityContext:
|
|
|
|
# runAsNonRoot: true
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
volumeClaimTemplates:
|
|
|
|
- metadata:
|
|
|
|
name: storage
|
|
|
|
spec:
|
|
|
|
accessModes: [ "ReadWriteOnce" ]
|
|
|
|
{{- with .Values.storageClassName }}
|
|
|
|
storageClassName: {{ . }}
|
|
|
|
{{- end }}
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 1Gi
|