mirror of https://github.com/Mai-with-u/MaiBot.git
编写statistics-dashboard的清单模板
parent
15e6bac7e4
commit
65f0515e80
|
|
@ -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 }}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{{- if .Values.statistics_dashboard.enabled and .Values.statistics_dashboard.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-maibot-statistics-dashboard
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{ .Values.statistics_dashboard.ingress.annotations }}
|
||||
labels:
|
||||
app: {{ .Release.Name }}-maibot-statistics-dashboard
|
||||
spec:
|
||||
ingressClassName: {{ .Values.statistics_dashboard.ingress.className }}
|
||||
rules:
|
||||
- host: {{ .Values.statistics_dashboard.ingress.host }}
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: {{ .Release.Name }}-maibot-statistics-dashboard
|
||||
port:
|
||||
number: {{ .Values.statistics_dashboard.service.port }}
|
||||
path: {{ .Values.statistics_dashboard.ingress.path }}
|
||||
pathType: {{ .Values.statistics_dashboard.ingress.pathType }}
|
||||
{{- end }}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
{{- if .Values.statistics_dashboard.enabled }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-maibot-statistics-dashboard
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
accessModes: {{ .Values.statistics_dashboard.persistence.accessModes }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.statistics_dashboard.persistence.size }}
|
||||
storageClassName: {{ .Values.statistics_dashboard.persistence.storageClass | default nil }}
|
||||
{{- end }}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{{- if .Values.statistics_dashboard.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-maibot-statistics-dashboard
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ .Release.Name }}-maibot-statistics-dashboard
|
||||
spec:
|
||||
ports:
|
||||
- name: dashboard
|
||||
port: {{ .Values.statistics_dashboard.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
{{- if eq .Values.statistics_dashboard.service.type "nodePort" }}
|
||||
nodePort: {{ .Values.statistics_dashboard.service.nodePort }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ .Release.Name }}-maibot-statistics-dashboard
|
||||
type: {{ .Values.statistics_dashboard.service.type }}
|
||||
{{- end }}
|
||||
Loading…
Reference in New Issue