bugfix/fix-monitoring-resources

Signed-off-by: kklinch0 <kklinch0@gmail.com>
This commit is contained in:
kklinch0
2025-03-17 10:41:16 +03:00
parent a2af07d1dc
commit e0a63c32b0
5 changed files with 57 additions and 67 deletions

View File

@@ -3,4 +3,4 @@ name: monitoring
description: Monitoring and observability stack
icon: /logos/monitoring.svg
type: application
version: 1.9.0
version: 1.9.1

View File

@@ -13,27 +13,10 @@ spec:
# it's usually more than default 30
maxLabelsPerTimeseries: "60"
replicaCount: 2
resources:
limits:
{{- with . | dig "vminsert" "resources" "limits" "cpu" nil }}
cpu: {{ . | quote }}
{{- end }}
memory: {{ . | dig "vminsert" "resources" "limits" "memory" "1000Mi" }}
requests:
cpu: {{ . | dig "vminsert" "resources" "requests" "cpu" "500m" }}
memory: {{ . | dig "vminsert" "resources" "requests" "memory" "500Mi" }}
resources: {}
vmselect:
replicaCount: 2
resources:
limits:
# if we don't set the cpu limit, victoriametrics-operator will set 500m here, which is ridiculous small
# see internal/config/config.go in victoriametrics-operator
# 2 vcpu is the bare minimum for **single** Grafana user
cpu: {{ . | dig "vmselect" "resources" "limits" "cpu" "2000m" }}
memory: {{ . | dig "vmselect" "resources" "limits" "memory" "1000Mi" }}
requests:
cpu: {{ . | dig "vmselect" "resources" "requests" "cpu" "500m" }}
memory: {{ . | dig "vmselect" "resources" "requests" "memory" "500Mi" }}
resources: {}
extraArgs:
search.maxUniqueTimeseries: "600000"
vmalert.proxyURL: http://vmalert-{{ .name }}.{{ $.Release.Namespace }}.svc:8080
@@ -50,15 +33,7 @@ spec:
storage: 2Gi
vmstorage:
replicaCount: 2
resources:
limits:
{{- with . | dig "vmstorage" "resources" "limits" "cpu" nil }}
cpu: {{ . | quote }}
{{- end }}
memory: {{ . | dig "vmstorage" "resources" "limits" "memory" "2048Mi" }}
requests:
cpu: {{ . | dig "vmstorage" "resources" "requests" "cpu" "100m" }}
memory: {{ . | dig "vmstorage" "resources" "requests" "memory" "500Mi" }}
resources: {}
storage:
volumeClaimTemplate:
spec:

View File

@@ -1,62 +1,89 @@
{{- range .Values.metricsStorages }}
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: vpa-vminsert
name: vpa-vminsert-{{ .name }}
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: vminsert-shortterm
name: vminsert-{{ .name }}
updatePolicy:
updateMode: Auto
resourcePolicy:
containerPolicies:
- containerName: vminsert
minAllowed:
{{- if and .vminsert .vminsert.minAllowed }}
{{- toYaml .vminsert.minAllowed | nindent 10 }}
{{- else }}
cpu: 250m
memory: 256Mi
{{- end }}
maxAllowed:
{{- if and .vminsert .vminsert.maxAllowed }}
{{- toYaml .vminsert.maxAllowed | nindent 10 }}
{{- else }}
cpu: 2000m
memory: 4Gi
{{- end }}
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: vpa-vmselect
name: vpa-vmselect-{{ .name }}
spec:
targetRef:
apiVersion: apps/v1
kind: StatefulSet
name: vmselect-shortterm
name: vmselect-{{ .name }}
updatePolicy:
updateMode: Auto
resourcePolicy:
containerPolicies:
- containerName: vmselect
minAllowed:
{{- if and .vmselect .vmselect.minAllowed }}
{{- toYaml .vmselect.minAllowed | nindent 10 }}
{{- else }}
cpu: 250m
memory: 256Mi
{{- end }}
maxAllowed:
{{- if and .vmselect .vmselect.maxAllowed }}
{{- toYaml .vmselect.maxAllowed | nindent 10 }}
{{- else }}
cpu: 4000m
memory: 8Gi
{{- end }}
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: vpa-vmstorage
name: vpa-vmstorage-{{ .name }}
spec:
targetRef:
apiVersion: apps/v1
kind: StatefulSet
name: vmstorage-shortterm
name: vmstorage-{{ .name }}
updatePolicy:
updateMode: Auto
resourcePolicy:
containerPolicies:
- containerName: vmstorage
minAllowed:
{{- if and .vmstorage .vmstorage.minAllowed }}
{{- toYaml .vmstorage.minAllowed | nindent 10 }}
{{- else }}
cpu: 100m
memory: 512Mi
{{- end }}
maxAllowed:
{{- if and .vmstorage .vmstorage.maxAllowed }}
{{- toYaml .vmstorage.maxAllowed | nindent 10 }}
{{- else }}
cpu: 4000m
memory: 8Gi
{{- end }}
{{- end }}

View File

@@ -13,26 +13,26 @@ host: ""
## storage: 10Gi
## storageClassName: ""
## vminsert:
## resources:
## limits:
## memory: 1024Mi
## requests:
## cpu: 200m
## memory: 512Mi
## minAllowed:
## cpu: 200m
## memory: 512Mi
## maxAllowed:
## cpu: 1500m
## memory: 3Gi
## vmselect:
## resources:
## limits:
## memory: 2048Mi
## requests:
## cpu: 300m
## memory: 1Gi
## minAllowed:
## cpu: 300m
## memory: 1Gi
## maxAllowed:
## cpu: 3500m
## memory: 6Gi
## vmstorage:
## resources:
## limits:
## memory: 4096Mi
## requests:
## cpu: 500m
## memory: 2Gi
## minAllowed:
## cpu: 500m
## memory: 2Gi
## maxAllowed:
## cpu: 4000m
## memory: 8Gi
##
metricsStorages:
- name: shortterm
@@ -40,24 +40,11 @@ metricsStorages:
deduplicationInterval: "15s"
storage: 10Gi
storageClassName: ""
vminsert:
resources: {}
vmselect:
resources: {}
vmstorage:
resources: {}
- name: longterm
retentionPeriod: "14d"
deduplicationInterval: "5m"
storage: 10Gi
storageClassName: ""
vminsert:
resources: {}
vmselect:
resources: {}
vmstorage:
resources: {}
## @param logsStorages [array] Configuration of logs storage instances
##

View File

@@ -31,7 +31,8 @@ monitoring 1.6.1 3bb97596
monitoring 1.7.0 749110aa
monitoring 1.8.0 80b4c151
monitoring 1.8.1 06daf341
monitoring 1.9.0 HEAD
monitoring 1.9.0 8267072d
monitoring 1.9.1 HEAD
seaweedfs 0.1.0 5ca8823
seaweedfs 0.2.0 9e33dc0
seaweedfs 0.2.1 249bf35