编写statistics-dashboard的清单模板

This commit is contained in:
zhangxinhui02
2025-08-20 00:00:56 +08:00
parent 15e6bac7e4
commit 65f0515e80
4 changed files with 106 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
{{- if .Values.statistics_dashboard.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-maibot-statistics-dashboard
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Release.Name }}-maibot-statistics-dashboard
spec:
replicas: {{ .Values.statistics_dashboard.replicaCount }}
selector:
matchLabels:
app: {{ .Release.Name }}-maibot-statistics-dashboard
template:
metadata:
labels:
app: {{ .Release.Name }}-maibot-statistics-dashboard
spec:
containers:
- name: nginx
image: {{ .Values.statistics_dashboard.image.repository }}:{{ .Values.statistics_dashboard.image.tag }}
imagePullPolicy: {{ .Values.statistics_dashboard.image.pullPolicy }}
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: 80
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
ports:
- containerPort: 80
name: dashboard
protocol: TCP
resources: {{ .Values.statistics_dashboard.resources }}
volumeMounts:
- mountPath: /usr/share/nginx/html
name: statistics
readOnly: true
imagePullSecrets: {{ .Values.statistics_dashboard.image.pullSecrets }}
nodeSelector: {{ .Values.statistics_dashboard.nodeSelector }}
tolerations: {{ .Values.core.tolerations }}
volumes:
- name: statistics
persistentVolumeClaim:
claimName: {{ .Release.Name }}-maibot-statistics-dashboard
{{- end }}