From 58d9ca174203e09bdb324325dc704d34f9478441 Mon Sep 17 00:00:00 2001 From: Alexander Soelberg Heidarsson <89837986+alex5517@users.noreply.github.com> Date: Tue, 28 May 2024 13:48:02 +0200 Subject: [PATCH] Helm: Add support for dedicated ruler query path (#7964) * Add support for dedicated ruler query path * Add feature to changelog * Default to false * Add ci test for ruler dedicated query path * rename test file + build tests * update comments * Update operations/helm/charts/mimir-distributed/CHANGELOG.md Co-authored-by: Dimitar Dimitrov --------- Co-authored-by: Dimitar Dimitrov --- .../charts/mimir-distributed/CHANGELOG.md | 1 + ...est-ruler-dedicated-query-path-values.yaml | 5 + .../mimir-distributed/templates/_helpers.tpl | 3 + .../ruler-querier/ruler-querier-dep.yaml | 171 ++++++++ .../ruler-querier/ruler-querier-pdb.yaml | 3 + .../ruler-querier/ruler-querier-servmon.yaml | 3 + .../ruler-querier/ruler-querier-so.yaml | 46 ++ .../ruler-querier/ruler-querier-svc.yaml | 27 ++ .../ruler-query-frontend-dep.yaml | 157 +++++++ .../ruler-query-frontend-pdb.yaml | 3 + .../ruler-query-frontend-servmon.yaml | 3 + .../ruler-query-frontend-so.yaml | 46 ++ .../ruler-query-frontend-svc.yaml | 27 ++ .../ruler-query-scheduler-dep.yaml | 146 +++++++ .../ruler-query-scheduler-pdb.yaml | 3 + .../ruler-query-scheduler-servmon.yaml | 3 + .../ruler-query-scheduler-svc-headless.yaml | 30 ++ .../ruler-query-scheduler-svc.yaml | 27 ++ .../helm/charts/mimir-distributed/values.yaml | 299 +++++++++++++ .../charts/minio/templates/configmap.yaml | 406 +++++++++++++++++ .../minio/templates/console-service.yaml | 21 + .../charts/minio/templates/deployment.yaml | 82 ++++ .../charts/minio/templates/post-job.yaml | 74 ++++ .../charts/minio/templates/pvc.yaml | 17 + .../charts/minio/templates/secrets.yaml | 15 + .../charts/minio/templates/service.yaml | 22 + .../minio/templates/serviceaccount.yaml | 6 + .../templates/deployment.yaml | 65 +++ .../rollout_operator/templates/role.yaml | 30 ++ .../templates/rolebinding.yaml | 13 + .../templates/serviceaccount.yaml | 12 + .../alertmanager/alertmanager-config.yaml | 21 + .../alertmanager/alertmanager-pdb.yaml | 19 + .../alertmanager-statefulset.yaml | 129 ++++++ .../alertmanager-svc-headless.yaml | 36 ++ .../alertmanager/alertmanager-svc.yaml | 30 ++ .../templates/compactor/compactor-pdb.yaml | 19 + .../compactor/compactor-statefulset.yaml | 121 ++++++ .../templates/compactor/compactor-svc.yaml | 30 ++ .../distributor/distributor-dep.yaml | 128 ++++++ .../distributor/distributor-pdb.yaml | 19 + .../distributor/distributor-svc-headless.yaml | 32 ++ .../distributor/distributor-svc.yaml | 30 ++ .../gossip-ring/gossip-ring-svc.yaml | 26 ++ .../templates/ingester/ingester-pdb.yaml | 19 + .../ingester/ingester-statefulset.yaml | 396 +++++++++++++++++ .../ingester/ingester-svc-headless.yaml | 32 ++ .../templates/ingester/ingester-svc.yaml | 105 +++++ .../templates/mimir-config.yaml | 120 ++++++ .../templates/minio/create-bucket-job.yaml | 47 ++ .../templates/nginx/nginx-configmap.yaml | 134 ++++++ .../templates/nginx/nginx-dep.yaml | 94 ++++ .../templates/nginx/nginx-pdb.yaml | 19 + .../templates/nginx/nginx-svc.yaml | 25 ++ .../overrides-exporter-dep.yaml | 106 +++++ .../overrides-exporter-pdb.yaml | 19 + .../overrides-exporter-svc.yaml | 29 ++ .../templates/podsecuritypolicy.yaml | 40 ++ .../templates/querier/querier-dep.yaml | 120 ++++++ .../templates/querier/querier-pdb.yaml | 19 + .../templates/querier/querier-svc.yaml | 30 ++ .../query-frontend/query-frontend-dep.yaml | 116 +++++ .../query-frontend/query-frontend-pdb.yaml | 19 + .../query-frontend/query-frontend-svc.yaml | 29 ++ .../query-scheduler/query-scheduler-dep.yaml | 109 +++++ .../query-scheduler/query-scheduler-pdb.yaml | 19 + .../query-scheduler-svc-headless.yaml | 32 ++ .../query-scheduler/query-scheduler-svc.yaml | 29 ++ .../mimir-distributed/templates/role.yaml | 16 + .../templates/rolebinding.yaml | 20 + .../ruler-querier/ruler-querier-dep.yaml | 121 ++++++ .../ruler-querier/ruler-querier-pdb.yaml | 19 + .../ruler-querier/ruler-querier-svc.yaml | 30 ++ .../ruler-query-frontend-dep.yaml | 118 +++++ .../ruler-query-frontend-pdb.yaml | 19 + .../ruler-query-frontend-svc.yaml | 29 ++ .../ruler-query-scheduler-dep.yaml | 109 +++++ .../ruler-query-scheduler-pdb.yaml | 19 + .../ruler-query-scheduler-svc-headless.yaml | 32 ++ .../ruler-query-scheduler-svc.yaml | 29 ++ .../templates/ruler/ruler-dep.yaml | 119 +++++ .../templates/ruler/ruler-pdb.yaml | 19 + .../templates/ruler/ruler-svc.yaml | 26 ++ .../templates/runtime-configmap.yaml | 15 + .../templates/serviceaccount.yaml | 13 + .../templates/smoke-test/smoke-test-job.yaml | 55 +++ .../store-gateway/store-gateway-pdb.yaml | 19 + .../store-gateway-statefulset.yaml | 408 ++++++++++++++++++ .../store-gateway-svc-headless.yaml | 32 ++ .../store-gateway/store-gateway-svc.yaml | 105 +++++ 90 files changed, 5485 insertions(+) create mode 100644 operations/helm/charts/mimir-distributed/ci/offline/test-ruler-dedicated-query-path-values.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-dep.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-pdb.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-servmon.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-so.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-svc.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-dep.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-pdb.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-servmon.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-so.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-svc.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-dep.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-pdb.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-servmon.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc-headless.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/service.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/serviceaccount.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/deployment.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/role.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/rolebinding.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/serviceaccount.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-config.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-svc-headless.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-statefulset.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-dep.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-svc-headless.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/gossip-ring/gossip-ring-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-statefulset.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-svc-headless.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/mimir-config.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-configmap.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-dep.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-dep.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/podsecuritypolicy.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-dep.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-dep.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-dep.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-svc-headless.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/role.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/rolebinding.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-dep.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-dep.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-dep.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc-headless.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-dep.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-svc.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/runtime-configmap.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/serviceaccount.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/smoke-test/smoke-test-job.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-pdb.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-svc-headless.yaml create mode 100644 operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-svc.yaml diff --git a/operations/helm/charts/mimir-distributed/CHANGELOG.md b/operations/helm/charts/mimir-distributed/CHANGELOG.md index f315cf9205..9a49eefb81 100644 --- a/operations/helm/charts/mimir-distributed/CHANGELOG.md +++ b/operations/helm/charts/mimir-distributed/CHANGELOG.md @@ -29,6 +29,7 @@ Entries should include a reference to the Pull Request that introduced the chang ## main / unreleased +* [FEATURE] Add support for a dedicated query path for the ruler. This allows for the isolation of ruler and user query paths. Enable it via `ruler.remoteEvaluationDedicatedQueryPath: true`. #7964 * [CHANGE] Fine-tuned `terminationGracePeriodSeconds` for the following components: #7361 #7364 * Alertmanager: changed from `60` to `900` * Distributor: changed from `60` to `100` diff --git a/operations/helm/charts/mimir-distributed/ci/offline/test-ruler-dedicated-query-path-values.yaml b/operations/helm/charts/mimir-distributed/ci/offline/test-ruler-dedicated-query-path-values.yaml new file mode 100644 index 0000000000..b78761e6a4 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/ci/offline/test-ruler-dedicated-query-path-values.yaml @@ -0,0 +1,5 @@ +# Pin kube version so results are the same for running in CI and locally where the installed kube version may be different. +kubeVersionOverride: "1.20" + +ruler: + remoteEvaluationDedicatedQueryPath: true diff --git a/operations/helm/charts/mimir-distributed/templates/_helpers.tpl b/operations/helm/charts/mimir-distributed/templates/_helpers.tpl index ba0000e801..2864a57f6a 100644 --- a/operations/helm/charts/mimir-distributed/templates/_helpers.tpl +++ b/operations/helm/charts/mimir-distributed/templates/_helpers.tpl @@ -446,6 +446,9 @@ Examples: "query-scheduler" "query_scheduler" "results-cache" "results-cache" "ruler" "ruler" + "ruler-querier" "ruler_querier" + "ruler-query-frontend" "ruler_query_frontend" + "ruler-query-scheduler" "ruler_query_scheduler" "smoke-test" "smoke_test" "store-gateway" "store_gateway" "tokengen" "tokengenJob" diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-dep.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-dep.yaml new file mode 100644 index 0000000000..80bf58a001 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-dep.yaml @@ -0,0 +1,171 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-querier") }} + labels: + {{- include "mimir.labels" (dict "ctx" . "component" "ruler-querier" "memberlist" true) | nindent 4 }} + annotations: + {{- toYaml .Values.ruler_querier.annotations | nindent 4 }} + namespace: {{ .Release.Namespace | quote }} +spec: + {{- if or (not .Values.ruler_querier.kedaAutoscaling.enabled) (.Values.ruler_querier.kedaAutoscaling.preserveReplicas) }} + # If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it + {{- if or (or (kindIs "int64" .Values.ruler_querier.replicas) (kindIs "float64" .Values.ruler_querier.replicas)) (.Values.ruler_querier.replicas) }} + replicas: {{ .Values.ruler_querier.replicas }} + {{- end }} + {{- end }} + selector: + matchLabels: + {{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-querier" "memberlist" true) | nindent 6 }} + strategy: + {{- toYaml .Values.ruler_querier.strategy | nindent 4 }} + template: + metadata: + labels: + {{- include "mimir.podLabels" (dict "ctx" . "component" "ruler-querier" "memberlist" true) | nindent 8 }} + annotations: + {{- include "mimir.podAnnotations" (dict "ctx" . "component" "ruler-querier") | nindent 8 }} + spec: + serviceAccountName: {{ template "mimir.serviceAccountName" . }} + {{- if .Values.ruler_querier.priorityClassName }} + priorityClassName: {{ .Values.ruler_querier.priorityClassName }} + {{- end }} + securityContext: + {{- include "mimir.lib.podSecurityContext" (dict "ctx" . "component" "ruler-querier") | nindent 8 }} + {{- with .Values.ruler_querier.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end}} + {{- end }} + containers: + - name: ruler-querier + image: "{{ include "mimir.imageReference" . }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - "-target=querier" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-querier.scheduler-address={{ template "mimir.fullname" . }}-ruler-query-scheduler-headless.{{ .Release.Namespace }}.svc:{{ include "mimir.serverGrpcListenPort" . }}" + {{- if .Values.ingester.zoneAwareReplication.migration.enabled }} + {{- if not .Values.ingester.zoneAwareReplication.migration.readPath }} + - "-ingester.ring.zone-awareness-enabled=false" + {{- end }} + {{- end }} + {{- if .Values.store_gateway.zoneAwareReplication.migration.enabled }} + {{- if not .Values.store_gateway.zoneAwareReplication.migration.readPath }} + - "-store-gateway.sharding-ring.prefix=collectors/" + - "-store-gateway.sharding-ring.zone-awareness-enabled=false" + {{- end }} + {{- end }} + {{- range $key, $value := .Values.ruler_querier.extraArgs }} + - "-{{ $key }}={{ $value }}" + {{- end }} + volumeMounts: + {{- if .Values.ruler_querier.extraVolumeMounts }} + {{ toYaml .Values.ruler_querier.extraVolumeMounts | nindent 12}} + {{- end }} + {{- if .Values.global.extraVolumeMounts }} + {{ toYaml .Values.global.extraVolumeMounts | nindent 12}} + {{- end }} + - name: config + mountPath: /etc/mimir + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /license + {{- end }} + - name: runtime-config + mountPath: /var/{{ include "mimir.name" . }} + - name: storage + mountPath: "/data" + subPath: {{ .Values.ruler_querier.persistence.subPath }} + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: {{ include "mimir.serverHttpListenPort" . }} + protocol: TCP + - name: grpc + containerPort: {{ include "mimir.serverGrpcListenPort" . }} + protocol: TCP + - name: memberlist + containerPort: {{ include "mimir.memberlistBindPort" . }} + protocol: TCP + livenessProbe: + {{- toYaml .Values.ruler_querier.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.ruler_querier.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.ruler_querier.resources | nindent 12 }} + securityContext: + {{- toYaml .Values.ruler_querier.containerSecurityContext | nindent 12 }} + env: + {{- with .Values.global.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.ruler_querier.env }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- $cpu_request := dig "requests" "cpu" nil .Values.ruler_querier.resources }} + {{- if $cpu_request }} + {{- $cpu_request_doubled := include "mimir.parseCPU" (dict "value" $cpu_request) | float64 | mulf 2 | ceil }} + {{- $cpu_request_plus_four := include "mimir.parseCPU" (dict "value" $cpu_request) | float64 | addf 4 | ceil }} + - name: "GOMAXPROCS" + value: {{ max $cpu_request_doubled $cpu_request_plus_four | toString | toYaml }} + {{- end }} + {{- $jaeger_queue_size := dig "jaegerReporterMaxQueueSize" nil .Values.querier }} + {{- if $jaeger_queue_size }} + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: {{$jaeger_queue_size | toString | toYaml }} + {{- end }} + envFrom: + {{- with .Values.global.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.ruler_querier.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} +{{- if .Values.ruler_querier.extraContainers }} +{{ toYaml .Values.ruler_querier.extraContainers | indent 8}} +{{- end }} + {{- with .Values.ruler_querier.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.ruler_querier.affinity}} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- include "mimir.lib.topologySpreadConstraints" (dict "ctx" . "component" "ruler-querier") | nindent 6 }} + {{- with .Values.ruler_querier.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + terminationGracePeriodSeconds: {{ .Values.ruler_querier.terminationGracePeriodSeconds }} + volumes: + - name: config + {{- include "mimir.configVolume" . | nindent 10 }} + {{- if .Values.enterprise.enabled }} + - name: license + secret: + secretName: {{ tpl .Values.license.secretName . }} + {{- end }} + - name: runtime-config + configMap: + name: {{ template "mimir.fullname" . }}-runtime + {{- if .Values.ruler_querier.extraVolumes }} + {{ toYaml .Values.ruler_querier.extraVolumes | nindent 8}} + {{- end }} + {{- if .Values.global.extraVolumes }} + {{ toYaml .Values.global.extraVolumes | nindent 8}} + {{- end }} + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-pdb.yaml new file mode 100644 index 0000000000..2b4f70bed0 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-pdb.yaml @@ -0,0 +1,3 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +{{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "ruler-querier" "memberlist" true) }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-servmon.yaml new file mode 100644 index 0000000000..ba0c16655c --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-servmon.yaml @@ -0,0 +1,3 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +{{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "ruler-querier" "memberlist" true) }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-so.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-so.yaml new file mode 100644 index 0000000000..677dca4e12 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-so.yaml @@ -0,0 +1,46 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +{{- if .Values.ruler_querier.kedaAutoscaling.enabled }} +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-querier") }} + labels: + {{- include "mimir.labels" (dict "ctx" . "component" "ruler-querier") | nindent 4 }} + annotations: + {{- toYaml .Values.ruler_querier.annotations | nindent 4 }} + namespace: {{ .Release.Namespace | quote }} +spec: + advanced: + horizontalPodAutoscalerConfig: + {{- with .Values.ruler_querier.kedaAutoscaling.behavior }} + behavior: + {{- toYaml . | nindent 8 }} + {{- end }} + maxReplicaCount: {{ .Values.ruler_querier.kedaAutoscaling.maxReplicaCount }} + minReplicaCount: {{ .Values.ruler_querier.kedaAutoscaling.minReplicaCount }} + pollingInterval: {{ .Values.kedaAutoscaling.pollingInterval }} + scaleTargetRef: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-querier") }} + apiVersion: apps/v1 + kind: Deployment + triggers: + - metadata: + query: sum(max_over_time(cortex_query_scheduler_inflight_requests{container="ruler-query-scheduler",namespace="{{ .Release.Namespace }}",quantile="0.5"}[1m])) + serverAddress: {{ include "mimir.kedaPrometheusAddress" (dict "ctx" $) }} + threshold: {{ .Values.ruler_querier.kedaAutoscaling.querySchedulerInflightRequestsThreshold | quote }} + {{- if .Values.kedaAutoscaling.customHeaders }} + customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }} + {{- end }} + name: cortex_querier_hpa_default + type: prometheus + - metadata: + query: sum(rate(cortex_querier_request_duration_seconds_sum{container="ruler-querier",namespace="{{ .Release.Namespace }}"}[1m])) + serverAddress: {{ include "mimir.kedaPrometheusAddress" (dict "ctx" $) }} + threshold: {{ .Values.ruler_querier.kedaAutoscaling.querySchedulerInflightRequestsThreshold | quote }} + {{- if .Values.kedaAutoscaling.customHeaders }} + customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }} + {{- end }} + name: cortex_querier_hpa_default_requests_duration + type: prometheus +{{- end }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-svc.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-svc.yaml new file mode 100644 index 0000000000..a8203dca8a --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-querier/ruler-querier-svc.yaml @@ -0,0 +1,27 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-querier") }} + labels: + {{- include "mimir.labels" (dict "ctx" . "component" "ruler-querier" "memberlist" true) | nindent 4 }} + {{- with .Values.ruler_querier.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- toYaml .Values.ruler_querier.service.annotations | nindent 4 }} + namespace: {{ .Release.Namespace | quote }} +spec: + type: ClusterIP + ports: + - port: {{ include "mimir.serverHttpListenPort" .}} + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: {{ include "mimir.serverGrpcListenPort" . }} + protocol: TCP + name: grpc + targetPort: grpc + selector: + {{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-querier" "memberlist" true) | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-dep.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-dep.yaml new file mode 100644 index 0000000000..ecd496394c --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-dep.yaml @@ -0,0 +1,157 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-query-frontend") }} + labels: + {{- include "mimir.labels" (dict "ctx" . "component" "ruler-query-frontend") | nindent 4 }} + annotations: + {{- toYaml .Values.ruler_query_frontend.annotations | nindent 4 }} + namespace: {{ .Release.Namespace | quote }} +spec: + {{- if or (not .Values.ruler_query_frontend.kedaAutoscaling.enabled) (.Values.ruler_query_frontend.kedaAutoscaling.preserveReplicas) }} + # If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it + {{- if or (or (kindIs "int64" .Values.ruler_query_frontend.replicas) (kindIs "float64" .Values.ruler_query_frontend.replicas)) (.Values.ruler_query_frontend.replicas) }} + replicas: {{ .Values.ruler_query_frontend.replicas }} + {{- end }} + {{- end }} + selector: + matchLabels: + {{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-query-frontend") | nindent 6 }} + strategy: + {{- toYaml .Values.ruler_query_frontend.strategy | nindent 4 }} + template: + metadata: + labels: + {{- include "mimir.podLabels" (dict "ctx" . "component" "ruler-query-frontend") | nindent 8 }} + annotations: + {{- include "mimir.podAnnotations" (dict "ctx" . "component" "ruler-query-frontend") | nindent 8 }} + namespace: {{ .Release.Namespace | quote }} + spec: + serviceAccountName: {{ template "mimir.serviceAccountName" . }} + {{- if .Values.ruler_query_frontend.priorityClassName }} + priorityClassName: {{ .Values.ruler_query_frontend.priorityClassName }} + {{- end }} + securityContext: + {{- include "mimir.lib.podSecurityContext" (dict "ctx" . "component" "ruler-query-frontend") | nindent 8 }} + {{- with .Values.ruler_query_frontend.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end}} + {{- end }} + containers: + - name: ruler-query-frontend + image: "{{ include "mimir.imageReference" . }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - "-target=query-frontend" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-query-frontend.cache-results=false" + - "-query-frontend.scheduler-address={{ template "mimir.fullname" . }}-ruler-query-scheduler-headless.{{ .Release.Namespace }}.svc:{{ include "mimir.serverGrpcListenPort" . }}" + # Reduce the likelihood of queries hitting terminated query-frontends. + - "-server.grpc.keepalive.max-connection-age=30s" + - "-shutdown-delay=90s" + {{- range $key, $value := .Values.ruler_query_frontend.extraArgs }} + - "-{{ $key }}={{ $value }}" + {{- end }} + volumeMounts: + {{- if .Values.ruler_query_frontend.extraVolumeMounts }} + {{ toYaml .Values.ruler_query_frontend.extraVolumeMounts | nindent 12}} + {{- end }} + {{- if .Values.global.extraVolumeMounts }} + {{ toYaml .Values.global.extraVolumeMounts | nindent 12}} + {{- end }} + - name: runtime-config + mountPath: /var/{{ include "mimir.name" . }} + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /license + {{- end }} + - name: config + mountPath: /etc/mimir + - name: storage + mountPath: /data + {{- if .Values.ruler_query_frontend.persistence.subPath }} + subPath: {{ .Values.ruler_query_frontend.persistence.subPath }} + {{- end }} + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: {{ include "mimir.serverHttpListenPort" . }} + protocol: TCP + - name: grpc + containerPort: {{ include "mimir.serverGrpcListenPort" . }} + protocol: TCP + livenessProbe: + {{- toYaml .Values.ruler_query_frontend.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.ruler_query_frontend.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.ruler_query_frontend.resources | nindent 12 }} + securityContext: + {{- toYaml .Values.ruler_query_frontend.containerSecurityContext | nindent 12 }} + env: + {{- with .Values.global.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.ruler_query_frontend.env }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- $jaeger_queue_size := dig "jaegerReporterMaxQueueSize" nil .Values.query_frontend }} + {{- if $jaeger_queue_size }} + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: {{$jaeger_queue_size | toString | toYaml }} + {{- end }} + envFrom: + {{- with .Values.global.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.ruler_query_frontend.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} +{{- if .Values.ruler_query_frontend.extraContainers }} +{{ toYaml .Values.ruler_query_frontend.extraContainers | indent 8}} +{{- end }} + {{- with .Values.ruler_query_frontend.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.ruler_query_frontend.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- include "mimir.lib.topologySpreadConstraints" (dict "ctx" . "component" "ruler-query-frontend") | nindent 6 }} + {{- with .Values.ruler_query_frontend.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + terminationGracePeriodSeconds: {{ .Values.ruler_query_frontend.terminationGracePeriodSeconds }} + volumes: + - name: config + {{- include "mimir.configVolume" . | nindent 10 }} + {{- if .Values.enterprise.enabled }} + - name: license + secret: + secretName: {{ tpl .Values.license.secretName . }} + {{- end }} + - name: runtime-config + configMap: + name: {{ template "mimir.fullname" . }}-runtime + {{- if .Values.ruler_query_frontend.extraVolumes }} + {{ toYaml .Values.ruler_query_frontend.extraVolumes | nindent 8}} + {{- end }} + {{- if .Values.global.extraVolumes }} + {{ toYaml .Values.global.extraVolumes | nindent 8}} + {{- end }} + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-pdb.yaml new file mode 100644 index 0000000000..918b2840cf --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-pdb.yaml @@ -0,0 +1,3 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +{{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "ruler-query-frontend") }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-servmon.yaml new file mode 100644 index 0000000000..af51b0872d --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-servmon.yaml @@ -0,0 +1,3 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +{{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "ruler-query-frontend") }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-so.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-so.yaml new file mode 100644 index 0000000000..b16e87b10b --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-so.yaml @@ -0,0 +1,46 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +{{- if .Values.ruler_query_frontend.kedaAutoscaling.enabled }} +apiVersion: keda.sh/v1alpha1 +kind: ScaledObject +metadata: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-query-frontend") }} + labels: + {{- include "mimir.labels" (dict "ctx" . "component" "ruler-query-frontend") | nindent 4 }} + annotations: + {{- toYaml .Values.ruler_query_frontend.annotations | nindent 4 }} + namespace: {{ .Release.Namespace | quote }} +spec: + advanced: + horizontalPodAutoscalerConfig: + {{- with .Values.ruler_query_frontend.kedaAutoscaling.behavior }} + behavior: + {{- toYaml . | nindent 8 }} + {{- end }} + maxReplicaCount: {{ .Values.ruler_query_frontend.kedaAutoscaling.maxReplicaCount }} + minReplicaCount: {{ .Values.ruler_query_frontend.kedaAutoscaling.minReplicaCount }} + pollingInterval: {{ .Values.kedaAutoscaling.pollingInterval }} + scaleTargetRef: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-query-frontend") }} + apiVersion: apps/v1 + kind: Deployment + triggers: + - metadata: + query: max_over_time(sum(sum by (pod) (rate(container_cpu_usage_seconds_total{container="ruler-query-frontend",namespace="{{ .Release.Namespace }}"}[5m])) and max by (pod) (up{container="ruler-query-frontend",namespace="{{ .Release.Namespace }}"}) > 0)[15m:]) * 1000 + serverAddress: {{ include "mimir.kedaPrometheusAddress" (dict "ctx" $) }} + {{- $cpu_request := dig "requests" "cpu" nil .Values.ruler_query_frontend.resources }} + threshold: {{ mulf (include "mimir.cpuToMilliCPU" (dict "value" $cpu_request)) (divf .Values.ruler_query_frontend.kedaAutoscaling.targetCPUUtilizationPercentage 100) | floor | int64 | quote }} + {{- if .Values.kedaAutoscaling.customHeaders }} + customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }} + {{- end }} + type: prometheus + - metadata: + query: max_over_time(sum((sum by (pod) (container_memory_working_set_bytes{container="ruler-query-frontend",namespace="{{ .Release.Namespace }}"}) and max by (pod) (up{container="ruler-query-frontend",namespace="{{ .Release.Namespace }}"}) > 0) or vector(0))[15m:]) + sum(sum by (pod) (max_over_time(kube_pod_container_resource_requests{container=ruler-"query-frontend",namespace="{{ .Release.Namespace }}", resource="memory"}[15m])) and max by (pod) (changes(kube_pod_container_status_restarts_total{container="ruler-query-frontend",namespace="{{ .Release.Namespace }}"}[15m]) > 0) and max by (pod) (kube_pod_container_status_last_terminated_reason{container="ruler-query-frontend",namespace="{{ .Release.Namespace }}", reason="OOMKilled"}) or vector(0)) + serverAddress: {{ include "mimir.kedaPrometheusAddress" (dict "ctx" $) }} + {{- $mem_request := dig "requests" "memory" nil .Values.ruler_query_frontend.resources }} + threshold: {{ mulf (include "mimir.siToBytes" (dict "value" $mem_request)) (divf .Values.ruler_query_frontend.kedaAutoscaling.targetMemoryUtilizationPercentage 100) | floor | int64 | quote }} + {{- if .Values.kedaAutoscaling.customHeaders }} + customHeaders: {{ (include "mimir.lib.mapToCSVString" (dict "map" .Values.kedaAutoscaling.customHeaders)) | quote }} + {{- end }} + type: prometheus +{{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-svc.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-svc.yaml new file mode 100644 index 0000000000..65600a46ef --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-svc.yaml @@ -0,0 +1,27 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-query-frontend") }} + labels: + {{- include "mimir.labels" (dict "ctx" . "component" "ruler-query-frontend") | nindent 4 }} + {{- with .Values.ruler_query_frontend.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- toYaml .Values.ruler_query_frontend.service.annotations | nindent 4 }} + namespace: {{ .Release.Namespace | quote }} +spec: + type: ClusterIP + ports: + - port: {{ include "mimir.serverHttpListenPort" .}} + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: {{ include "mimir.serverGrpcListenPort" . }} + protocol: TCP + name: grpc + targetPort: grpc + selector: + {{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-query-frontend") | nindent 4 }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-dep.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-dep.yaml new file mode 100644 index 0000000000..5f3c308da6 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-dep.yaml @@ -0,0 +1,146 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-query-scheduler") }} + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "mimir.labels" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 4 }} + annotations: + {{- toYaml .Values.ruler_query_scheduler.annotations | nindent 4 }} +spec: + replicas: {{ .Values.ruler_query_scheduler.replicas }} + selector: + matchLabels: + {{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 6 }} + strategy: + {{- toYaml .Values.ruler_query_scheduler.strategy | nindent 4 }} + template: + metadata: + labels: + {{- include "mimir.podLabels" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 8 }} + annotations: + {{- include "mimir.podAnnotations" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 8 }} + spec: + serviceAccountName: {{ template "mimir.serviceAccountName" . }} + {{- if .Values.ruler_query_scheduler.priorityClassName }} + priorityClassName: {{ .Values.ruler_query_scheduler.priorityClassName }} + {{- end }} + securityContext: + {{- include "mimir.lib.podSecurityContext" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 8 }} + {{- with .Values.ruler_query_scheduler.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end}} + {{- end }} + containers: + - name: ruler-query-scheduler + image: "{{ include "mimir.imageReference" . }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - "-target=query-scheduler" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + {{- range $key, $value := .Values.ruler_query_scheduler.extraArgs }} + - "-{{ $key }}={{ $value }}" + {{- end }} + volumeMounts: + {{- if .Values.ruler_query_scheduler.extraVolumeMounts }} + {{ toYaml .Values.ruler_query_scheduler.extraVolumeMounts | nindent 12}} + {{- end }} + {{- if .Values.global.extraVolumeMounts }} + {{ toYaml .Values.global.extraVolumeMounts | nindent 12}} + {{- end }} + - name: runtime-config + mountPath: /var/{{ include "mimir.name" . }} + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /license + {{- end }} + - name: config + mountPath: /etc/mimir + - name: storage + mountPath: /data + {{- if .Values.ruler_query_scheduler.persistence.subPath }} + subPath: {{ .Values.ruler_query_scheduler.persistence.subPath }} + {{- end }} + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: {{ include "mimir.serverHttpListenPort" . }} + protocol: TCP + - name: grpc + containerPort: {{ include "mimir.serverGrpcListenPort" . }} + protocol: TCP + livenessProbe: + {{- toYaml .Values.ruler_query_scheduler.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.ruler_query_scheduler.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.ruler_query_scheduler.resources | nindent 12 }} + securityContext: + {{- toYaml .Values.ruler_query_scheduler.containerSecurityContext | nindent 12 }} + env: + {{- with .Values.global.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.ruler_query_scheduler.env }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- $jaeger_queue_size := dig "jaegerReporterMaxQueueSize" nil .Values.query_scheduler }} + {{- if $jaeger_queue_size }} + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: {{$jaeger_queue_size | toString | toYaml }} + {{- end }} + envFrom: + {{- with .Values.global.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.ruler_query_scheduler.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} +{{- if .Values.ruler_query_scheduler.extraContainers }} +{{ toYaml .Values.ruler_query_scheduler.extraContainers | indent 8}} +{{- end }} + {{- with .Values.ruler_query_scheduler.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.ruler_query_scheduler.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- include "mimir.lib.topologySpreadConstraints" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 6 }} + {{- with .Values.ruler_query_scheduler.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + terminationGracePeriodSeconds: {{ .Values.ruler_query_scheduler.terminationGracePeriodSeconds }} + volumes: + - name: config + {{- include "mimir.configVolume" . | nindent 10 }} + {{- if .Values.enterprise.enabled }} + - name: license + secret: + secretName: {{ tpl .Values.license.secretName . }} + {{- end }} + - name: runtime-config + configMap: + name: {{ template "mimir.fullname" . }}-runtime + {{- if .Values.ruler_query_scheduler.extraVolumes }} + {{ toYaml .Values.ruler_query_scheduler.extraVolumes | nindent 8}} + {{- end }} + {{- if .Values.global.extraVolumes }} + {{ toYaml .Values.global.extraVolumes | nindent 8}} + {{- end }} + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-pdb.yaml new file mode 100644 index 0000000000..bd604ccae9 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-pdb.yaml @@ -0,0 +1,3 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +{{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "ruler-query-scheduler") }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-servmon.yaml new file mode 100644 index 0000000000..49a4a50eab --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-servmon.yaml @@ -0,0 +1,3 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +{{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "ruler-query-scheduler") }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc-headless.yaml new file mode 100644 index 0000000000..073adbfd12 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc-headless.yaml @@ -0,0 +1,30 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-query-scheduler") }}-headless + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "mimir.labels" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 4 }} + prometheus.io/service-monitor: "false" + {{- with .Values.ruler_query_scheduler.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- toYaml .Values.ruler_query_scheduler.service.annotations | nindent 4 }} +spec: + type: ClusterIP + clusterIP: None + publishNotReadyAddresses: true + ports: + - port: {{ include "mimir.serverHttpListenPort" .}} + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: {{ include "mimir.serverGrpcListenPort" . }} + protocol: TCP + name: grpc + targetPort: grpc + selector: + {{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 4 }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc.yaml b/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc.yaml new file mode 100644 index 0000000000..429f2f07b7 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc.yaml @@ -0,0 +1,27 @@ +{{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "ruler-query-scheduler") }} + namespace: {{ .Release.Namespace | quote }} + labels: + {{- include "mimir.labels" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 4 }} + {{- with .Values.ruler_query_scheduler.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- toYaml .Values.ruler_query_scheduler.service.annotations | nindent 4 }} +spec: + type: ClusterIP + ports: + - port: {{ include "mimir.serverHttpListenPort" .}} + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: {{ include "mimir.serverGrpcListenPort" . }} + protocol: TCP + name: grpc + targetPort: grpc + selector: + {{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler-query-scheduler") | nindent 4 }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/values.yaml b/operations/helm/charts/mimir-distributed/values.yaml index 2bc006e74b..b837cc589a 100644 --- a/operations/helm/charts/mimir-distributed/values.yaml +++ b/operations/helm/charts/mimir-distributed/values.yaml @@ -358,6 +358,10 @@ mimir: alertmanager_url: dnssrvnoa+http://_http-metrics._tcp.{{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}/alertmanager enable_api: true rule_path: /data + {{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} + query_frontend: + address: dns:///{{ template "mimir.fullname" . }}-ruler-query-frontend.{{ .Release.Namespace }}.svc:{{ include "mimir.serverGrpcListenPort" . }} + {{- end }} {{- if or (.Values.minio.enabled) (index .Values "metadata-cache" "enabled") }} ruler_storage: @@ -1280,6 +1284,301 @@ ruler: # Set to 'null' to use the Jaeger client's default value jaegerReporterMaxQueueSize: 1000 + # -- If set to true, a dedicated query path will be deployed for the ruler and operational mode will be set to use remote evaluation. https://grafana.com/docs/mimir/latest/references/architecture/components/ruler/#remote + # -- This is useful for isolating the ruler queries from other queriers (api/grafana). + remoteEvaluationDedicatedQueryPath: false + +# -- Only deployed if .Values.ruler.remoteEvaluationDedicatedQueryPath +ruler_querier: + replicas: 2 + + # -- [Experimental] Configure autoscaling via KEDA (https://keda.sh). This requires having + # KEDA already installed in the Kubernetes cluster. The metrics for scaling are read + # according to top-level kedaAutoscaling.prometheusAddress (defaulting to metamonitoring remote-write destination). + # Basic auth and extra HTTP headers from metaMonitoring are ignored, please use customHeaders. + # The remote URL is used even if metamonitoring is disabled. + # See https://github.com/grafana/mimir/issues/7367 for more details on how to migrate to autoscaled resources without disruptions. + kedaAutoscaling: + enabled: false + # -- preserveReplicas gives you the option to migrate from non-autoscaled to autoscaled deployments without losing replicas. When set to true, the replica fields in the component will be left intact. + # For futher details see [helm: autoscaling migration procedure](https://github.com/grafana/mimir/issues/7367) + preserveReplicas: false + minReplicaCount: 1 + maxReplicaCount: 10 + querySchedulerInflightRequestsThreshold: 12 + behavior: + scaleDown: + policies: + - periodSeconds: 120 + type: Percent + value: 10 + stabilizationWindowSeconds: 600 + scaleUp: + policies: + - periodSeconds: 120 + type: Percent + value: 50 + - periodSeconds: 120 + type: Pods + value: 15 + stabilizationWindowSeconds: 60 + + service: + annotations: {} + labels: {} + + resources: + requests: + cpu: 100m + memory: 128Mi + + # Additional ruler-querier container arguments, e.g. log level (debug, info, warn, error) + extraArgs: {} + + # Pod Labels + podLabels: {} + + # Pod Annotations + podAnnotations: {} + + # Pod Disruption Budget + podDisruptionBudget: + maxUnavailable: 1 + + # -- The name of the PriorityClass for ruler-querier pods + priorityClassName: null + + nodeSelector: {} + affinity: {} + + # -- topologySpreadConstraints allows to customize the default topologySpreadConstraints. This can be either a single dict as shown below or a slice of topologySpreadConstraints. + # labelSelector is taken from the constraint itself (if it exists) or is generated by the chart using the same selectors as for services. + topologySpreadConstraints: + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + + annotations: {} + persistence: + subPath: + + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + + # -- SecurityContext override for ruler-querier pods + securityContext: {} + + # -- The SecurityContext for ruler-querier containers + containerSecurityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: + drop: [ALL] + + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + maxSurge: 15% + + terminationGracePeriodSeconds: 180 + + tolerations: [] + initContainers: [] + extraContainers: [] + extraVolumes: [] + extraVolumeMounts: [] + env: [] + extraEnvFrom: [] + + # -- Jaeger reporter queue size + # Set to 'null' to use the Jaeger client's default value + jaegerReporterMaxQueueSize: 5000 + +# -- Only deployed if .Values.ruler.remoteEvaluationDedicatedQueryPath +ruler_query_frontend: + # Setting it to null will produce a deployment without replicas set, allowing you to use autoscaling with the deployment + replicas: 1 + + # -- [Experimental] Configure autoscaling via KEDA (https://keda.sh). This requires having + # KEDA already installed in the Kubernetes cluster. The metrics for scaling are read + # according to top-level kedaAutoscaling.prometheusAddress (defaulting to metamonitoring remote-write destination). + # Basic auth and extra HTTP headers from metaMonitoring are ignored, please use customHeaders. + # The remote URL is used even if metamonitoring is disabled. + # See https://github.com/grafana/mimir/issues/7367 for more details on how to migrate to autoscaled resources without disruptions. + kedaAutoscaling: + enabled: false + # -- preserveReplicas gives you the option to migrate from non-autoscaled to autoscaled deployments without losing replicas. When set to true, the replica fields in the component will be left intact. + # For futher details see [helm: autoscaling migration procedure](https://github.com/grafana/mimir/issues/7367) + preserveReplicas: false + minReplicaCount: 1 + maxReplicaCount: 10 + targetCPUUtilizationPercentage: 75 + targetMemoryUtilizationPercentage: 100 + behavior: + scaleDown: + policies: + - periodSeconds: 60 + type: Percent + value: 10 + + service: + annotations: {} + labels: {} + + resources: + requests: + cpu: 100m + memory: 128Mi + + # Additional ruler-query-frontend container arguments, e.g. log level (debug, info, warn, error) + extraArgs: {} + + # Pod Labels + podLabels: {} + + # Pod Annotations + podAnnotations: {} + + # Pod Disruption Budget + podDisruptionBudget: + maxUnavailable: 1 + + # -- The name of the PriorityClass for ruler-query-frontend pods + priorityClassName: null + + nodeSelector: {} + affinity: {} + + # -- topologySpreadConstraints allows to customize the default topologySpreadConstraints. This can be either a single dict as shown below or a slice of topologySpreadConstraints. + # labelSelector is taken from the constraint itself (if it exists) or is generated by the chart using the same selectors as for services. + topologySpreadConstraints: + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + + annotations: {} + persistence: + subPath: + + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + + # -- SecurityContext override for query-fronted pods + securityContext: {} + + # -- The SecurityContext for ruler-query-frontend containers + containerSecurityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: + drop: [ALL] + + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + maxSurge: 15% + + terminationGracePeriodSeconds: 390 + + tolerations: [] + initContainers: [] + extraContainers: [] + extraVolumes: [] + extraVolumeMounts: [] + env: [] + extraEnvFrom: [] + + # -- Jaeger reporter queue size + # Set to 'null' to use the Jaeger client's default value + jaegerReporterMaxQueueSize: 5000 + +# -- Only deployed if .Values.ruler.remoteEvaluationDedicatedQueryPath +ruler_query_scheduler: + replicas: 2 + + service: + annotations: {} + labels: {} + + resources: + requests: + cpu: 100m + memory: 128Mi + + # Additional ruler-query-scheduler container arguments, e.g. log level (debug, info, warn, error) + extraArgs: {} + + # Pod Labels + podLabels: {} + + # Pod Annotations + podAnnotations: {} + + # Pod Disruption Budget + podDisruptionBudget: + maxUnavailable: 1 + + # -- The name of the PriorityClass for ruler-query-scheduler pods + priorityClassName: null + + nodeSelector: {} + affinity: {} + + # -- topologySpreadConstraints allows to customize the default topologySpreadConstraints. This can be either a single dict as shown below or a slice of topologySpreadConstraints. + # labelSelector is taken from the constraint itself (if it exists) or is generated by the chart using the same selectors as for services. + topologySpreadConstraints: + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + + annotations: {} + persistence: + subPath: + + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + + # -- SecurityContext override for ruler-query-scheduler pods + securityContext: {} + + # -- The SecurityContext for ruler-query-scheduler containers + containerSecurityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: + drop: [ALL] + + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + maxSurge: 1 + + terminationGracePeriodSeconds: 180 + + tolerations: [] + initContainers: [] + extraContainers: [] + extraVolumes: [] + extraVolumeMounts: [] + env: [] + extraEnvFrom: [] + + # -- Jaeger reporter queue size + # Set to 'null' to use the Jaeger client's default value + jaegerReporterMaxQueueSize: null + querier: replicas: 2 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml new file mode 100644 index 0000000000..1bcd7a4ad5 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/configmap.yaml @@ -0,0 +1,406 @@ +--- +# Source: mimir-distributed/charts/minio/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: test-ruler-dedicated-query-path-values-minio + labels: + app: minio + chart: minio-5.0.14 + release: test-ruler-dedicated-query-path-values + heritage: Helm +data: + initialize: |- + #!/bin/sh + set -e ; # Have script exit in the event of a failed command. + MC_CONFIG_DIR="/tmp/minio/mc/" + MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" + + # connectToMinio + # Use a check-sleep-check loop to wait for MinIO service to be available + connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 1 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 + } + + # checkBucketExists ($bucket) + # Check if the bucket exists, by using the exit code of `mc ls` + checkBucketExists() { + BUCKET=$1 + CMD=$(${MC} stat myminio/$BUCKET > /dev/null 2>&1) + return $? + } + + # createBucket ($bucket, $policy, $purge) + # Ensure bucket exists, purging if asked to + createBucket() { + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + OBJECTLOCKING=$5 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET ; then + echo "Purging bucket '$BUCKET'." + set +e ; # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e ; # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist and set objectlocking if enabled (NOTE: versioning will be not changed if OBJECTLOCKING is set because it enables versioning to the Buckets created) + if ! checkBucketExists $BUCKET ; then + if [ ! -z $OBJECTLOCKING ] ; then + if [ $OBJECTLOCKING = true ] ; then + echo "Creating bucket with OBJECTLOCKING '$BUCKET'" + ${MC} mb --with-lock myminio/$BUCKET + elif [ $OBJECTLOCKING = false ] ; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + fi + elif [ -z $OBJECTLOCKING ] ; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + fi + + + # set versioning for bucket if objectlocking is disabled or not set + if [ $OBJECTLOCKING = false ] ; then + if [ ! -z $VERSIONING ] ; then + if [ $VERSIONING = true ] ; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ] ; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} anonymous set $POLICY myminio/$BUCKET + } + + # Try connecting to MinIO instance + scheme=http + connectToMinio $scheme + + + + # Create the buckets + createBucket mimir-tsdb "none" false false false + createBucket mimir-ruler "none" false false false + createBucket enterprise-metrics-tsdb "none" false false false + createBucket enterprise-metrics-admin "none" false false false + createBucket enterprise-metrics-ruler "none" false false false + + add-user: |- + #!/bin/sh + set -e ; # Have script exit in the event of a failed command. + MC_CONFIG_DIR="/tmp/minio/mc/" + MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" + + # AccessKey and secretkey credentials file are added to prevent shell execution errors caused by special characters. + # Special characters for example : ',",<,>,{,} + MINIO_ACCESSKEY_SECRETKEY_TMP="/tmp/accessKey_and_secretKey_tmp" + + # connectToMinio + # Use a check-sleep-check loop to wait for MinIO service to be available + connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 1 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 + } + + # checkUserExists () + # Check if the user exists, by using the exit code of `mc admin user info` + checkUserExists() { + CMD=$(${MC} admin user info myminio $(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) > /dev/null 2>&1) + return $? + } + + # createUser ($policy) + createUser() { + POLICY=$1 + #check accessKey_and_secretKey_tmp file + if [[ ! -f $MINIO_ACCESSKEY_SECRETKEY_TMP ]];then + echo "credentials file does not exist" + return 1 + fi + if [[ $(cat $MINIO_ACCESSKEY_SECRETKEY_TMP|wc -l) -ne 2 ]];then + echo "credentials file is invalid" + rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP + return 1 + fi + USER=$(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) + # Create the user if it does not exist + if ! checkUserExists ; then + echo "Creating user '$USER'" + cat $MINIO_ACCESSKEY_SECRETKEY_TMP | ${MC} admin user add myminio + else + echo "User '$USER' already exists." + fi + #clean up credentials files. + rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP + + # set policy for user + if [ ! -z $POLICY -a $POLICY != " " ] ; then + echo "Adding policy '$POLICY' for '$USER'" + set +e ; # policy already attach errors out, allow it. + ${MC} admin policy attach myminio $POLICY --user=$USER + set -e + else + echo "User '$USER' has no policy attached." + fi + } + + # Try connecting to MinIO instance + scheme=http + connectToMinio $scheme + + + + # Create the users + echo console > $MINIO_ACCESSKEY_SECRETKEY_TMP + echo console123 >> $MINIO_ACCESSKEY_SECRETKEY_TMP + createUser consoleAdmin + + add-policy: |- + #!/bin/sh + set -e ; # Have script exit in the event of a failed command. + MC_CONFIG_DIR="/tmp/minio/mc/" + MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" + + # connectToMinio + # Use a check-sleep-check loop to wait for MinIO service to be available + connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 1 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 + } + + # checkPolicyExists ($policy) + # Check if the policy exists, by using the exit code of `mc admin policy info` + checkPolicyExists() { + POLICY=$1 + CMD=$(${MC} admin policy info myminio $POLICY > /dev/null 2>&1) + return $? + } + + # createPolicy($name, $filename) + createPolicy () { + NAME=$1 + FILENAME=$2 + + # Create the name if it does not exist + echo "Checking policy: $NAME (in /config/$FILENAME.json)" + if ! checkPolicyExists $NAME ; then + echo "Creating policy '$NAME'" + else + echo "Policy '$NAME' already exists." + fi + ${MC} admin policy create myminio $NAME /config/$FILENAME.json + + } + + # Try connecting to MinIO instance + scheme=http + connectToMinio $scheme + + + + add-svcacct: |- + #!/bin/sh + set -e ; # Have script exit in the event of a failed command. + MC_CONFIG_DIR="/tmp/minio/mc/" + MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" + + # AccessKey and secretkey credentials file are added to prevent shell execution errors caused by special characters. + # Special characters for example : ',",<,>,{,} + MINIO_ACCESSKEY_SECRETKEY_TMP="/tmp/accessKey_and_secretKey_svcacct_tmp" + + # connectToMinio + # Use a check-sleep-check loop to wait for MinIO service to be available + connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 2 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 + } + + # checkSvcacctExists () + # Check if the svcacct exists, by using the exit code of `mc admin user svcacct info` + checkSvcacctExists() { + CMD=$(${MC} admin user svcacct info myminio $(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) > /dev/null 2>&1) + return $? + } + + # createSvcacct ($user) + createSvcacct () { + USER=$1 + FILENAME=$2 + #check accessKey_and_secretKey_tmp file + if [[ ! -f $MINIO_ACCESSKEY_SECRETKEY_TMP ]];then + echo "credentials file does not exist" + return 1 + fi + if [[ $(cat $MINIO_ACCESSKEY_SECRETKEY_TMP|wc -l) -ne 2 ]];then + echo "credentials file is invalid" + rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP + return 1 + fi + SVCACCT=$(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) + # Create the svcacct if it does not exist + if ! checkSvcacctExists ; then + echo "Creating svcacct '$SVCACCT'" + # Check if policy file is define + if [ -z $FILENAME ]; then + ${MC} admin user svcacct add --access-key $(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) --secret-key $(tail -n1 $MINIO_ACCESSKEY_SECRETKEY_TMP) myminio $USER + else + ${MC} admin user svcacct add --access-key $(head -1 $MINIO_ACCESSKEY_SECRETKEY_TMP) --secret-key $(tail -n1 $MINIO_ACCESSKEY_SECRETKEY_TMP) --policy /config/$FILENAME.json myminio $USER + fi + else + echo "Svcacct '$SVCACCT' already exists." + fi + #clean up credentials files. + rm -f $MINIO_ACCESSKEY_SECRETKEY_TMP + } + + # Try connecting to MinIO instance + scheme=http + connectToMinio $scheme + + + + custom-command: |- + #!/bin/sh + set -e ; # Have script exit in the event of a failed command. + MC_CONFIG_DIR="/tmp/minio/mc/" + MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" + + # connectToMinio + # Use a check-sleep-check loop to wait for MinIO service to be available + connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 1 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 + } + + # runCommand ($@) + # Run custom mc command + runCommand() { + ${MC} "$@" + return $? + } + + # Try connecting to MinIO instance + scheme=http + connectToMinio $scheme diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml new file mode 100644 index 0000000000..33ffd212d1 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/console-service.yaml @@ -0,0 +1,21 @@ +--- +# Source: mimir-distributed/charts/minio/templates/console-service.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-minio-console + labels: + app: minio + chart: minio-5.0.14 + release: test-ruler-dedicated-query-path-values + heritage: Helm +spec: + type: ClusterIP + ports: + - name: http + port: 9001 + protocol: TCP + targetPort: 9001 + selector: + app: minio + release: test-ruler-dedicated-query-path-values diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml new file mode 100644 index 0000000000..d52ba80ad6 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/deployment.yaml @@ -0,0 +1,82 @@ +--- +# Source: mimir-distributed/charts/minio/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-minio + labels: + app: minio + chart: minio-5.0.14 + release: test-ruler-dedicated-query-path-values + heritage: Helm +spec: + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 100% + maxUnavailable: 0 + replicas: 1 + selector: + matchLabels: + app: minio + release: test-ruler-dedicated-query-path-values + template: + metadata: + name: test-ruler-dedicated-query-path-values-minio + labels: + app: minio + release: test-ruler-dedicated-query-path-values + annotations: + checksum/secrets: c864730acd976c50ca058e41231e573051d6bf86d2b2b33dc6cb700c7a486b86 + checksum/config: ff6673ed46bcc10cd2f7415590914b57bca3e18fb10f654a021efd4ca72b864e + spec: + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + fsGroup: 1000 + fsGroupChangePolicy: OnRootMismatch + + serviceAccountName: minio-sa + containers: + - name: minio + image: "quay.io/minio/minio:RELEASE.2023-09-30T07-02-29Z" + imagePullPolicy: IfNotPresent + command: + - "/bin/sh" + - "-ce" + - "/usr/bin/docker-entrypoint.sh minio server /export -S /etc/minio/certs/ --address :9000 --console-address :9001" + volumeMounts: + - name: minio-user + mountPath: "/tmp/credentials" + readOnly: true + - name: export + mountPath: /export + ports: + - name: http + containerPort: 9000 + - name: http-console + containerPort: 9001 + env: + - name: MINIO_ROOT_USER + valueFrom: + secretKeyRef: + name: test-ruler-dedicated-query-path-values-minio + key: rootUser + - name: MINIO_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: test-ruler-dedicated-query-path-values-minio + key: rootPassword + - name: MINIO_PROMETHEUS_AUTH_TYPE + value: "public" + resources: + requests: + cpu: 100m + memory: 128Mi + volumes: + - name: export + persistentVolumeClaim: + claimName: test-ruler-dedicated-query-path-values-minio + - name: minio-user + secret: + secretName: test-ruler-dedicated-query-path-values-minio diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml new file mode 100644 index 0000000000..d2ef1d5cd0 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/post-job.yaml @@ -0,0 +1,74 @@ +--- +# Source: mimir-distributed/charts/minio/templates/post-job.yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: test-ruler-dedicated-query-path-values-minio-post-job + labels: + app: minio-post-job + chart: minio-5.0.14 + release: test-ruler-dedicated-query-path-values + heritage: Helm + annotations: + "helm.sh/hook": post-install,post-upgrade + "helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation +spec: + template: + metadata: + labels: + app: minio-job + release: test-ruler-dedicated-query-path-values + spec: + restartPolicy: OnFailure + volumes: + - name: etc-path + emptyDir: {} + - name: tmp + emptyDir: {} + - name: minio-configuration + projected: + sources: + - configMap: + name: test-ruler-dedicated-query-path-values-minio + - secret: + name: test-ruler-dedicated-query-path-values-minio + serviceAccountName: minio-sa + containers: + - name: minio-make-bucket + image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + imagePullPolicy: IfNotPresent + command: [ "/bin/sh", "/config/initialize" ] + env: + - name: MINIO_ENDPOINT + value: test-ruler-dedicated-query-path-values-minio + - name: MINIO_PORT + value: "9000" + volumeMounts: + - name: etc-path + mountPath: /etc/minio/mc + - name: tmp + mountPath: /tmp + - name: minio-configuration + mountPath: /config + resources: + requests: + memory: 128Mi + - name: minio-make-user + image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + imagePullPolicy: IfNotPresent + command: [ "/bin/sh", "/config/add-user" ] + env: + - name: MINIO_ENDPOINT + value: test-ruler-dedicated-query-path-values-minio + - name: MINIO_PORT + value: "9000" + volumeMounts: + - name: etc-path + mountPath: /etc/minio/mc + - name: tmp + mountPath: /tmp + - name: minio-configuration + mountPath: /config + resources: + requests: + memory: 128Mi diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml new file mode 100644 index 0000000000..78320191f7 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/pvc.yaml @@ -0,0 +1,17 @@ +--- +# Source: mimir-distributed/charts/minio/templates/pvc.yaml +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: test-ruler-dedicated-query-path-values-minio + labels: + app: minio + chart: minio-5.0.14 + release: test-ruler-dedicated-query-path-values + heritage: Helm +spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: "5Gi" diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml new file mode 100644 index 0000000000..a4f1ae3767 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/secrets.yaml @@ -0,0 +1,15 @@ +--- +# Source: mimir-distributed/charts/minio/templates/secrets.yaml +apiVersion: v1 +kind: Secret +metadata: + name: test-ruler-dedicated-query-path-values-minio + labels: + app: minio + chart: minio-5.0.14 + release: test-ruler-dedicated-query-path-values + heritage: Helm +type: Opaque +data: + rootUser: "Z3JhZmFuYS1taW1pcg==" + rootPassword: "c3VwZXJzZWNyZXQ=" diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/service.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/service.yaml new file mode 100644 index 0000000000..9e8fd406e7 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/service.yaml @@ -0,0 +1,22 @@ +--- +# Source: mimir-distributed/charts/minio/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-minio + labels: + app: minio + chart: minio-5.0.14 + release: test-ruler-dedicated-query-path-values + heritage: Helm + monitoring: "true" +spec: + type: ClusterIP + ports: + - name: http + port: 9000 + protocol: TCP + targetPort: 9000 + selector: + app: minio + release: test-ruler-dedicated-query-path-values diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/serviceaccount.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/serviceaccount.yaml new file mode 100644 index 0000000000..575ff3a4f6 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/minio/templates/serviceaccount.yaml @@ -0,0 +1,6 @@ +--- +# Source: mimir-distributed/charts/minio/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: "minio-sa" diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/deployment.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/deployment.yaml new file mode 100644 index 0000000000..2b324b2805 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/deployment.yaml @@ -0,0 +1,65 @@ +--- +# Source: mimir-distributed/charts/rollout_operator/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-rollout-operator + labels: + helm.sh/chart: rollout-operator-0.15.0 + app.kubernetes.io/name: rollout-operator + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/version: "v0.14.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + minReadySeconds: 10 + selector: + matchLabels: + app.kubernetes.io/name: rollout-operator + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + strategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + template: + metadata: + labels: + app.kubernetes.io/name: rollout-operator + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-rollout-operator + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + containers: + - name: rollout-operator + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + image: "grafana/rollout-operator:v0.14.0" + imagePullPolicy: IfNotPresent + args: + - -kubernetes.namespace=citestns + ports: + - name: http-metrics + containerPort: 8001 + protocol: TCP + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 5 + timeoutSeconds: 1 + resources: + limits: + memory: 200Mi + requests: + cpu: 100m + memory: 100Mi diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/role.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/role.yaml new file mode 100644 index 0000000000..1581a9a9cc --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/role.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/charts/rollout_operator/templates/role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: test-ruler-dedicated-query-path-values-rollout-operator +rules: +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - get + - watch + - delete +- apiGroups: + - apps + resources: + - statefulsets + verbs: + - list + - get + - watch +- apiGroups: + - apps + resources: + - statefulsets/status + verbs: + - update diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/rolebinding.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/rolebinding.yaml new file mode 100644 index 0000000000..78892775da --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/rolebinding.yaml @@ -0,0 +1,13 @@ +--- +# Source: mimir-distributed/charts/rollout_operator/templates/rolebinding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: test-ruler-dedicated-query-path-values-rollout-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: test-ruler-dedicated-query-path-values-rollout-operator +subjects: +- kind: ServiceAccount + name: test-ruler-dedicated-query-path-values-rollout-operator diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/serviceaccount.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/serviceaccount.yaml new file mode 100644 index 0000000000..7bb8bd137f --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/charts/rollout_operator/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +--- +# Source: mimir-distributed/charts/rollout_operator/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: test-ruler-dedicated-query-path-values-rollout-operator + labels: + helm.sh/chart: rollout-operator-0.15.0 + app.kubernetes.io/name: rollout-operator + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/version: "v0.14.0" + app.kubernetes.io/managed-by: Helm diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-config.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-config.yaml new file mode 100644 index 0000000000..e6c4f14379 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-config.yaml @@ -0,0 +1,21 @@ +--- +# Source: mimir-distributed/templates/alertmanager/alertmanager-config.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: test-ruler-dedicated-query-path-values-mimir-alertmanager-fallback-config + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: alertmanager + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +data: + alertmanager_fallback_config.yaml: | + receivers: + - name: default-receiver + route: + receiver: default-receiver diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-pdb.yaml new file mode 100644 index 0000000000..0e4576d70b --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/alertmanager/alertmanager-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-alertmanager + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: alertmanager + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: alertmanager + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml new file mode 100644 index 0000000000..3873653056 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml @@ -0,0 +1,129 @@ +--- +# Source: mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-ruler-dedicated-query-path-values-mimir-alertmanager + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: alertmanager + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: alertmanager + updateStrategy: + type: RollingUpdate + serviceName: test-ruler-dedicated-query-path-values-mimir-alertmanager + volumeClaimTemplates: + - metadata: + name: storage + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "1Gi" + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: alertmanager + app.kubernetes.io/part-of: memberlist + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: alertmanager + terminationGracePeriodSeconds: 900 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: tmp + emptyDir: {} + - name: active-queries + emptyDir: {} + - name: alertmanager-fallback-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-alertmanager-fallback-config + containers: + - name: alertmanager + imagePullPolicy: IfNotPresent + args: + - "-target=alertmanager" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + - name: alertmanager-fallback-config + mountPath: /configs/ + - name: tmp + mountPath: /tmp + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + resources: + requests: + cpu: 10m + memory: 32Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + envFrom: diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-svc-headless.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-svc-headless.yaml new file mode 100644 index 0000000000..8cb33ba4e1 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-svc-headless.yaml @@ -0,0 +1,36 @@ +--- +# Source: mimir-distributed/templates/alertmanager/alertmanager-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-alertmanager-headless + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: alertmanager + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + prometheus.io/service-monitor: "false" + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + clusterIP: None + publishNotReadyAddresses: true + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + - port: 9094 + protocol: TCP + name: cluster + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: alertmanager diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-svc.yaml new file mode 100644 index 0000000000..c5cabbb239 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/alertmanager/alertmanager-svc.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/templates/alertmanager/alertmanager-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-alertmanager + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: alertmanager + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: alertmanager diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-pdb.yaml new file mode 100644 index 0000000000..100ab9e0d1 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/compactor/compactor-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-compactor + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: compactor + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: compactor + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-statefulset.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-statefulset.yaml new file mode 100644 index 0000000000..3e8dd15735 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-statefulset.yaml @@ -0,0 +1,121 @@ +--- +# Source: mimir-distributed/templates/compactor/compactor-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-ruler-dedicated-query-path-values-mimir-compactor + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: compactor + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + podManagementPolicy: OrderedReady + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: compactor + updateStrategy: + type: RollingUpdate + serviceName: test-ruler-dedicated-query-path-values-mimir-compactor + volumeClaimTemplates: + - metadata: + name: storage + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "2Gi" + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: compactor + app.kubernetes.io/part-of: memberlist + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: compactor + terminationGracePeriodSeconds: 900 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: active-queries + emptyDir: {} + containers: + - name: compactor + imagePullPolicy: IfNotPresent + args: + - "-target=compactor" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 60 + resources: + requests: + cpu: 100m + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + envFrom: diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-svc.yaml new file mode 100644 index 0000000000..5a01ad6229 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/compactor/compactor-svc.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/templates/compactor/compactor-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-compactor + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: compactor + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: compactor diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-dep.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-dep.yaml new file mode 100644 index 0000000000..9c9287ff47 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-dep.yaml @@ -0,0 +1,128 @@ +--- +# Source: mimir-distributed/templates/distributor/distributor-dep.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-mimir-distributor + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: distributor + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + # If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: distributor + strategy: + rollingUpdate: + maxSurge: 15% + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: distributor + app.kubernetes.io/part-of: memberlist + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + containers: + - name: distributor + imagePullPolicy: IfNotPresent + args: + - "-target=distributor" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + # When write requests go through distributors via gRPC, we want gRPC clients to re-resolve the distributors DNS + # endpoint before the distributor process is terminated, in order to avoid any failures during graceful shutdown. + # To achieve it, we set a shutdown delay greater than the gRPC max connection age. + - "-server.grpc.keepalive.max-connection-age=60s" + - "-server.grpc.keepalive.max-connection-age-grace=5m" + - "-server.grpc.keepalive.max-connection-idle=1m" + - "-shutdown-delay=90s" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + subPath: + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + resources: + requests: + cpu: 100m + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "GOMAXPROCS" + value: "8" + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "1000" + envFrom: + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: distributor + terminationGracePeriodSeconds: 100 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-pdb.yaml new file mode 100644 index 0000000000..86cd3677ed --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/distributor/distributor-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-distributor + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: distributor + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: distributor + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-svc-headless.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-svc-headless.yaml new file mode 100644 index 0000000000..ba06e7ef3b --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-svc-headless.yaml @@ -0,0 +1,32 @@ +--- +# Source: mimir-distributed/templates/distributor/distributor-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-distributor-headless + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: distributor + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + prometheus.io/service-monitor: "false" + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + clusterIP: None + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: distributor diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-svc.yaml new file mode 100644 index 0000000000..d56d11eba7 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/distributor/distributor-svc.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/templates/distributor/distributor-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-distributor + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: distributor + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: distributor diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/gossip-ring/gossip-ring-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/gossip-ring/gossip-ring-svc.yaml new file mode 100644 index 0000000000..886b52a322 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/gossip-ring/gossip-ring-svc.yaml @@ -0,0 +1,26 @@ +--- +# Source: mimir-distributed/templates/gossip-ring/gossip-ring-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-gossip-ring + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: gossip-ring + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + type: ClusterIP + clusterIP: None + ports: + - name: gossip-ring + port: 7946 + appProtocol: tcp + protocol: TCP + targetPort: 7946 + publishNotReadyAddresses: true + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/part-of: memberlist diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-pdb.yaml new file mode 100644 index 0000000000..2415a779e7 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/ingester/ingester-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ingester + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-statefulset.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-statefulset.yaml new file mode 100644 index 0000000000..2e2c8a2aa8 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-statefulset.yaml @@ -0,0 +1,396 @@ +--- +# Source: mimir-distributed/templates/ingester/ingester-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ingester-zone-a + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "ingester-zone-a" + rollout-group: ingester + zone: zone-a + annotations: + rollout-max-unavailable: "50" + namespace: "citestns" +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + rollout-group: ingester + zone: zone-a + updateStrategy: + type: OnDelete + serviceName: test-ruler-dedicated-query-path-values-mimir-ingester-headless + volumeClaimTemplates: + - metadata: + name: storage + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "2Gi" + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: ingester + app.kubernetes.io/part-of: memberlist + name: "ingester-zone-a" + rollout-group: ingester + zone: zone-a + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + terminationGracePeriodSeconds: 1200 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: active-queries + emptyDir: {} + containers: + - name: ingester + imagePullPolicy: IfNotPresent + args: + - "-target=ingester" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-ingester.ring.instance-availability-zone=zone-a" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 60 + resources: + requests: + cpu: 100m + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "1000" + envFrom: +--- +# Source: mimir-distributed/templates/ingester/ingester-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ingester-zone-b + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "ingester-zone-b" + rollout-group: ingester + zone: zone-b + annotations: + rollout-max-unavailable: "50" + namespace: "citestns" +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + rollout-group: ingester + zone: zone-b + updateStrategy: + type: OnDelete + serviceName: test-ruler-dedicated-query-path-values-mimir-ingester-headless + volumeClaimTemplates: + - metadata: + name: storage + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "2Gi" + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: ingester + app.kubernetes.io/part-of: memberlist + name: "ingester-zone-b" + rollout-group: ingester + zone: zone-b + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + terminationGracePeriodSeconds: 1200 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: active-queries + emptyDir: {} + containers: + - name: ingester + imagePullPolicy: IfNotPresent + args: + - "-target=ingester" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-ingester.ring.instance-availability-zone=zone-b" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 60 + resources: + requests: + cpu: 100m + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "1000" + envFrom: +--- +# Source: mimir-distributed/templates/ingester/ingester-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ingester-zone-c + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "ingester-zone-c" + rollout-group: ingester + zone: zone-c + annotations: + rollout-max-unavailable: "50" + namespace: "citestns" +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + rollout-group: ingester + zone: zone-c + updateStrategy: + type: OnDelete + serviceName: test-ruler-dedicated-query-path-values-mimir-ingester-headless + volumeClaimTemplates: + - metadata: + name: storage + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "2Gi" + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: ingester + app.kubernetes.io/part-of: memberlist + name: "ingester-zone-c" + rollout-group: ingester + zone: zone-c + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + terminationGracePeriodSeconds: 1200 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: active-queries + emptyDir: {} + containers: + - name: ingester + imagePullPolicy: IfNotPresent + args: + - "-target=ingester" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-ingester.ring.instance-availability-zone=zone-c" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 60 + resources: + requests: + cpu: 100m + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "1000" + envFrom: diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-svc-headless.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-svc-headless.yaml new file mode 100644 index 0000000000..3fa235f31b --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-svc-headless.yaml @@ -0,0 +1,32 @@ +--- +# Source: mimir-distributed/templates/ingester/ingester-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ingester-headless + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + prometheus.io/service-monitor: "false" + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + clusterIP: None + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-svc.yaml new file mode 100644 index 0000000000..395437ad2e --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ingester/ingester-svc.yaml @@ -0,0 +1,105 @@ +--- +# Source: mimir-distributed/templates/ingester/ingester-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ingester-zone-a + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "ingester-zone-a" + rollout-group: ingester + zone: zone-a + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + rollout-group: ingester + zone: zone-a +--- +# Source: mimir-distributed/templates/ingester/ingester-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ingester-zone-b + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "ingester-zone-b" + rollout-group: ingester + zone: zone-b + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + rollout-group: ingester + zone: zone-b +--- +# Source: mimir-distributed/templates/ingester/ingester-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ingester-zone-c + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "ingester-zone-c" + rollout-group: ingester + zone: zone-c + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ingester + rollout-group: ingester + zone: zone-c diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/mimir-config.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/mimir-config.yaml new file mode 100644 index 0000000000..169a296f64 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/mimir-config.yaml @@ -0,0 +1,120 @@ +--- +# Source: mimir-distributed/templates/mimir-config.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: test-ruler-dedicated-query-path-values-mimir-config + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +data: + mimir.yaml: | + + activity_tracker: + filepath: /active-query-tracker/activity.log + alertmanager: + data_dir: /data + enable_api: true + external_url: /alertmanager + fallback_config_file: /configs/alertmanager_fallback_config.yaml + alertmanager_storage: + backend: s3 + s3: + access_key_id: grafana-mimir + bucket_name: mimir-ruler + endpoint: test-ruler-dedicated-query-path-values-minio.citestns.svc:9000 + insecure: true + secret_access_key: supersecret + blocks_storage: + backend: s3 + bucket_store: + sync_dir: /data/tsdb-sync + s3: + access_key_id: grafana-mimir + bucket_name: mimir-tsdb + endpoint: test-ruler-dedicated-query-path-values-minio.citestns.svc:9000 + insecure: true + secret_access_key: supersecret + tsdb: + dir: /data/tsdb + head_compaction_interval: 15m + wal_replay_concurrency: 3 + compactor: + compaction_interval: 30m + data_dir: /data + deletion_delay: 2h + first_level_compaction_wait_period: 25m + max_closing_blocks_concurrency: 2 + max_opening_blocks_concurrency: 4 + sharding_ring: + heartbeat_period: 1m + heartbeat_timeout: 4m + wait_stability_min_duration: 1m + symbols_flushers_concurrency: 4 + distributor: + ring: + heartbeat_period: 1m + heartbeat_timeout: 4m + frontend: + parallelize_shardable_queries: true + scheduler_address: test-ruler-dedicated-query-path-values-mimir-query-scheduler-headless.citestns.svc:9095 + frontend_worker: + grpc_client_config: + max_send_msg_size: 419430400 + scheduler_address: test-ruler-dedicated-query-path-values-mimir-query-scheduler-headless.citestns.svc:9095 + ingester: + ring: + final_sleep: 0s + heartbeat_period: 2m + heartbeat_timeout: 10m + num_tokens: 512 + tokens_file_path: /data/tokens + unregister_on_shutdown: false + zone_awareness_enabled: true + ingester_client: + grpc_client_config: + max_recv_msg_size: 104857600 + max_send_msg_size: 104857600 + limits: + max_cache_freshness: 10m + max_query_parallelism: 240 + max_total_query_length: 12000h + memberlist: + abort_if_cluster_join_fails: false + compression_enabled: false + join_members: + - dns+test-ruler-dedicated-query-path-values-mimir-gossip-ring.citestns.svc.cluster.local.:7946 + querier: + max_concurrent: 16 + query_scheduler: + max_outstanding_requests_per_tenant: 800 + ruler: + alertmanager_url: dnssrvnoa+http://_http-metrics._tcp.test-ruler-dedicated-query-path-values-mimir-alertmanager-headless.citestns.svc.cluster.local./alertmanager + enable_api: true + query_frontend: + address: dns:///test-ruler-dedicated-query-path-values-mimir-ruler-query-frontend.citestns.svc:9095 + rule_path: /data + ruler_storage: + backend: s3 + s3: + access_key_id: grafana-mimir + bucket_name: mimir-ruler + endpoint: test-ruler-dedicated-query-path-values-minio.citestns.svc:9000 + insecure: true + secret_access_key: supersecret + runtime_config: + file: /var/mimir/runtime.yaml + store_gateway: + sharding_ring: + heartbeat_period: 1m + heartbeat_timeout: 4m + kvstore: + prefix: multi-zone/ + tokens_file_path: /data/tokens + unregister_on_shutdown: false + wait_stability_min_duration: 1m + zone_awareness_enabled: true + usage_stats: + installation_mode: helm diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml new file mode 100644 index 0000000000..c138988555 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/minio/create-bucket-job.yaml @@ -0,0 +1,47 @@ +--- +# Source: mimir-distributed/templates/minio/create-bucket-job.yaml +# Minio provides post-install hook to create bucket +# however the hook won't be executed if helm install is run +# with --wait flag. Hence this job is a workaround for that. +# See https://github.com/grafana/mimir/issues/2464 +apiVersion: batch/v1 +kind: Job +metadata: + name: test-ruler-dedicated-query-path-values-mimir-make-minio-buckets-5.0.14 + namespace: "citestns" + labels: + app: mimir-distributed-make-bucket-job + release: test-ruler-dedicated-query-path-values + heritage: Helm +spec: + template: + metadata: + labels: + app: mimir-distributed-job + release: test-ruler-dedicated-query-path-values + spec: + restartPolicy: OnFailure + volumes: + - name: minio-configuration + projected: + sources: + - configMap: + name: test-ruler-dedicated-query-path-values-minio + - secret: + name: test-ruler-dedicated-query-path-values-minio + containers: + - name: minio-mc + image: "quay.io/minio/mc:RELEASE.2023-09-29T16-41-22Z" + imagePullPolicy: IfNotPresent + command: ["/bin/sh", "/config/initialize"] + env: + - name: MINIO_ENDPOINT + value: test-ruler-dedicated-query-path-values-minio + - name: MINIO_PORT + value: "9000" + volumeMounts: + - name: minio-configuration + mountPath: /config + resources: + requests: + memory: 128Mi diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-configmap.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-configmap.yaml new file mode 100644 index 0000000000..5eb00bfeba --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-configmap.yaml @@ -0,0 +1,134 @@ +--- +# Source: mimir-distributed/templates/nginx/nginx-configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: test-ruler-dedicated-query-path-values-mimir-nginx + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: nginx + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +data: + nginx.conf: | + worker_processes 5; ## Default: 1 + error_log /dev/stderr error; + pid /tmp/nginx.pid; + worker_rlimit_nofile 8192; + + events { + worker_connections 4096; ## Default: 1024 + } + + http { + client_body_temp_path /tmp/client_temp; + proxy_temp_path /tmp/proxy_temp_path; + fastcgi_temp_path /tmp/fastcgi_temp; + uwsgi_temp_path /tmp/uwsgi_temp; + scgi_temp_path /tmp/scgi_temp; + + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] $status ' + '"$request" $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + access_log /dev/stderr main; + + sendfile on; + tcp_nopush on; + proxy_http_version 1.1; + resolver kube-dns.kube-system.svc.cluster.local.; + + # Ensure that X-Scope-OrgID is always present, default to the no_auth_tenant for backwards compatibility when multi-tenancy was turned off. + map $http_x_scope_orgid $ensured_x_scope_orgid { + default $http_x_scope_orgid; + "" "anonymous"; + } + + map $http_x_scope_orgid $has_multiple_orgid_headers { + default 0; + "~^.+,.+$" 1; + } + + proxy_read_timeout 300; + server { + listen 8080; + listen [::]:8080; + + if ($has_multiple_orgid_headers = 1) { + return 400 'Sending multiple X-Scope-OrgID headers is not allowed. Use a single header with | as separator instead.'; + } + + location = / { + return 200 'OK'; + auth_basic off; + } + + proxy_set_header X-Scope-OrgID $ensured_x_scope_orgid; + + # Distributor endpoints + location /distributor { + set $distributor test-ruler-dedicated-query-path-values-mimir-distributor-headless.citestns.svc.cluster.local.; + proxy_pass http://$distributor:8080$request_uri; + } + location = /api/v1/push { + set $distributor test-ruler-dedicated-query-path-values-mimir-distributor-headless.citestns.svc.cluster.local.; + proxy_pass http://$distributor:8080$request_uri; + } + location /otlp/v1/metrics { + set $distributor test-ruler-dedicated-query-path-values-mimir-distributor-headless.citestns.svc.cluster.local.; + proxy_pass http://$distributor:8080$request_uri; + } + + # Alertmanager endpoints + location /alertmanager { + set $alertmanager test-ruler-dedicated-query-path-values-mimir-alertmanager-headless.citestns.svc.cluster.local.; + proxy_pass http://$alertmanager:8080$request_uri; + } + location = /multitenant_alertmanager/status { + set $alertmanager test-ruler-dedicated-query-path-values-mimir-alertmanager-headless.citestns.svc.cluster.local.; + proxy_pass http://$alertmanager:8080$request_uri; + } + location = /api/v1/alerts { + set $alertmanager test-ruler-dedicated-query-path-values-mimir-alertmanager-headless.citestns.svc.cluster.local.; + proxy_pass http://$alertmanager:8080$request_uri; + } + + # Ruler endpoints + location /prometheus/config/v1/rules { + set $ruler test-ruler-dedicated-query-path-values-mimir-ruler.citestns.svc.cluster.local.; + proxy_pass http://$ruler:8080$request_uri; + } + location /prometheus/api/v1/rules { + set $ruler test-ruler-dedicated-query-path-values-mimir-ruler.citestns.svc.cluster.local.; + proxy_pass http://$ruler:8080$request_uri; + } + + location /prometheus/api/v1/alerts { + set $ruler test-ruler-dedicated-query-path-values-mimir-ruler.citestns.svc.cluster.local.; + proxy_pass http://$ruler:8080$request_uri; + } + location = /ruler/ring { + set $ruler test-ruler-dedicated-query-path-values-mimir-ruler.citestns.svc.cluster.local.; + proxy_pass http://$ruler:8080$request_uri; + } + + # Rest of /prometheus goes to the query frontend + location /prometheus { + set $query_frontend test-ruler-dedicated-query-path-values-mimir-query-frontend.citestns.svc.cluster.local.; + proxy_pass http://$query_frontend:8080$request_uri; + } + + # Buildinfo endpoint can go to any component + location = /api/v1/status/buildinfo { + set $query_frontend test-ruler-dedicated-query-path-values-mimir-query-frontend.citestns.svc.cluster.local.; + proxy_pass http://$query_frontend:8080$request_uri; + } + + # Compactor endpoint for uploading blocks + location /api/v1/upload/block/ { + set $compactor test-ruler-dedicated-query-path-values-mimir-compactor.citestns.svc.cluster.local.; + proxy_pass http://$compactor:8080$request_uri; + } + } + } diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-dep.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-dep.yaml new file mode 100644 index 0000000000..2f2f7993be --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-dep.yaml @@ -0,0 +1,94 @@ +--- +# Source: mimir-distributed/templates/nginx/nginx-dep.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-mimir-nginx + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: nginx + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + replicas: 1 + strategy: + rollingUpdate: + maxSurge: 15% + maxUnavailable: 0 + type: RollingUpdate + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: nginx + template: + metadata: + annotations: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: nginx + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + terminationGracePeriodSeconds: 30 + containers: + - name: nginx + image: docker.io/nginxinc/nginx-unprivileged:1.25-alpine + imagePullPolicy: IfNotPresent + ports: + - name: http-metric + containerPort: 8080 + protocol: TCP + env: + envFrom: + readinessProbe: + httpGet: + path: / + port: http-metric + initialDelaySeconds: 15 + timeoutSeconds: 1 + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + volumeMounts: + - name: config + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf + - name: tmp + mountPath: /tmp + - name: docker-entrypoint-d-override + mountPath: /docker-entrypoint.d + resources: + {} + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: nginx + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-nginx + - name: tmp + emptyDir: {} + - name: docker-entrypoint-d-override + emptyDir: {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-pdb.yaml new file mode 100644 index 0000000000..4efa05e5d2 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/nginx/nginx-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-nginx + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: nginx + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: nginx + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-svc.yaml new file mode 100644 index 0000000000..2c291244c1 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/nginx/nginx-svc.yaml @@ -0,0 +1,25 @@ +--- +# Source: mimir-distributed/templates/nginx/nginx-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-nginx + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: nginx + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - name: http-metric + port: 80 + targetPort: http-metric + protocol: TCP + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: nginx diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-dep.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-dep.yaml new file mode 100644 index 0000000000..f6c9e83eae --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-dep.yaml @@ -0,0 +1,106 @@ +--- +# Source: mimir-distributed/templates/overrides-exporter/overrides-exporter-dep.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + {} + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: overrides-exporter + app.kubernetes.io/managed-by: Helm + name: test-ruler-dedicated-query-path-values-mimir-overrides-exporter + namespace: "citestns" +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: overrides-exporter + strategy: + rollingUpdate: + maxSurge: 15% + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: overrides-exporter + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + containers: + - name: overrides-exporter + imagePullPolicy: IfNotPresent + args: + - "-target=overrides-exporter" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + subPath: + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + livenessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + resources: + requests: + cpu: 100m + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + envFrom: + + terminationGracePeriodSeconds: 30 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-pdb.yaml new file mode 100644 index 0000000000..49723e1ae5 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/overrides-exporter/overrides-exporter-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-overrides-exporter + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: overrides-exporter + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: overrides-exporter + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-svc.yaml new file mode 100644 index 0000000000..fd8180a9a1 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/overrides-exporter/overrides-exporter-svc.yaml @@ -0,0 +1,29 @@ +--- +# Source: mimir-distributed/templates/overrides-exporter/overrides-exporter-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-overrides-exporter + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: overrides-exporter + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: overrides-exporter diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/podsecuritypolicy.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/podsecuritypolicy.yaml new file mode 100644 index 0000000000..ece707a75f --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/podsecuritypolicy.yaml @@ -0,0 +1,40 @@ +--- +# Source: mimir-distributed/templates/podsecuritypolicy.yaml +apiVersion: policy/v1beta1 +kind: PodSecurityPolicy +metadata: + name: test-ruler-dedicated-query-path-values-mimir + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + annotations: + "seccomp.security.alpha.kubernetes.io/allowedProfileNames": runtime/default +spec: + privileged: false + allowPrivilegeEscalation: false + volumes: + - 'configMap' + - 'emptyDir' + - 'persistentVolumeClaim' + - 'secret' + hostNetwork: false + hostIPC: false + hostPID: false + runAsUser: + rule: MustRunAsNonRoot + seLinux: + rule: RunAsAny + supplementalGroups: + rule: MustRunAs + ranges: + - min: 1 + max: 65535 + fsGroup: + rule: MustRunAs + ranges: + - min: 1 + max: 65535 + readOnlyRootFilesystem: true + requiredDropCapabilities: + - ALL diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-dep.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-dep.yaml new file mode 100644 index 0000000000..65557a287a --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-dep.yaml @@ -0,0 +1,120 @@ +--- +# Source: mimir-distributed/templates/querier/querier-dep.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-mimir-querier + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: querier + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + # If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it + replicas: 2 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: querier + strategy: + rollingUpdate: + maxSurge: 15% + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: querier + app.kubernetes.io/part-of: memberlist + annotations: + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + containers: + - name: querier + imagePullPolicy: IfNotPresent + args: + - "-target=querier" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + subPath: + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + resources: + requests: + cpu: 100m + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "GOMAXPROCS" + value: "5" + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "5000" + envFrom: + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: querier + terminationGracePeriodSeconds: 180 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-pdb.yaml new file mode 100644 index 0000000000..a28b1d5e87 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/querier/querier-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-querier + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: querier + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: querier + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-svc.yaml new file mode 100644 index 0000000000..0abb5dfaac --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/querier/querier-svc.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/templates/querier/querier-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-querier + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: querier + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: querier diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-dep.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-dep.yaml new file mode 100644 index 0000000000..1bfa6f1b22 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-dep.yaml @@ -0,0 +1,116 @@ +--- +# Source: mimir-distributed/templates/query-frontend/query-frontend-dep.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-mimir-query-frontend + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-frontend + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + # If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-frontend + strategy: + rollingUpdate: + maxSurge: 15% + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: query-frontend + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + containers: + - name: query-frontend + imagePullPolicy: IfNotPresent + args: + - "-target=query-frontend" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + # Reduce the likelihood of queries hitting terminated query-frontends. + - "-server.grpc.keepalive.max-connection-age=30s" + - "-shutdown-delay=90s" + volumeMounts: + - name: runtime-config + mountPath: /var/mimir + - name: config + mountPath: /etc/mimir + - name: storage + mountPath: /data + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + resources: + requests: + cpu: 100m + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "5000" + envFrom: + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-frontend + terminationGracePeriodSeconds: 390 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-pdb.yaml new file mode 100644 index 0000000000..a731888055 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/query-frontend/query-frontend-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-query-frontend + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-frontend + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-frontend + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-svc.yaml new file mode 100644 index 0000000000..18669fc3a5 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-frontend/query-frontend-svc.yaml @@ -0,0 +1,29 @@ +--- +# Source: mimir-distributed/templates/query-frontend/query-frontend-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-query-frontend + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-frontend + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-frontend diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-dep.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-dep.yaml new file mode 100644 index 0000000000..584e40f01a --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-dep.yaml @@ -0,0 +1,109 @@ +--- +# Source: mimir-distributed/templates/query-scheduler/query-scheduler-dep.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-mimir-query-scheduler + namespace: "citestns" + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-scheduler + app.kubernetes.io/managed-by: Helm + annotations: + {} +spec: + replicas: 2 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-scheduler + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: query-scheduler + annotations: + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + containers: + - name: query-scheduler + imagePullPolicy: IfNotPresent + args: + - "-target=query-scheduler" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + volumeMounts: + - name: runtime-config + mountPath: /var/mimir + - name: config + mountPath: /etc/mimir + - name: storage + mountPath: /data + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + resources: + requests: + cpu: 100m + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + envFrom: + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-scheduler + terminationGracePeriodSeconds: 180 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-pdb.yaml new file mode 100644 index 0000000000..cff5ceacdf --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/query-scheduler/query-scheduler-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-query-scheduler + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-scheduler + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-scheduler + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-svc-headless.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-svc-headless.yaml new file mode 100644 index 0000000000..f41d3bba35 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-svc-headless.yaml @@ -0,0 +1,32 @@ +--- +# Source: mimir-distributed/templates/query-scheduler/query-scheduler-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-query-scheduler-headless + namespace: "citestns" + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-scheduler + app.kubernetes.io/managed-by: Helm + prometheus.io/service-monitor: "false" + annotations: + {} +spec: + type: ClusterIP + clusterIP: None + publishNotReadyAddresses: true + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-scheduler diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-svc.yaml new file mode 100644 index 0000000000..4357ba401d --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/query-scheduler/query-scheduler-svc.yaml @@ -0,0 +1,29 @@ +--- +# Source: mimir-distributed/templates/query-scheduler/query-scheduler-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-query-scheduler + namespace: "citestns" + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-scheduler + app.kubernetes.io/managed-by: Helm + annotations: + {} +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: query-scheduler diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/role.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/role.yaml new file mode 100644 index 0000000000..3f56ab7bf8 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/role.yaml @@ -0,0 +1,16 @@ +--- +# Source: mimir-distributed/templates/role.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: test-ruler-dedicated-query-path-values-mimir + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +rules: +- apiGroups: ['extensions'] + resources: ['podsecuritypolicies'] + verbs: ['use'] + resourceNames: [test-ruler-dedicated-query-path-values-mimir] diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/rolebinding.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/rolebinding.yaml new file mode 100644 index 0000000000..470bea8ad4 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/rolebinding.yaml @@ -0,0 +1,20 @@ +--- +# Source: mimir-distributed/templates/rolebinding.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: test-ruler-dedicated-query-path-values-mimir + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: test-ruler-dedicated-query-path-values-mimir +subjects: +- kind: ServiceAccount + name: test-ruler-dedicated-query-path-values-mimir +- kind: ServiceAccount + name: test-ruler-dedicated-query-path-values-mimir-distributed diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-dep.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-dep.yaml new file mode 100644 index 0000000000..95577ee373 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-dep.yaml @@ -0,0 +1,121 @@ +--- +# Source: mimir-distributed/templates/ruler-querier/ruler-querier-dep.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler-querier + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-querier + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + # If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it + replicas: 2 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-querier + strategy: + rollingUpdate: + maxSurge: 15% + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: ruler-querier + app.kubernetes.io/part-of: memberlist + annotations: + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + containers: + - name: ruler-querier + imagePullPolicy: IfNotPresent + args: + - "-target=querier" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-querier.scheduler-address=test-ruler-dedicated-query-path-values-mimir-ruler-query-scheduler-headless.citestns.svc:9095" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + subPath: + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + resources: + requests: + cpu: 100m + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "GOMAXPROCS" + value: "5" + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "5000" + envFrom: + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-querier + terminationGracePeriodSeconds: 180 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-pdb.yaml new file mode 100644 index 0000000000..5e6df551fa --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/ruler-querier/ruler-querier-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler-querier + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-querier + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-querier + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-svc.yaml new file mode 100644 index 0000000000..4da846b379 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-querier/ruler-querier-svc.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/templates/ruler-querier/ruler-querier-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler-querier + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-querier + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-querier diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-dep.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-dep.yaml new file mode 100644 index 0000000000..756169465d --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-dep.yaml @@ -0,0 +1,118 @@ +--- +# Source: mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-dep.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler-query-frontend + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-frontend + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + # If replicas is not number (when using values file it's float64, when using --set arg it's int64) and is false (i.e. null) don't set it + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-frontend + strategy: + rollingUpdate: + maxSurge: 15% + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: ruler-query-frontend + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + containers: + - name: ruler-query-frontend + imagePullPolicy: IfNotPresent + args: + - "-target=query-frontend" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-query-frontend.cache-results=false" + - "-query-frontend.scheduler-address=test-ruler-dedicated-query-path-values-mimir-ruler-query-scheduler-headless.citestns.svc:9095" + # Reduce the likelihood of queries hitting terminated query-frontends. + - "-server.grpc.keepalive.max-connection-age=30s" + - "-shutdown-delay=90s" + volumeMounts: + - name: runtime-config + mountPath: /var/mimir + - name: config + mountPath: /etc/mimir + - name: storage + mountPath: /data + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + resources: + requests: + cpu: 100m + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "5000" + envFrom: + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-frontend + terminationGracePeriodSeconds: 390 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-pdb.yaml new file mode 100644 index 0000000000..0c79b274ca --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler-query-frontend + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-frontend + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-frontend + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-svc.yaml new file mode 100644 index 0000000000..340c64c704 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-svc.yaml @@ -0,0 +1,29 @@ +--- +# Source: mimir-distributed/templates/ruler-query-frontend/ruler-query-frontend-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler-query-frontend + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-frontend + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-frontend diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-dep.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-dep.yaml new file mode 100644 index 0000000000..c173bb4de9 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-dep.yaml @@ -0,0 +1,109 @@ +--- +# Source: mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-dep.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler-query-scheduler + namespace: "citestns" + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-scheduler + app.kubernetes.io/managed-by: Helm + annotations: + {} +spec: + replicas: 2 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-scheduler + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: ruler-query-scheduler + annotations: + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + containers: + - name: ruler-query-scheduler + imagePullPolicy: IfNotPresent + args: + - "-target=query-scheduler" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + volumeMounts: + - name: runtime-config + mountPath: /var/mimir + - name: config + mountPath: /etc/mimir + - name: storage + mountPath: /data + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + resources: + requests: + cpu: 100m + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + envFrom: + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-scheduler + terminationGracePeriodSeconds: 180 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-pdb.yaml new file mode 100644 index 0000000000..16ca44234e --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler-query-scheduler + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-scheduler + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-scheduler + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc-headless.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc-headless.yaml new file mode 100644 index 0000000000..0ae17d598e --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc-headless.yaml @@ -0,0 +1,32 @@ +--- +# Source: mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler-query-scheduler-headless + namespace: "citestns" + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-scheduler + app.kubernetes.io/managed-by: Helm + prometheus.io/service-monitor: "false" + annotations: + {} +spec: + type: ClusterIP + clusterIP: None + publishNotReadyAddresses: true + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-scheduler diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc.yaml new file mode 100644 index 0000000000..418c48b873 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc.yaml @@ -0,0 +1,29 @@ +--- +# Source: mimir-distributed/templates/ruler-query-scheduler/ruler-query-scheduler-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler-query-scheduler + namespace: "citestns" + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-scheduler + app.kubernetes.io/managed-by: Helm + annotations: + {} +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler-query-scheduler diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-dep.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-dep.yaml new file mode 100644 index 0000000000..440b821bd7 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-dep.yaml @@ -0,0 +1,119 @@ +--- +# Source: mimir-distributed/templates/ruler/ruler-dep.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler + strategy: + rollingUpdate: + maxSurge: 50% + maxUnavailable: 0 + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: ruler + app.kubernetes.io/part-of: memberlist + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + containers: + - name: ruler + imagePullPolicy: IfNotPresent + args: + - "-target=ruler" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-distributor.remote-timeout=10s" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + subPath: + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 45 + resources: + requests: + cpu: 100m + memory: 128Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "1000" + envFrom: + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler + terminationGracePeriodSeconds: 600 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: storage + emptyDir: {} + - name: active-queries + emptyDir: {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-pdb.yaml new file mode 100644 index 0000000000..8fa92613b8 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/ruler/ruler-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-svc.yaml new file mode 100644 index 0000000000..041245c01e --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/ruler/ruler-svc.yaml @@ -0,0 +1,26 @@ +--- +# Source: mimir-distributed/templates/ruler/ruler-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-ruler + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: ruler diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/runtime-configmap.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/runtime-configmap.yaml new file mode 100644 index 0000000000..32727720a8 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/runtime-configmap.yaml @@ -0,0 +1,15 @@ +--- +# Source: mimir-distributed/templates/runtime-configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: test-ruler-dedicated-query-path-values-mimir-runtime + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +data: + runtime.yaml: | + + {} diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/serviceaccount.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/serviceaccount.yaml new file mode 100644 index 0000000000..b7f20cf0d0 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: mimir-distributed/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: test-ruler-dedicated-query-path-values-mimir + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/smoke-test/smoke-test-job.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/smoke-test/smoke-test-job.yaml new file mode 100644 index 0000000000..d3d95dd8a0 --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/smoke-test/smoke-test-job.yaml @@ -0,0 +1,55 @@ +--- +# Source: mimir-distributed/templates/smoke-test/smoke-test-job.yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: test-ruler-dedicated-query-path-values-mimir-smoke-test + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: smoke-test + app.kubernetes.io/managed-by: Helm + annotations: + "helm.sh/hook": test + namespace: "citestns" +spec: + backoffLimit: 5 + completions: 1 + parallelism: 1 + selector: + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: smoke-test + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + initContainers: + [] + containers: + - name: smoke-test + imagePullPolicy: IfNotPresent + args: + - "-target=continuous-test" + - "-activity-tracker.filepath=" + - "-tests.smoke-test" + - "-tests.write-endpoint=http://test-ruler-dedicated-query-path-values-mimir-nginx.citestns.svc:80" + - "-tests.read-endpoint=http://test-ruler-dedicated-query-path-values-mimir-nginx.citestns.svc:80/prometheus" + - "-tests.tenant-id=" + - "-tests.write-read-series-test.num-series=1000" + - "-tests.write-read-series-test.max-query-age=48h" + - "-server.http-listen-port=8080" + volumeMounts: + env: + envFrom: + restartPolicy: OnFailure + volumes: diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-pdb.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-pdb.yaml new file mode 100644 index 0000000000..5c6885490c --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/store-gateway/store-gateway-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-ruler-dedicated-query-path-values-mimir-store-gateway + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + maxUnavailable: 1 diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml new file mode 100644 index 0000000000..3bc1c4166b --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml @@ -0,0 +1,408 @@ +--- +# Source: mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-ruler-dedicated-query-path-values-mimir-store-gateway-zone-a + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "store-gateway-zone-a" + rollout-group: store-gateway + zone: zone-a + annotations: + rollout-max-unavailable: "50" + namespace: "citestns" +spec: + podManagementPolicy: OrderedReady + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + rollout-group: store-gateway + zone: zone-a + updateStrategy: + type: OnDelete + serviceName: test-ruler-dedicated-query-path-values-mimir-store-gateway-headless + volumeClaimTemplates: + - metadata: + name: storage + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "2Gi" + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: store-gateway + app.kubernetes.io/part-of: memberlist + name: "store-gateway-zone-a" + rollout-group: store-gateway + zone: zone-a + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + terminationGracePeriodSeconds: 120 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: active-queries + emptyDir: {} + containers: + - name: store-gateway + imagePullPolicy: IfNotPresent + args: + - "-target=store-gateway" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-store-gateway.sharding-ring.instance-availability-zone=zone-a" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 60 + resources: + requests: + cpu: 100m + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "GOMAXPROCS" + value: "5" + - name: "GOMEMLIMIT" + value: "536870912" + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "1000" + envFrom: +--- +# Source: mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-ruler-dedicated-query-path-values-mimir-store-gateway-zone-b + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "store-gateway-zone-b" + rollout-group: store-gateway + zone: zone-b + annotations: + rollout-max-unavailable: "50" + namespace: "citestns" +spec: + podManagementPolicy: OrderedReady + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + rollout-group: store-gateway + zone: zone-b + updateStrategy: + type: OnDelete + serviceName: test-ruler-dedicated-query-path-values-mimir-store-gateway-headless + volumeClaimTemplates: + - metadata: + name: storage + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "2Gi" + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: store-gateway + app.kubernetes.io/part-of: memberlist + name: "store-gateway-zone-b" + rollout-group: store-gateway + zone: zone-b + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + terminationGracePeriodSeconds: 120 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: active-queries + emptyDir: {} + containers: + - name: store-gateway + imagePullPolicy: IfNotPresent + args: + - "-target=store-gateway" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-store-gateway.sharding-ring.instance-availability-zone=zone-b" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 60 + resources: + requests: + cpu: 100m + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "GOMAXPROCS" + value: "5" + - name: "GOMEMLIMIT" + value: "536870912" + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "1000" + envFrom: +--- +# Source: mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-ruler-dedicated-query-path-values-mimir-store-gateway-zone-c + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "store-gateway-zone-c" + rollout-group: store-gateway + zone: zone-c + annotations: + rollout-max-unavailable: "50" + namespace: "citestns" +spec: + podManagementPolicy: OrderedReady + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + rollout-group: store-gateway + zone: zone-c + updateStrategy: + type: OnDelete + serviceName: test-ruler-dedicated-query-path-values-mimir-store-gateway-headless + volumeClaimTemplates: + - metadata: + name: storage + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "2Gi" + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: store-gateway + app.kubernetes.io/part-of: memberlist + name: "store-gateway-zone-c" + rollout-group: store-gateway + zone: zone-c + annotations: + namespace: "citestns" + spec: + serviceAccountName: test-ruler-dedicated-query-path-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + terminationGracePeriodSeconds: 120 + volumes: + - name: config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-config + items: + - key: "mimir.yaml" + path: "mimir.yaml" + - name: runtime-config + configMap: + name: test-ruler-dedicated-query-path-values-mimir-runtime + - name: active-queries + emptyDir: {} + containers: + - name: store-gateway + imagePullPolicy: IfNotPresent + args: + - "-target=store-gateway" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + - "-store-gateway.sharding-ring.instance-availability-zone=zone-c" + volumeMounts: + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/mimir + - name: storage + mountPath: "/data" + - name: active-queries + mountPath: /active-query-tracker + ports: + - name: http-metrics + containerPort: 8080 + protocol: TCP + - name: grpc + containerPort: 9095 + protocol: TCP + - name: memberlist + containerPort: 7946 + protocol: TCP + livenessProbe: + null + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 60 + resources: + requests: + cpu: 100m + memory: 512Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + env: + - name: "GOMAXPROCS" + value: "5" + - name: "GOMEMLIMIT" + value: "536870912" + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: "1000" + envFrom: diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-svc-headless.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-svc-headless.yaml new file mode 100644 index 0000000000..07e8adaa4f --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-svc-headless.yaml @@ -0,0 +1,32 @@ +--- +# Source: mimir-distributed/templates/store-gateway/store-gateway-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-store-gateway-headless + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + prometheus.io/service-monitor: "false" + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + clusterIP: None + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway diff --git a/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-svc.yaml b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-svc.yaml new file mode 100644 index 0000000000..ae70366e6e --- /dev/null +++ b/operations/helm/tests/test-ruler-dedicated-query-path-values-generated/mimir-distributed/templates/store-gateway/store-gateway-svc.yaml @@ -0,0 +1,105 @@ +--- +# Source: mimir-distributed/templates/store-gateway/store-gateway-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-store-gateway-zone-a + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "store-gateway-zone-a" + rollout-group: store-gateway + zone: zone-a + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + rollout-group: store-gateway + zone: zone-a +--- +# Source: mimir-distributed/templates/store-gateway/store-gateway-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-store-gateway-zone-b + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "store-gateway-zone-b" + rollout-group: store-gateway + zone: zone-b + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + rollout-group: store-gateway + zone: zone-b +--- +# Source: mimir-distributed/templates/store-gateway/store-gateway-svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-ruler-dedicated-query-path-values-mimir-store-gateway-zone-c + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + app.kubernetes.io/part-of: memberlist + app.kubernetes.io/managed-by: Helm + name: "store-gateway-zone-c" + rollout-group: store-gateway + zone: zone-c + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + ports: + - port: 8080 + protocol: TCP + name: http-metrics + targetPort: http-metrics + - port: 9095 + protocol: TCP + name: grpc + targetPort: grpc + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-ruler-dedicated-query-path-values + app.kubernetes.io/component: store-gateway + rollout-group: store-gateway + zone: zone-c