diff --git a/Makefile b/Makefile index e69666f39e..a916abd51d 100644 --- a/Makefile +++ b/Makefile @@ -403,13 +403,13 @@ helm/check: $(BIN)/kubeconform $(BIN)/helm $(BIN)/helm template -n default --kube-version "1.23.0" pyroscope-dev ./operations/pyroscope/helm/pyroscope/ \ | tee ./operations/pyroscope/helm/pyroscope/rendered/single-binary.yaml \ | $(BIN)/kubeconform --summary --strict --kubernetes-version 1.23.0 - $(BIN)/helm template -n default --kube-version "1.23.0" pyroscope-dev ./operations/pyroscope/helm/pyroscope/ --values operations/pyroscope/helm/pyroscope/values-micro-services.yaml \ + $(BIN)/helm template -n default --kube-version "1.23.0" pyroscope-dev ./operations/pyroscope/helm/pyroscope/ --values operations/pyroscope/helm/pyroscope/values-micro-services-small.yaml\ | tee ./operations/pyroscope/helm/pyroscope/rendered/micro-services.yaml \ | $(BIN)/kubeconform --summary --strict --kubernetes-version 1.23.0 $(BIN)/helm template -n default --kube-version "1.23.0" pyroscope-dev ./operations/pyroscope/helm/pyroscope/ --values operations/pyroscope/helm/pyroscope/values-micro-services-hpa.yaml \ | tee ./operations/pyroscope/helm/pyroscope/rendered/micro-services-hpa.yaml \ | $(BIN)/kubeconform --summary --strict --kubernetes-version 1.23.0 - cat operations/pyroscope/helm/pyroscope/values-micro-services.yaml \ + cat operations/pyroscope/helm/pyroscope/values-micro-services-small.yaml\ | go run ./tools/yaml-to-json \ > ./operations/pyroscope/jsonnet/values-micro-services.json cat operations/pyroscope/helm/pyroscope/values-micro-services-hpa.yaml \ @@ -429,7 +429,7 @@ deploy: $(BIN)/kind $(BIN)/helm docker-image/pyroscope/build deploy-micro-services: $(BIN)/kind $(BIN)/helm docker-image/pyroscope/build # Ensure to delete existing service, that has been created manually by the deploy target kubectl delete svc --field-selector metadata.name=pyroscope-micro-services-query-frontend -l app.kubernetes.io/managed-by!=Helm || true - $(call deploy,pyroscope-micro-services,--values=operations/pyroscope/helm/pyroscope/values-micro-services.yaml --set pyroscope.components.querier.resources=null --set pyroscope.components.distributor.resources=null --set pyroscope.components.ingester.resources=null --set pyroscope.components.store-gateway.resources=null --set pyroscope.components.compactor.resources=null) + $(call deploy,pyroscope-micro-services,--values=operations/pyroscope/helm/pyroscope/values-micro-services-small.yaml--set pyroscope.components.querier.resources=null --set pyroscope.components.distributor.resources=null --set pyroscope.components.ingester.resources=null --set pyroscope.components.store-gateway.resources=null --set pyroscope.components.compactor.resources=null) .PHONY: deploy-monitoring deploy-monitoring: $(BIN)/tk $(BIN)/kind tools/monitoring/environments/default/spec.json diff --git a/operations/pyroscope/helm/pyroscope/rendered/micro-services.yaml b/operations/pyroscope/helm/pyroscope/rendered/micro-services.yaml index 389a63402f..c6d66be333 100644 --- a/operations/pyroscope/helm/pyroscope/rendered/micro-services.yaml +++ b/operations/pyroscope/helm/pyroscope/rendered/micro-services.yaml @@ -2279,10 +2279,10 @@ spec: mountPath: /data resources: limits: - memory: 4Gi + memory: 1Gi requests: - cpu: 0.1 - memory: 16Mi + cpu: 100m + memory: 256Mi volumes: - name: config configMap: @@ -2796,8 +2796,8 @@ spec: limits: memory: 4Gi requests: - cpu: 0.1 - memory: 16Mi + cpu: 100m + memory: 256Mi volumes: - name: config configMap: @@ -3086,10 +3086,10 @@ spec: subPath: compactor resources: limits: - memory: 16Gi + memory: 2Gi requests: - cpu: 1 - memory: 8Gi + cpu: 200m + memory: 512Mi terminationGracePeriodSeconds: 1200 volumes: - name: config @@ -3192,10 +3192,10 @@ spec: mountPath: /data resources: limits: - memory: 16Gi + memory: 2Gi requests: - cpu: 1 - memory: 8Gi + cpu: 200m + memory: 512Mi terminationGracePeriodSeconds: 600 volumes: - name: config @@ -3299,10 +3299,10 @@ spec: mountPath: /data resources: limits: - memory: 16Gi + memory: 2Gi requests: - cpu: 1 - memory: 8Gi + cpu: 200m + memory: 512Mi volumes: - name: config configMap: diff --git a/operations/pyroscope/helm/pyroscope/values-micro-services-small.yaml b/operations/pyroscope/helm/pyroscope/values-micro-services-small.yaml new file mode 100644 index 0000000000..46c16788f8 --- /dev/null +++ b/operations/pyroscope/helm/pyroscope/values-micro-services-small.yaml @@ -0,0 +1,106 @@ +# Default values for pyroscope. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +pyroscope: + extraArgs: + store-gateway.sharding-ring.replication-factor: "3" + components: + querier: + kind: Deployment + replicaCount: 3 + resources: + limits: + memory: 1Gi + requests: + memory: 256Mi + cpu: 1 + query-frontend: + kind: Deployment + replicaCount: 2 + resources: + limits: + memory: 1Gi + requests: + memory: 256Mi + cpu: 100m + query-scheduler: + kind: Deployment + replicaCount: 2 + resources: + limits: + memory: 1Gi + requests: + memory: 256Mi + cpu: 100m + distributor: + kind: Deployment + replicaCount: 2 + resources: + limits: + memory: 1Gi + requests: + memory: 256Mi + cpu: 500m + ingester: + kind: StatefulSet + replicaCount: 3 + terminationGracePeriodSeconds: 600 + resources: + limits: + memory: 2Gi + requests: + memory: 512Mi + cpu: 200m + compactor: + kind: StatefulSet + replicaCount: 3 + terminationGracePeriodSeconds: 1200 + persistence: + enabled: false + resources: + limits: + memory: 2Gi + requests: + memory: 512Mi + cpu: 200m + store-gateway: + kind: StatefulSet + replicaCount: 3 + persistence: + # The store-gateway needs not need persistent storage, but we still run it as a StatefulSet + # This is to avoid having blocks of data being + enabled: false + resources: + limits: + memory: 2Gi + requests: + memory: 512Mi + cpu: 200m + readinessProbe: + # The store gateway can be configured to wait on startup for ring stability to be reached before it becomes + # ready. See the `store-gateway.sharding-ring.wait-stability-min-duration` server argument for more information. + # + # Depending on this flag and the number of tenants + blocks that need to be synced on startup, pods can take + # some time to become ready. This value can be used to ensure Kubernetes waits long enough and reduce errors. + initialDelaySeconds: 60 + tenant-settings: + kind: Deployment + replicaCount: 1 + resources: + limits: + memory: 4Gi + requests: + memory: 256Mi + cpu: 100m + ad-hoc-profiles: + kind: Deployment + replicaCount: 1 + resources: + limits: + memory: 1Gi + requests: + memory: 256Mi + cpu: 100m +minio: + enabled: true diff --git a/operations/pyroscope/jsonnet/values-micro-services.json b/operations/pyroscope/jsonnet/values-micro-services.json index 38eaa78aa8..e5d41b1843 100644 --- a/operations/pyroscope/jsonnet/values-micro-services.json +++ b/operations/pyroscope/jsonnet/values-micro-services.json @@ -9,11 +9,11 @@ "replicaCount": 1, "resources": { "limits": { - "memory": "4Gi" + "memory": "1Gi" }, "requests": { - "cpu": 0.1, - "memory": "16Mi" + "cpu": "100m", + "memory": "256Mi" } } }, @@ -25,11 +25,11 @@ "replicaCount": 3, "resources": { "limits": { - "memory": "16Gi" + "memory": "2Gi" }, "requests": { - "cpu": 1, - "memory": "8Gi" + "cpu": "200m", + "memory": "512Mi" } }, "terminationGracePeriodSeconds": 1200 @@ -52,11 +52,11 @@ "replicaCount": 3, "resources": { "limits": { - "memory": "16Gi" + "memory": "2Gi" }, "requests": { - "cpu": 1, - "memory": "8Gi" + "cpu": "200m", + "memory": "512Mi" } }, "terminationGracePeriodSeconds": 600 @@ -111,11 +111,11 @@ "replicaCount": 3, "resources": { "limits": { - "memory": "16Gi" + "memory": "2Gi" }, "requests": { - "cpu": 1, - "memory": "8Gi" + "cpu": "200m", + "memory": "512Mi" } } }, @@ -127,8 +127,8 @@ "memory": "4Gi" }, "requests": { - "cpu": 0.1, - "memory": "16Mi" + "cpu": "100m", + "memory": "256Mi" } } }