From 60914b40d44207d7e87b5bd4b5812a31c5209ae2 Mon Sep 17 00:00:00 2001 From: Ruben Van Wanzeele Date: Thu, 27 Apr 2023 15:51:06 +0200 Subject: [PATCH] A proposal for a helm chart that supports a monolithic deployment. The same chart is used for monolithic, as was existing for the microservices deployment mode. To do this a new parameter 'deploymentMode' has been added to the helm chart. All charts are adapted to deploy services when applicable according to the deployment model. A new template is being added that installs the monolithic mimir container. All nginx endpoints are updated to direct to the monolithic service if this deployment mode has been chosen. The name of the chart has not been updated from 'mimir-distributed' to 'mimir' yet. This allows for an easier maintenance as long as this is not merged. Ideally the rename happens when merging to avoid further confusion. I attached a monolithic.yaml yaml file that I have used to do a monolithic setup. In monolithic mode, publish not ready addresses and use these for the frontend. The read-write mode could be added in the future. The alert manager is not included in the monolithic deployment. If you want to run it, you can run it in a seperate pod by enabling it. The zone aware reploication functionality is supported int he monolithic deployment with a similar confiuction as required for ingester or store gateway. I have also added the functionality to enable compression for the monolithic chart. Ideally this would be embedded into the complete chart instead. A common configuration is probably the easiest, if you want grpc message compression, I guess you want it everywhere. The common configuration setting can then also be used in the monolithic approach. --- .../charts/mimir-distributed/CHANGELOG.md | 1 + .../charts/mimir-distributed/monolithic.yaml | 81 ++++ .../mimir-distributed/templates/_helpers.tpl | 4 +- .../alertmanager/alertmanager-config.yaml | 2 + .../alertmanager/alertmanager-dep.yaml | 2 + .../alertmanager/alertmanager-pdb.yaml | 2 + .../alertmanager/alertmanager-servmon.yaml | 2 + .../alertmanager-statefulset.yaml | 2 + .../alertmanager-svc-headless.yaml | 2 + .../alertmanager/alertmanager-svc.yaml | 2 + .../chunks-cache/chunks-cache-pdb.yaml | 2 + .../chunks-cache/chunks-cache-servmon.yaml | 2 + .../chunks-cache-statefulset.yaml | 2 + .../chunks-cache-svc-headless.yaml | 2 + .../templates/compactor/compactor-pdb.yaml | 2 + .../compactor/compactor-servmon.yaml | 2 + .../compactor/compactor-statefulset.yaml | 2 + .../templates/compactor/compactor-svc.yaml | 2 + .../distributor/distributor-dep.yaml | 2 + .../distributor/distributor-pdb.yaml | 2 + .../distributor/distributor-servmon.yaml | 2 + .../distributor/distributor-svc-headless.yaml | 2 + .../distributor/distributor-svc.yaml | 2 + .../templates/gateway/gateway-dep.yaml | 2 + .../templates/gateway/gateway-ingress.yaml | 2 + .../templates/gateway/gateway-pdb.yaml | 2 + .../templates/gateway/gateway-route.yaml | 2 + .../templates/gateway/gateway-servmon.yaml | 2 + .../templates/gateway/gateway-svc.yaml | 2 + .../templates/gateway/gateway-v2-hpa.yaml | 2 + .../gateway/gateway-v2beta1-hpa.yaml | 2 + .../templates/gateway/nginx-configmap.yaml | 2 + .../templates/gateway/nginx-secret.yaml | 2 + .../index-cache/index-cache-pdb.yaml | 2 + .../index-cache/index-cache-servmon.yaml | 2 + .../index-cache/index-cache-statefulset.yaml | 2 + .../index-cache/index-cache-svc-headless.yaml | 2 + .../templates/ingester/ingester-pdb.yaml | 2 + .../templates/ingester/ingester-servmon.yaml | 2 + .../ingester/ingester-statefulset.yaml | 2 + .../ingester/ingester-svc-headless.yaml | 2 + .../templates/ingester/ingester-svc.yaml | 2 + .../metadata-cache/metadata-cache-pdb.yaml | 2 + .../metadata-cache-servmon.yaml | 2 + .../metadata-cache-statefulset.yaml | 2 + .../metadata-cache-svc-headless.yaml | 2 + .../templates/monolithic/monolithic-pdb.yaml | 3 + .../monolithic/monolithic-servmon.yaml | 3 + .../monolithic/monolithic-statefulset.yaml | 233 ++++++++++++ .../monolithic/monolithic-svc-headless.yaml | 30 ++ .../templates/monolithic/monolithic-svc.yaml | 43 +++ .../templates/nginx/ingress.yaml | 2 + .../templates/nginx/nginx-configmap.yaml | 2 + .../templates/nginx/nginx-dep.yaml | 2 + .../templates/nginx/nginx-pdb.yaml | 2 + .../templates/nginx/nginx-secret.yaml | 2 + .../templates/nginx/nginx-svc.yaml | 2 + .../templates/nginx/nginx-v2-hpa.yaml | 2 + .../templates/nginx/nginx-v2beta1-hpa.yaml | 2 + .../templates/nginx/route.yaml | 2 + .../overrides-exporter-dep.yaml | 2 + .../overrides-exporter-pdb.yaml | 2 + .../overrides-exporter-servmon.yaml | 2 + .../overrides-exporter-svc.yaml | 2 + .../templates/querier/querier-dep.yaml | 2 + .../templates/querier/querier-pdb.yaml | 2 + .../templates/querier/querier-servmon.yaml | 2 + .../templates/querier/querier-svc.yaml | 2 + .../query-frontend/query-frontend-dep.yaml | 2 + .../query-frontend/query-frontend-pdb.yaml | 2 + .../query-frontend-servmon.yaml | 2 + .../query-frontend-svc-headless.yaml | 2 + .../query-frontend/query-frontend-svc.yaml | 2 + .../query-scheduler/query-scheduler-dep.yaml | 2 + .../query-scheduler/query-scheduler-pdb.yaml | 3 + .../query-scheduler-servmon.yaml | 2 + .../query-scheduler-svc-headless.yaml | 2 + .../query-scheduler/query-scheduler-svc.yaml | 2 + .../results-cache/results-cache-pdb.yaml | 2 + .../results-cache/results-cache-servmon.yaml | 2 + .../results-cache-statefulset.yaml | 2 + .../results-cache-svc-headless.yaml | 2 + .../templates/ruler/ruler-dep.yaml | 2 + .../templates/ruler/ruler-pdb.yaml | 2 + .../templates/ruler/ruler-servmon.yaml | 2 + .../templates/ruler/ruler-svc.yaml | 2 + .../store-gateway/store-gateway-pdb.yaml | 2 + .../store-gateway/store-gateway-servmon.yaml | 2 + .../store-gateway-statefulset.yaml | 2 + .../store-gateway-svc-headless.yaml | 2 + .../store-gateway/store-gateway-svc.yaml | 2 + .../mimir-distributed/templates/validate.yaml | 23 +- .../helm/charts/mimir-distributed/values.yaml | 355 ++++++++++++++++-- 93 files changed, 913 insertions(+), 30 deletions(-) create mode 100644 operations/helm/charts/mimir-distributed/monolithic.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-pdb.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-servmon.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-statefulset.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-svc-headless.yaml create mode 100644 operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-svc.yaml diff --git a/operations/helm/charts/mimir-distributed/CHANGELOG.md b/operations/helm/charts/mimir-distributed/CHANGELOG.md index ac7e0e2c37c..d986143861f 100644 --- a/operations/helm/charts/mimir-distributed/CHANGELOG.md +++ b/operations/helm/charts/mimir-distributed/CHANGELOG.md @@ -30,6 +30,7 @@ Entries should include a reference to the Pull Request that introduced the chang ## main / unreleased * [FEATURE] Add support for GEM's federation-frontend. See the `federation_frontend` section in the values file. #9673 +* [FEATURE] Support monolithic deployment with the helm chart. #4832 * [ENHANCEMENT] Add support for setting type and internal traffic policy for Kubernetes service. Set `internalTrafficPolicy=Cluster` by default in all services with type `ClusterIP`. #9619 * [ENHANCEMENT] Add the possibility to create a dedicated serviceAccount for the `alertmanager` component by setting `alertmanager.serviceAcount.create` to true in the values. #9781 * [ENHANCEMENT] helm: add `enabled` field for admin-api, compactor, distributor, gateway, ingester, querier, query-frontend and store-gateway components. This helps when deploying the GEM federation-frontend on its own. #9734 diff --git a/operations/helm/charts/mimir-distributed/monolithic.yaml b/operations/helm/charts/mimir-distributed/monolithic.yaml new file mode 100644 index 00000000000..ff4ff58f231 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/monolithic.yaml @@ -0,0 +1,81 @@ +# This is an example setup for monolithic mimir deployment + +deploymentMode: monolithic + +fullnameOverride: mimir + +serviceAccount: + annotations: + "eks.amazonaws.com/role-arn": "arn:aws:iam::829850591703:role/multi-az-eks-multi-az-mimir" + +mimir: + structuredConfig: + limits: + # Delete from storage metrics data older than 62 days. + compactor_blocks_retention_period: 62d + common: + storage: + backend: s3 + s3: + endpoint: s3.eu-west-1.amazonaws.com + region: eu-west-1 + blocks_storage: + storage_prefix: blocks + s3: + bucket_name: multi-az-eks-multi-az-mimir + alertmanager_storage: + storage_prefix: alertmanager + s3: + bucket_name: multi-az-eks-multi-az-mimir + ruler_storage: + storage_prefix: ruler + s3: + bucket_name: multi-az-eks-multi-az-mimir + +monolithic: + replicas: 3 + persistentVolume: + enabled: true + size: "8Gi" + storageClass: gp3-3000-125 + priorityClassName: "optional-rescheduling-priority-multi-az" + # The zone aware replication doesn't yet make a lot of difference, since it is not used at query side yet. This is + # however planned in an upcoming release, and therefore it's best to have this configuration already enabled. + zoneAwareReplication: + enabled: true + topologyKey: "topology.kubernetes.io/zone" # This generates default anti-affinity rules + zones: # Zone list has to be fully redefined for modification. Update with you actual zones or skip to use logical zones only. + - name: zone-a + nodeSelector: + topology.kubernetes.io/zone: eu-west-1a + - name: zone-b + nodeSelector: + topology.kubernetes.io/zone: eu-west-1b + - name: zone-c + nodeSelector: + topology.kubernetes.io/zone: eu-west-1c + compression: + enabled: true + +nginx: + replicas: 1 + priorityClassName: "mandatory-rescheduling-priority-multi-az" + ingress: + enabled: true + hosts: + - host: "mimir.multi-az.test.ngdata.com" + paths: + - path: / + pathType: Prefix + tls: + # empty, disabled. + +# Disable Minio, we use S3 storage instead +minio: + enabled: false + replicas: 0 + +# The Alert manager is currently not used. When enabling, it has to be configured for zone aware replication similar to +# monolithic setup. +alertmanager: + enabled: false \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/_helpers.tpl b/operations/helm/charts/mimir-distributed/templates/_helpers.tpl index 15efff476ae..77f3c6912e3 100644 --- a/operations/helm/charts/mimir-distributed/templates/_helpers.tpl +++ b/operations/helm/charts/mimir-distributed/templates/_helpers.tpl @@ -437,6 +437,7 @@ Examples: */}} {{- define "mimir.componentSectionFromName" -}} {{- $componentsMap := dict + "monolithic" "monolithic" "admin-api" "admin_api" "admin-cache" "admin-cache" "alertmanager" "alertmanager" @@ -487,6 +488,7 @@ mimir.vaultAgent.annotations takes 2 arguments */}} {{- define "mimir.vaultAgent.annotations" -}} {{- $vaultEnabledComponents := dict + "monolithic" true "admin-api" true "alertmanager" true "compactor" true @@ -577,7 +579,7 @@ which allows us to keep generating everything for the default zone. {{- end -}} {{- $requestedReplicas := $componentSection.replicas -}} -{{- if and (has .component (list "ingester" "alertmanager")) $componentSection.zoneAwareReplication.migration.enabled (not $componentSection.zoneAwareReplication.migration.writePath) -}} +{{- if and (has .component (list "monolithic" "ingester" "alertmanager")) $componentSection.zoneAwareReplication.migration.enabled (not $componentSection.zoneAwareReplication.migration.writePath) -}} {{- $requestedReplicas = $componentSection.zoneAwareReplication.migration.replicas }} {{- end -}} {{- $replicaPerZone := div (add $requestedReplicas $numberOfZones -1) $numberOfZones -}} diff --git a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-config.yaml b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-config.yaml index a6e1b19162c..4b02bda9265 100644 --- a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-config.yaml +++ b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-config.yaml @@ -1,3 +1,4 @@ +{{- if has .Values.deploymentMode (list "microservices" "monolithic")}} {{- if and .Values.alertmanager.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- if .Values.alertmanager.fallbackConfig -}} apiVersion: v1 @@ -14,3 +15,4 @@ data: {{- .Values.alertmanager.fallbackConfig | nindent 4 }} {{- end -}} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-dep.yaml b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-dep.yaml index ab564d2f3b4..79917757a52 100644 --- a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-dep.yaml +++ b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-dep.yaml @@ -1,3 +1,4 @@ +{{- if has .Values.deploymentMode (list "microservices" "monolithic")}} {{- if and .Values.alertmanager.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- if not .Values.alertmanager.statefulSet.enabled -}} apiVersion: apps/v1 @@ -165,3 +166,4 @@ spec: {{- end }} {{- end -}} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-pdb.yaml index 6b69919aa1f..c693104f268 100644 --- a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-pdb.yaml @@ -1,3 +1,5 @@ +{{- if has .Values.deploymentMode (list "microservices" "monolithic")}} {{- if and .Values.alertmanager.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "alertmanager" "memberlist" true) }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-servmon.yaml index 83b3a6553c5..da18ffa8f1e 100644 --- a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-servmon.yaml @@ -1,3 +1,5 @@ +{{- if has .Values.deploymentMode (list "microservices" "monolithic")}} {{- if and .Values.alertmanager.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "alertmanager" "memberlist" true) }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml index d312fdf91d3..68380e5c5cb 100644 --- a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml @@ -1,3 +1,4 @@ +{{- if has .Values.deploymentMode (list "microservices" "monolithic")}} {{- if and .Values.alertmanager.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- if .Values.alertmanager.statefulSet.enabled -}} {{- $args := dict "ctx" . "component" "alertmanager" "memberlist" true -}} @@ -230,3 +231,4 @@ spec: {{ end }} {{ end }} {{ end }} +{{ end }} diff --git a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-svc-headless.yaml index 78a2267c522..ccd4011652c 100644 --- a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-svc-headless.yaml +++ b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-svc-headless.yaml @@ -1,3 +1,4 @@ +{{- if has .Values.deploymentMode (list "microservices" "monolithic")}} {{- if and .Values.alertmanager.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- $clusterPort := regexReplaceAll ".+[:]" (default "0.0.0.0:9094" (include "mimir.alertmanagerClusterBindAddress" .) ) "" -}} apiVersion: v1 @@ -32,3 +33,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "alertmanager" "memberlist" true) | nindent 4 }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-svc.yaml b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-svc.yaml index a511f5c3bb7..581ccbc9be4 100644 --- a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-svc.yaml @@ -1,3 +1,4 @@ +{{- if has .Values.deploymentMode (list "microservices" "monolithic")}} {{- if and .Values.alertmanager.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- $args := dict "ctx" . "component" "alertmanager" "memberlist" true -}} {{- $zonesMap := include "mimir.zoneAwareReplicationMap" $args | fromYaml -}} @@ -41,3 +42,4 @@ spec: {{ end }} {{ end }} {{ end }} +{{ end }} diff --git a/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-pdb.yaml index ede7b03f5cd..df2f5700400 100644 --- a/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if index .Values "chunks-cache" "enabled" }} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "chunks-cache") }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-servmon.yaml index 1e28405954c..532fd2f4fc6 100644 --- a/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if index .Values "chunks-cache" "enabled" }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "chunks-cache") }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-statefulset.yaml index 3a836f7167e..7becd76eab2 100644 --- a/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-statefulset.yaml @@ -1 +1,3 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- include "mimir.memcached.statefulSet" (dict "ctx" $ "component" "chunks-cache" ) }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-svc-headless.yaml index d2ece24830c..36fd43e250c 100644 --- a/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-svc-headless.yaml +++ b/operations/helm/charts/mimir-distributed/templates/chunks-cache/chunks-cache-svc-headless.yaml @@ -1 +1,3 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- include "mimir.memcached.service" (dict "ctx" $ "component" "chunks-cache" ) }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/compactor/compactor-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/compactor/compactor-pdb.yaml index d6577555b64..ea02fb2bc28 100644 --- a/operations/helm/charts/mimir-distributed/templates/compactor/compactor-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/compactor/compactor-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.compactor.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "compactor" "memberlist" true) }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/compactor/compactor-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/compactor/compactor-servmon.yaml index bc22a4668d2..9764f202a6e 100644 --- a/operations/helm/charts/mimir-distributed/templates/compactor/compactor-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/compactor/compactor-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.compactor.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "compactor" "memberlist" true) }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/compactor/compactor-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/compactor/compactor-statefulset.yaml index 915e77cef68..473b38e779d 100644 --- a/operations/helm/charts/mimir-distributed/templates/compactor/compactor-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/compactor/compactor-statefulset.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.compactor.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: apps/v1 kind: StatefulSet @@ -188,3 +189,4 @@ spec: {{- end }} {{- end }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/compactor/compactor-svc.yaml b/operations/helm/charts/mimir-distributed/templates/compactor/compactor-svc.yaml index 5f768404f1e..d2f9b51f256 100644 --- a/operations/helm/charts/mimir-distributed/templates/compactor/compactor-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/compactor/compactor-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.compactor.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: v1 kind: Service @@ -28,3 +29,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "compactor" "memberlist" true) | nindent 4 }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/distributor/distributor-dep.yaml b/operations/helm/charts/mimir-distributed/templates/distributor/distributor-dep.yaml index c9e20a69293..7bc0e64eaca 100644 --- a/operations/helm/charts/mimir-distributed/templates/distributor/distributor-dep.yaml +++ b/operations/helm/charts/mimir-distributed/templates/distributor/distributor-dep.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.distributor.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: apps/v1 kind: Deployment @@ -178,3 +179,4 @@ spec: - name: active-queries emptyDir: {} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/distributor/distributor-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/distributor/distributor-pdb.yaml index 9e687814383..7fea19ba30d 100644 --- a/operations/helm/charts/mimir-distributed/templates/distributor/distributor-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/distributor/distributor-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.distributor.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "distributor" "memberlist" true) }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/distributor/distributor-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/distributor/distributor-servmon.yaml index 455d9f21fd8..8dbfb267056 100644 --- a/operations/helm/charts/mimir-distributed/templates/distributor/distributor-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/distributor/distributor-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.distributor.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "distributor" "memberlist" true) }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/distributor/distributor-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/distributor/distributor-svc-headless.yaml index aae207d8596..4c7ddacfdff 100644 --- a/operations/helm/charts/mimir-distributed/templates/distributor/distributor-svc-headless.yaml +++ b/operations/helm/charts/mimir-distributed/templates/distributor/distributor-svc-headless.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.distributor.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: v1 kind: Service @@ -27,3 +28,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "distributor" "memberlist" true) | nindent 4 }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/distributor/distributor-svc.yaml b/operations/helm/charts/mimir-distributed/templates/distributor/distributor-svc.yaml index 1f3741f2c80..dbd68d0b95b 100644 --- a/operations/helm/charts/mimir-distributed/templates/distributor/distributor-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/distributor/distributor-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.distributor.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: v1 kind: Service @@ -28,3 +29,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "distributor" "memberlist" true) | nindent 4 }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-dep.yaml b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-dep.yaml index 3792a941b6d..2c9fa67a85a 100644 --- a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-dep.yaml +++ b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-dep.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if (eq (include "mimir.gateway.isEnabled" .) "true") }} {{- with .Values.gateway }} {{- $isGEMGateway := $.Values.enterprise.enabled -}} @@ -194,3 +195,4 @@ spec: {{- end }} {{- end -}} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-ingress.yaml b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-ingress.yaml index b6880deb5a1..098ca2dcff1 100644 --- a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-ingress.yaml +++ b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-ingress.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and (eq (include "mimir.gateway.isEnabled" .) "true") .Values.gateway.ingress.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress @@ -42,3 +43,4 @@ spec: {{- end }} {{- end }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-pdb.yaml index 98ed873ef38..c161ff99e06 100644 --- a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if eq (include "mimir.gateway.isEnabled" .) "true" -}} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "gateway") }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-route.yaml b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-route.yaml index a8a08878105..a5882978cb1 100644 --- a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-route.yaml +++ b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-route.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if .Values.gateway.route.enabled }} kind: Route apiVersion: route.openshift.io/v1 @@ -23,3 +24,4 @@ spec: {{- toYaml . | nindent 4 }} {{- end }} {{- end }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-servmon.yaml index 1902f737b64..b1b9983b321 100644 --- a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and (eq (include "mimir.gateway.isEnabled" .) "true") (not .Values.gateway.enabledNonEnterprise) -}} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "gateway") }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-svc.yaml b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-svc.yaml index 88032a5f723..f319351ad83 100644 --- a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if eq (include "mimir.gateway.isEnabled" .) "true" -}} apiVersion: v1 kind: Service @@ -39,3 +40,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" $ "component" "gateway") | nindent 4 }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-v2-hpa.yaml b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-v2-hpa.yaml index b6ae5265762..a2b99e5943e 100644 --- a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-v2-hpa.yaml +++ b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-v2-hpa.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if .Values.gateway.autoscaling.enabled }} {{- if eq (include "mimir.hpa.version" .) "autoscaling/v2" }} apiVersion: autoscaling/v2 @@ -33,3 +34,4 @@ spec: {{- end }} {{- end -}} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-v2beta1-hpa.yaml b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-v2beta1-hpa.yaml index 90e08cc9016..bff5de5f79f 100644 --- a/operations/helm/charts/mimir-distributed/templates/gateway/gateway-v2beta1-hpa.yaml +++ b/operations/helm/charts/mimir-distributed/templates/gateway/gateway-v2beta1-hpa.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if .Values.gateway.autoscaling.enabled }} {{- if eq (include "mimir.hpa.version" .) "autoscaling/v2beta1" }} apiVersion: autoscaling/v2beta1 @@ -29,3 +30,4 @@ spec: {{- end }} {{- end -}} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/gateway/nginx-configmap.yaml b/operations/helm/charts/mimir-distributed/templates/gateway/nginx-configmap.yaml index 8a24a4efead..08ac60fcf2f 100644 --- a/operations/helm/charts/mimir-distributed/templates/gateway/nginx-configmap.yaml +++ b/operations/helm/charts/mimir-distributed/templates/gateway/nginx-configmap.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and (not .Values.enterprise.enabled) .Values.gateway.enabledNonEnterprise -}} apiVersion: v1 kind: ConfigMap @@ -10,3 +11,4 @@ data: nginx.conf: | {{- tpl .Values.gateway.nginx.config.file . | nindent 4 }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/gateway/nginx-secret.yaml b/operations/helm/charts/mimir-distributed/templates/gateway/nginx-secret.yaml index 15402738a00..1696cc78e01 100644 --- a/operations/helm/charts/mimir-distributed/templates/gateway/nginx-secret.yaml +++ b/operations/helm/charts/mimir-distributed/templates/gateway/nginx-secret.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if not .Values.enterprise.enabled -}} {{- if and .Values.gateway.enabledNonEnterprise .Values.gateway.nginx.basicAuth.enabled (not .Values.gateway.nginx.basicAuth.existingSecret) }} apiVersion: v1 @@ -12,3 +13,4 @@ stringData: {{- tpl .Values.gateway.nginx.basicAuth.htpasswd $ | nindent 4 }} {{- end -}} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-pdb.yaml index 0d0232d0ed0..cd728495502 100644 --- a/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if index .Values "index-cache" "enabled" }} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "index-cache") }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-servmon.yaml index 3fc39b0fd7d..44c2033d808 100644 --- a/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if index .Values "index-cache" "enabled" }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "index-cache") }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-statefulset.yaml index 98362eea512..80fd4f6a84b 100644 --- a/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-statefulset.yaml @@ -1 +1,3 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- include "mimir.memcached.statefulSet" (dict "ctx" $ "component" "index-cache" ) }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-svc-headless.yaml index b86b205bd9b..43d52c7fe77 100644 --- a/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-svc-headless.yaml +++ b/operations/helm/charts/mimir-distributed/templates/index-cache/index-cache-svc-headless.yaml @@ -1 +1,3 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- include "mimir.memcached.service" (dict "ctx" $ "component" "index-cache" ) }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-pdb.yaml index c1ea31376df..8f7c709b781 100644 --- a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.ingester.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "ingester" "memberlist" true) }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-servmon.yaml index 9aa3e1cb9db..6fea54bfc04 100644 --- a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.ingester.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "ingester" "memberlist" true) }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml index ff4d817c4fe..5ea145c6add 100644 --- a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.ingester.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- $args := dict "ctx" . "component" "ingester" "memberlist" true -}} {{- $zonesMap := include "mimir.zoneAwareReplicationMap" $args | fromYaml -}} @@ -218,3 +219,4 @@ spec: {{ end }} {{ end }} {{ end }} +{{ end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-svc-headless.yaml index c0e572e42c9..87c8a5d52ed 100644 --- a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-svc-headless.yaml +++ b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-svc-headless.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.ingester.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: v1 kind: Service @@ -27,3 +28,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "ingester" "memberlist" true) | nindent 4 }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-svc.yaml b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-svc.yaml index 7ed6bd2d66c..e7992e8fb4d 100644 --- a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.ingester.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- $args := dict "ctx" . "component" "ingester" "memberlist" true -}} {{- $zonesMap := include "mimir.zoneAwareReplicationMap" $args | fromYaml -}} @@ -41,3 +42,4 @@ spec: {{ end }} {{ end }} {{ end }} +{{ end }} diff --git a/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-pdb.yaml index dc03f8ebfc2..95473108bca 100644 --- a/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if index .Values "metadata-cache" "enabled" }} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "metadata-cache" ) }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-servmon.yaml index c6d9139db25..45951c3d075 100644 --- a/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if index .Values "metadata-cache" "enabled" }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "metadata-cache") }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-statefulset.yaml index 5a73fe4f42c..d3fd26e8aa1 100644 --- a/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-statefulset.yaml @@ -1 +1,3 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- include "mimir.memcached.statefulSet" (dict "ctx" $ "component" "metadata-cache" ) }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-svc-headless.yaml index 5cc5ad6b106..5314389c676 100644 --- a/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-svc-headless.yaml +++ b/operations/helm/charts/mimir-distributed/templates/metadata-cache/metadata-cache-svc-headless.yaml @@ -1 +1,3 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- include "mimir.memcached.service" (dict "ctx" $ "component" "metadata-cache" ) }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-pdb.yaml new file mode 100644 index 00000000000..3094cc43d4c --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-pdb.yaml @@ -0,0 +1,3 @@ +{{- if eq .Values.deploymentMode "monolithic" }} +{{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "monolithic" "memberlist" true) }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-servmon.yaml new file mode 100644 index 00000000000..a36c71b111a --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-servmon.yaml @@ -0,0 +1,3 @@ +{{- if eq .Values.deploymentMode "monolithic" }} +{{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "monolithic" "memberlist" true) }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-statefulset.yaml new file mode 100644 index 00000000000..a0118ccfdb2 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-statefulset.yaml @@ -0,0 +1,233 @@ +{{- if eq .Values.deploymentMode "monolithic" }} +{{- $args := dict "ctx" . "component" "monolithic" "memberlist" true -}} +{{- $zonesMap := include "mimir.zoneAwareReplicationMap" $args | fromYaml -}} +{{- range $zoneName, $rolloutZone := $zonesMap }} +{{- with $ -}} +{{- $_ := set $args "rolloutZoneName" $zoneName -}} +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ include "mimir.resourceName" $args }} + labels: + {{- include "mimir.labels" $args | nindent 4 }} + annotations: + {{- include "mimir.componentAnnotations" $args | nindent 4 }} + namespace: {{ .Release.Namespace | quote }} +spec: + podManagementPolicy: {{ .Values.monolithic.podManagementPolicy }} + replicas: {{ $rolloutZone.replicas }} + {{- if and (semverCompare ">= 1.23-0" (include "mimir.kubeVersion" .)) (.Values.monolithic.persistentVolume.enableRetentionPolicy) }} + persistentVolumeClaimRetentionPolicy: + whenDeleted: {{ .Values.monolithic.persistentVolume.whenDeleted }} + whenScaled: {{ .Values.monolithic.persistentVolume.whenScaled }} + {{- end }} + selector: + matchLabels: + {{- include "mimir.selectorLabels" $args | nindent 6 }} + updateStrategy: + {{- if $zoneName }} + type: OnDelete + {{- else }} + {{- toYaml .Values.monolithic.statefulStrategy | nindent 4 }} + {{- end }} + serviceName: {{ template "mimir.fullname" . }}-monolithic{{- if not .Values.enterprise.legacyLabels -}}-headless{{- end -}} + {{- if .Values.monolithic.persistentVolume.enabled }} + volumeClaimTemplates: + - apiVersion: v1 + kind: PersistentVolumeClaim + metadata: + name: storage + {{- if .Values.monolithic.persistentVolume.annotations }} + annotations: + {{- toYaml .Values.monolithic.persistentVolume.annotations | nindent 10 }} + {{- end }} + spec: + {{- $storageClass := default .Values.monolithic.persistentVolume.storageClass $rolloutZone.storageClass }} + {{- if $storageClass }} + {{- if (eq "-" $storageClass) }} + storageClassName: "" + {{- else }} + storageClassName: {{ $storageClass }} + {{- end }} + {{- end }} + accessModes: + {{- toYaml .Values.monolithic.persistentVolume.accessModes | nindent 10 }} + resources: + requests: + storage: "{{ .Values.monolithic.persistentVolume.size }}" + {{- end }} + template: + metadata: + labels: + {{- include "mimir.podLabels" $args | nindent 8 }} + annotations: + {{- include "mimir.podAnnotations" $args | nindent 8 }} + namespace: {{ .Release.Namespace | quote }} + spec: + {{- with .Values.monolithic.schedulerName }} + schedulerName: {{ . | quote }} + {{- end }} + serviceAccountName: {{ template "mimir.serviceAccountName" . }} + {{- if .Values.monolithic.priorityClassName }} + priorityClassName: {{ .Values.monolithic.priorityClassName }} + {{- end }} + securityContext: + {{- include "mimir.lib.podSecurityContext" $args | nindent 8 }} + {{- with .Values.monolithic.initContainers }} + initContainers: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} + {{- with $rolloutZone.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with $rolloutZone.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- include "mimir.lib.topologySpreadConstraints" (dict "ctx" . "component" "monolithic") | nindent 6 }} + {{- with .Values.monolithic.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + terminationGracePeriodSeconds: {{ .Values.monolithic.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 not .Values.monolithic.persistentVolume.enabled }} + - name: storage + emptyDir: {} + {{- end }} + {{- if .Values.monolithic.extraVolumes }} + {{ toYaml .Values.monolithic.extraVolumes | nindent 8 }} + {{- end }} + {{- if .Values.global.extraVolumes }} + {{ toYaml .Values.global.extraVolumes | nindent 8 }} + {{- end }} + - name: active-queries + emptyDir: {} + containers: + {{- if .Values.monolithic.extraContainers }} + {{ toYaml .Values.monolithic.extraContainers | nindent 8 }} + {{- end }} + - name: monolithic + image: "{{ include "mimir.imageReference" . }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + - "-target=all" + - "-config.expand-env=true" + - "-config.file=/etc/mimir/mimir.yaml" + {{- if $zoneName }} + - "-ingester.ring.instance-availability-zone={{ $zoneName }}" + - "-store-gateway.sharding-ring.instance-availability-zone={{ $zoneName }}" + {{- else }} + - "-ingester.ring.instance-availability-zone=zone-default" + {{- if .Values.monolithic.zoneAwareReplication.migration.enabled }} + - "-blocks-storage.tsdb.flush-blocks-on-shutdown=true" + - "-ingester.ring.unregister-on-shutdown=true" + - "-store-gateway.sharding-ring.prefix=collectors/" + - "-store-gateway.sharding-ring.zone-awareness-enabled=false" + {{- end }} + - "-server.grpc-max-concurrent-streams=500" + {{- end }} + - "-server.grpc.keepalive.max-connection-age=60s" + - "-server.grpc.keepalive.max-connection-age-grace=5m" + - "-server.grpc.keepalive.max-connection-idle=1m" + {{- if .Values.monolithic.compression.enabled }} + - "-query-frontend.grpc-client-config.grpc-compression={{ .Values.monolithic.compression.algorithm }}" + - "-query-scheduler.grpc-client-config.grpc-compression={{ .Values.monolithic.compression.algorithm }}" + - "-ruler.client.grpc-compression={{ .Values.monolithic.compression.algorithm }}" + - "-ruler.query-frontend.grpc-client-config.grpc-compression={{ .Values.monolithic.compression.algorithm }}" + - "-ingester.client.grpc-compression={{ .Values.monolithic.compression.algorithm }}" + {{- end }} + {{- range $key, $value := .Values.monolithic.extraArgs }} + - "-{{ $key }}={{ $value }}" + {{- end }} + volumeMounts: + {{- if .Values.monolithic.extraVolumeMounts }} + {{ toYaml .Values.monolithic.extraVolumeMounts | nindent 12}} + {{- end }} + {{- if .Values.global.extraVolumeMounts }} + {{ toYaml .Values.global.extraVolumeMounts | nindent 12}} + {{- end }} + - name: config + mountPath: /etc/mimir + - name: runtime-config + mountPath: /var/{{ include "mimir.name" . }} + - name: storage + mountPath: "/data" + {{- if .Values.monolithic.persistentVolume.subPath }} + subPath: {{ .Values.monolithic.persistentVolume.subPath }} + {{- end }} + {{- if .Values.enterprise.enabled }} + - name: license + mountPath: /license + {{- 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 + - name: memberlist + containerPort: {{ include "mimir.memberlistBindPort" . }} + protocol: TCP + livenessProbe: + {{- toYaml .Values.monolithic.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.monolithic.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.monolithic.resources | nindent 12 }} + securityContext: + {{- toYaml .Values.monolithic.containerSecurityContext | nindent 12 }} + {{- $jaeger_queue_size := dig "jaegerReporterMaxQueueSize" nil .Values.monolithic }} + {{- if or .Values.global.extraEnv .Values.monolithic.env $jaeger_queue_size }} + env: + {{- $cpu_request := dig "requests" "cpu" nil .Values.monolithic.resources }} + {{- if $cpu_request }} + {{- $cpu_request_between_3_and_6 := include "mimir.parseCPU" (dict "value" $cpu_request) | float64 | min 6 | max 3 }} + {{/* copy logic from operations/mimir/ingester.libsonnet */}} + - name: "GOMAXPROCS" + value: {{ addf $cpu_request $cpu_request_between_3_and_6 1 | ceil | toString | toYaml }} + {{- end }} + {{- with .Values.global.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.monolithic.env }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- if $jaeger_queue_size }} + - name: "JAEGER_REPORTER_MAX_QUEUE_SIZE" + value: {{$jaeger_queue_size | toString | toYaml }} + {{- end }} + {{- end }} + {{- if or .Values.global.extraEnvFrom .Values.monolithic.extraEnvFrom }} + envFrom: + {{- with .Values.global.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.monolithic.extraEnvFrom }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} +--- +{{ end }} +{{ end }} +{{ end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-svc-headless.yaml new file mode 100644 index 00000000000..3520dbd8f89 --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-svc-headless.yaml @@ -0,0 +1,30 @@ +{{- if eq .Values.deploymentMode "monolithic" }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "monolithic") }}-headless + labels: + {{- include "mimir.labels" (dict "ctx" . "component" "monolithic" "memberlist" true) | nindent 4 }} + prometheus.io/service-monitor: "false" + {{- with .Values.monolithic.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- toYaml .Values.monolithic.service.annotations | nindent 4 }} + namespace: {{ .Release.Namespace | quote }} +spec: + type: ClusterIP + clusterIP: None + 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" "monolithic" "memberlist" true) | nindent 4 }} + publishNotReadyAddresses: true +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-svc.yaml b/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-svc.yaml new file mode 100644 index 00000000000..868230e804e --- /dev/null +++ b/operations/helm/charts/mimir-distributed/templates/monolithic/monolithic-svc.yaml @@ -0,0 +1,43 @@ +{{- if eq .Values.deploymentMode "monolithic" }} +{{- $args := dict "ctx" . "component" "monolithic" "memberlist" true -}} +{{- $zonesMap := include "mimir.zoneAwareReplicationMap" $args | fromYaml -}} +{{- range $zoneName, $rolloutZone := $zonesMap }} +{{- with $ -}} +{{- $_ := set $args "rolloutZoneName" $zoneName -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "mimir.resourceName" $args }} + labels: + {{- include "mimir.labels" $args | nindent 4 }} + {{- if and $zoneName .Values.monolithic.zoneAwareReplication.migration.enabled }} + # Prevent scraping PODs via this service during migration as the original non zone-aware service already scrapes all PODs and you get duplicate metrics. + prometheus.io/service-monitor: "false" + {{- end }} + {{- with .Values.monolithic.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- toYaml .Values.monolithic.service.annotations | nindent 4 }} + namespace: {{ .Release.Namespace | quote }} +spec: + type: {{ .Values.monolithic.service.type }} + {{- if semverCompare ">= 1.22-0" (include "mimir.kubeVersion" .) }} + internalTrafficPolicy: {{ .Values.monolithic.service.internalTrafficPolicy }} + {{- end }} + 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" $args | nindent 4 }} + +--- +{{ end }} +{{ end }} +{{ end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/nginx/ingress.yaml b/operations/helm/charts/mimir-distributed/templates/nginx/ingress.yaml index 1ca7da7f719..c34d4dc6f6c 100644 --- a/operations/helm/charts/mimir-distributed/templates/nginx/ingress.yaml +++ b/operations/helm/charts/mimir-distributed/templates/nginx/ingress.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if not .Values.enterprise.enabled -}} {{- if .Values.nginx.enabled -}} {{- if .Values.nginx.ingress.enabled -}} @@ -46,3 +47,4 @@ spec: {{- end -}} {{- end -}} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-configmap.yaml b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-configmap.yaml index 2f4ebefa8cd..d8015daee9b 100644 --- a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-configmap.yaml +++ b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-configmap.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if not .Values.enterprise.enabled -}} {{- if .Values.nginx.enabled }} apiVersion: v1 @@ -12,3 +13,4 @@ data: {{- tpl .Values.nginx.nginxConfig.file . | nindent 4 }} {{- end -}} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-dep.yaml b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-dep.yaml index 0148dda6640..ec16adad4a2 100644 --- a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-dep.yaml +++ b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-dep.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if not .Values.enterprise.enabled -}} {{- if .Values.nginx.enabled }} apiVersion: apps/v1 @@ -140,3 +141,4 @@ spec: {{- end }} {{- end -}} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-pdb.yaml index 712a665c72d..bf3a4bef76c 100644 --- a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.nginx.enabled (not .Values.enterprise.enabled) -}} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "nginx") }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-secret.yaml b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-secret.yaml index 3bb1d01fa2c..1676b361e48 100644 --- a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-secret.yaml +++ b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-secret.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if not .Values.enterprise.enabled -}} {{- if and .Values.nginx.enabled .Values.nginx.basicAuth.enabled (not .Values.nginx.basicAuth.existingSecret) }} apiVersion: v1 @@ -12,3 +13,4 @@ stringData: {{- tpl .Values.nginx.basicAuth.htpasswd $ | nindent 4 }} {{- end -}} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-svc.yaml b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-svc.yaml index cb87a760daf..2d2a4740f05 100644 --- a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if not .Values.enterprise.enabled -}} {{- if .Values.nginx.enabled }} apiVersion: v1 @@ -35,3 +36,4 @@ spec: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "nginx") | nindent 4 }} {{- end -}} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-v2-hpa.yaml b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-v2-hpa.yaml index 3b7e022cce3..9db1df80859 100644 --- a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-v2-hpa.yaml +++ b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-v2-hpa.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if not .Values.enterprise.enabled -}} {{- if .Values.nginx.autoscaling.enabled }} {{- if eq (include "mimir.hpa.version" .) "autoscaling/v2" }} @@ -35,3 +36,4 @@ spec: {{- end -}} {{- end -}} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-v2beta1-hpa.yaml b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-v2beta1-hpa.yaml index 9ce76db5eee..a3a886a80ef 100644 --- a/operations/helm/charts/mimir-distributed/templates/nginx/nginx-v2beta1-hpa.yaml +++ b/operations/helm/charts/mimir-distributed/templates/nginx/nginx-v2beta1-hpa.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if not .Values.enterprise.enabled -}} {{- if .Values.nginx.autoscaling.enabled }} {{- if eq (include "mimir.hpa.version" .) "autoscaling/v2beta1" }} @@ -31,3 +32,4 @@ spec: {{- end -}} {{- end -}} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/nginx/route.yaml b/operations/helm/charts/mimir-distributed/templates/nginx/route.yaml index 4eb3645b8c2..6e0de04434f 100644 --- a/operations/helm/charts/mimir-distributed/templates/nginx/route.yaml +++ b/operations/helm/charts/mimir-distributed/templates/nginx/route.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if .Values.nginx.route.enabled }} kind: Route apiVersion: route.openshift.io/v1 @@ -23,3 +24,4 @@ spec: {{- toYaml .Values.nginx.route.tls | nindent 4 }} {{- end }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-dep.yaml b/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-dep.yaml index b73b73cdc9f..1eb3b03074f 100644 --- a/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-dep.yaml +++ b/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-dep.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.overrides_exporter.enabled (not .Values.federation_frontend.disableOtherComponents) -}} apiVersion: apps/v1 kind: Deployment @@ -149,3 +150,4 @@ spec: - name: active-queries emptyDir: {} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-pdb.yaml index 9163f567626..64a35c13a91 100644 --- a/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.overrides_exporter.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "overrides-exporter") }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-servmon.yaml index ca149f871bc..4ce7bee4aef 100644 --- a/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.overrides_exporter.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "overrides-exporter") }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-svc.yaml b/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-svc.yaml index 3f26a9689c9..46a654a78ab 100644 --- a/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/overrides-exporter/overrides-exporter-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.overrides_exporter.enabled (not .Values.federation_frontend.disableOtherComponents) -}} apiVersion: v1 kind: Service @@ -28,3 +29,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "overrides-exporter") | nindent 4 }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/querier/querier-dep.yaml b/operations/helm/charts/mimir-distributed/templates/querier/querier-dep.yaml index 1565a59ab5c..8a90c0012df 100644 --- a/operations/helm/charts/mimir-distributed/templates/querier/querier-dep.yaml +++ b/operations/helm/charts/mimir-distributed/templates/querier/querier-dep.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.querier.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: apps/v1 kind: Deployment @@ -174,3 +175,4 @@ spec: - name: active-queries emptyDir: {} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/querier/querier-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/querier/querier-pdb.yaml index 1d751cb44a3..4f1ef4035ff 100644 --- a/operations/helm/charts/mimir-distributed/templates/querier/querier-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/querier/querier-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.querier.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "querier" "memberlist" true) }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/querier/querier-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/querier/querier-servmon.yaml index a6deb23cdf6..98ca26e1e29 100644 --- a/operations/helm/charts/mimir-distributed/templates/querier/querier-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/querier/querier-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.querier.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "querier" "memberlist" true) }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/querier/querier-svc.yaml b/operations/helm/charts/mimir-distributed/templates/querier/querier-svc.yaml index 309b49730f6..5c534795632 100644 --- a/operations/helm/charts/mimir-distributed/templates/querier/querier-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/querier/querier-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.querier.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: v1 kind: Service @@ -28,3 +29,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "querier" "memberlist" true) | nindent 4 }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-dep.yaml b/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-dep.yaml index 3a7744dd933..5fff530f93a 100644 --- a/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-dep.yaml +++ b/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-dep.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.query_frontend.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: apps/v1 kind: Deployment @@ -157,3 +158,4 @@ spec: - name: active-queries emptyDir: {} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-pdb.yaml index 1fccdc70f48..fc1517401cb 100644 --- a/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.query_frontend.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "query-frontend") }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-servmon.yaml index 4319756f116..d3b1fc92f7c 100644 --- a/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.query_frontend.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "query-frontend") }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-svc-headless.yaml index 6fd0ef2c9a9..d0eeb1a5372 100644 --- a/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-svc-headless.yaml +++ b/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-svc-headless.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and (not .Values.query_scheduler.enabled) .Values.query_frontend.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: v1 kind: Service @@ -28,3 +29,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "query-frontend") | nindent 4 }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-svc.yaml b/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-svc.yaml index b4a704bd39e..3e0fd90de5d 100644 --- a/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/query-frontend/query-frontend-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.query_frontend.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: v1 kind: Service @@ -28,3 +29,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "query-frontend") | nindent 4 }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-dep.yaml b/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-dep.yaml index 92722e0a200..5c560190353 100644 --- a/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-dep.yaml +++ b/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-dep.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.query_scheduler.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: apps/v1 kind: Deployment @@ -148,3 +149,4 @@ spec: - name: active-queries emptyDir: {} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-pdb.yaml index cac40d9f1ca..f68e19e81a7 100644 --- a/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-pdb.yaml @@ -1,3 +1,6 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.query_scheduler.enabled .Values.query_scheduler.podDisruptionBudget (not .Values.federation_frontend.disableOtherComponents) -}} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "query-scheduler") }} {{- end -}} +{{- end }} + diff --git a/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-servmon.yaml index e243879b58c..d36eab39945 100644 --- a/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.query_scheduler.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "query-scheduler") }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-svc-headless.yaml index f79753c3ddd..282baaa75bb 100644 --- a/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-svc-headless.yaml +++ b/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-svc-headless.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.query_scheduler.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: v1 kind: Service @@ -28,3 +29,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "query-scheduler") | nindent 4 }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-svc.yaml b/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-svc.yaml index 0aebe04c39d..f46ffae17e1 100644 --- a/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/query-scheduler/query-scheduler-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.query_scheduler.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: v1 kind: Service @@ -28,3 +29,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "query-scheduler") | nindent 4 }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-pdb.yaml index 097cff9e0db..bcddd720c4c 100644 --- a/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if index .Values "results-cache" "enabled" }} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "results-cache") }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-servmon.yaml index 6b143927a9a..66b7e901223 100644 --- a/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if index .Values "results-cache" "enabled" }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "results-cache") }} {{- end -}} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-statefulset.yaml index 8689c85b34b..e4609ac1867 100644 --- a/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-statefulset.yaml @@ -1 +1,3 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- include "mimir.memcached.statefulSet" (dict "ctx" $ "component" "results-cache" ) }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-svc-headless.yaml index 1cdec3328fe..c650cf7d9bf 100644 --- a/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-svc-headless.yaml +++ b/operations/helm/charts/mimir-distributed/templates/results-cache/results-cache-svc-headless.yaml @@ -1 +1,3 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- include "mimir.memcached.service" (dict "ctx" $ "component" "results-cache" ) }} +{{- end }} \ No newline at end of file diff --git a/operations/helm/charts/mimir-distributed/templates/ruler/ruler-dep.yaml b/operations/helm/charts/mimir-distributed/templates/ruler/ruler-dep.yaml index 8cba3ece759..7572690a45b 100644 --- a/operations/helm/charts/mimir-distributed/templates/ruler/ruler-dep.yaml +++ b/operations/helm/charts/mimir-distributed/templates/ruler/ruler-dep.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.ruler.enabled (not .Values.federation_frontend.disableOtherComponents) -}} apiVersion: apps/v1 kind: Deployment @@ -169,3 +170,4 @@ spec: - name: active-queries emptyDir: {} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler/ruler-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/ruler/ruler-pdb.yaml index 206e16189f2..5a546329fb9 100644 --- a/operations/helm/charts/mimir-distributed/templates/ruler/ruler-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/ruler/ruler-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.ruler.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "ruler" "memberlist" true) }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler/ruler-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/ruler/ruler-servmon.yaml index 2e092b944b1..ba3e746c539 100644 --- a/operations/helm/charts/mimir-distributed/templates/ruler/ruler-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/ruler/ruler-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.ruler.enabled (not .Values.federation_frontend.disableOtherComponents) -}} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "ruler" "memberlist" true) }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/ruler/ruler-svc.yaml b/operations/helm/charts/mimir-distributed/templates/ruler/ruler-svc.yaml index 77709c445e0..4e8f778ae5e 100644 --- a/operations/helm/charts/mimir-distributed/templates/ruler/ruler-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/ruler/ruler-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.ruler.enabled (not .Values.federation_frontend.disableOtherComponents) -}} apiVersion: v1 kind: Service @@ -24,3 +25,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "ruler" "memberlist" true) | nindent 4 }} {{- end -}} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-pdb.yaml b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-pdb.yaml index 52eb204b278..4a3bee3a786 100644 --- a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-pdb.yaml +++ b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-pdb.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.store_gateway.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.podDisruptionBudget" (dict "ctx" $ "component" "store-gateway" "memberlist" true) }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-servmon.yaml b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-servmon.yaml index 2bba8fc9f10..2db40e3c419 100644 --- a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-servmon.yaml +++ b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-servmon.yaml @@ -1,3 +1,5 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.store_gateway.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- include "mimir.lib.serviceMonitor" (dict "ctx" $ "component" "store-gateway" "memberlist" true) }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml index 994ed8539b8..1c703e54259 100644 --- a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.store_gateway.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- $args := dict "ctx" $ "component" "store-gateway" "memberlist" true -}} {{- $zonesMap := include "mimir.zoneAwareReplicationMap" $args | fromYaml -}} @@ -222,3 +223,4 @@ spec: {{ end }} {{ end }} {{ end }} +{{ end }} diff --git a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-svc-headless.yaml b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-svc-headless.yaml index 0f55dc68057..44bc89a5751 100644 --- a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-svc-headless.yaml +++ b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-svc-headless.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.store_gateway.enabled (not .Values.federation_frontend.disableOtherComponents) }} apiVersion: v1 kind: Service @@ -27,3 +28,4 @@ spec: selector: {{- include "mimir.selectorLabels" (dict "ctx" . "component" "store-gateway" "memberlist" true) | nindent 4 }} {{- end }} +{{- end }} diff --git a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-svc.yaml b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-svc.yaml index ac805b66714..61a4febaa9b 100644 --- a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-svc.yaml +++ b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-svc.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.store_gateway.enabled (not .Values.federation_frontend.disableOtherComponents) }} {{- $args := dict "ctx" $ "component" "store-gateway" "memberlist" true -}} {{- $zonesMap := include "mimir.zoneAwareReplicationMap" $args | fromYaml -}} @@ -41,3 +42,4 @@ spec: {{ end }} {{ end }} {{ end }} +{{ end }} diff --git a/operations/helm/charts/mimir-distributed/templates/validate.yaml b/operations/helm/charts/mimir-distributed/templates/validate.yaml index 99b45fb8ab4..14bb50129f5 100644 --- a/operations/helm/charts/mimir-distributed/templates/validate.yaml +++ b/operations/helm/charts/mimir-distributed/templates/validate.yaml @@ -149,7 +149,13 @@ {{- end -}} -{{- if and .Values.ingester.zoneAwareReplication.enabled (not ((($calculatedConfig).ingester).ring).zone_awareness_enabled) -}} +{{- if + and + (or + (and (eq .Values.deploymentMode "microservices") .Values.ingester.zoneAwareReplication.enabled) + (and (eq .Values.deploymentMode "monolithic") .Values.monolithic.zoneAwareReplication.enabled)) + (not ((($calculatedConfig).ingester).ring).zone_awareness_enabled) +}} {{- fail "You have set ingester.zoneAwareReplication.enabled=true. The mimir.config must include ingester.ring.zone_awareness_enabled=true. Please merge the latest mimir.config from the chart with your mimir.config."}} {{- end -}} @@ -174,8 +180,13 @@ {{- end -}} {{- end -}} - -{{- if and .Values.store_gateway.zoneAwareReplication.enabled (not ((($calculatedConfig).store_gateway).sharding_ring).zone_awareness_enabled) -}} +{{- if + and + (or + (and (eq .Values.deploymentMode "microservices") .Values.store_gateway.zoneAwareReplication.enabled) + (and (eq .Values.deploymentMode "monolithic") .Values.monolithic.zoneAwareReplication.enabled)) + (not ((($calculatedConfig).store_gateway).sharding_ring).zone_awareness_enabled) +}} {{- fail "You have set store_gateway.zoneAwareReplication.enabled=true. The mimir.config must include store_gateway.sharding_ring.zone_awareness_enabled=true. Please merge the latest mimir.config from the chart with your mimir.config."}} {{- end -}} @@ -201,15 +212,15 @@ {{- end -}} {{- end -}} -{{- if and .Values.alertmanager.zoneAwareReplication.enabled (not .Values.alertmanager.statefulSet.enabled) -}} +{{- if and .Values.alertmanager.enabled .Values.alertmanager.zoneAwareReplication.enabled (not .Values.alertmanager.statefulSet.enabled) -}} {{- fail "You have set alertmanager.zoneAwareReplication.enabled=true, but alertmanager.statefulSet.enabled=false. This is not a supported configuration." -}} {{- end -}} -{{- if and .Values.alertmanager.zoneAwareReplication.enabled (not ((($calculatedConfig).alertmanager).sharding_ring).zone_awareness_enabled) -}} +{{- if and .Values.alertmanager.enabled .Values.alertmanager.zoneAwareReplication.enabled (not ((($calculatedConfig).alertmanager).sharding_ring).zone_awareness_enabled) -}} {{- fail "You have set alertmanager.zoneAwareReplication.enabled=true. The mimir.config must include alertmanager.sharding_ring.zone_awareness_enabled=true. Please merge the latest mimir.config from the chart with your mimir.config."}} {{- end -}} -{{- if and .Values.alertmanager.zoneAwareReplication.migration.enabled (not .Values.alertmanager.zoneAwareReplication.enabled) -}} +{{- if and .Values.alertmanager.enabled .Values.alertmanager.zoneAwareReplication.migration.enabled (not .Values.alertmanager.zoneAwareReplication.enabled) -}} {{- fail "You have set alertmanager.zoneAwareReplication.migration.enabled=true, but alertmanager.zoneAwareReplication.enabled=false. Please consult the Migrating from single zone with Helm document."}} {{- end -}} diff --git a/operations/helm/charts/mimir-distributed/values.yaml b/operations/helm/charts/mimir-distributed/values.yaml index 8345ef1ccab..928a86cc5e5 100644 --- a/operations/helm/charts/mimir-distributed/values.yaml +++ b/operations/helm/charts/mimir-distributed/values.yaml @@ -30,6 +30,8 @@ nameOverride: null # Note: Grafana provided dashboards rely on the default naming and will need changes. fullnameOverride: null +deploymentMode: microservices + image: # -- Grafana Mimir container image repository. Note: for Grafana Enterprise Metrics use the value 'enterprise.image.repository' repository: grafana/mimir @@ -154,7 +156,7 @@ mimir: {{- end }} alertmanager: - data_dir: /data + data_dir: "/data/alertmanager" enable_api: true external_url: /alertmanager {{- if .Values.alertmanager.zoneAwareReplication.enabled }} @@ -239,7 +241,7 @@ mimir: max_opening_blocks_concurrency: 4 symbols_flushers_concurrency: 4 first_level_compaction_wait_period: 25m - data_dir: "/data" + data_dir: "/data/compactor" sharding_ring: wait_stability_min_duration: 1m heartbeat_period: 1m @@ -262,9 +264,11 @@ mimir: cache_results: true query_sharding_target_series_per_shard: 2500 {{- end }} + {{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.query_scheduler.enabled (not .Values.federation_frontend.disableOtherComponents) }} scheduler_address: {{ template "mimir.fullname" . }}-query-scheduler-headless.{{ .Release.Namespace }}.svc:{{ include "mimir.serverGrpcListenPort" . }} {{- end }} + {{- end }} {{- if .Values.enterprise.enabled }} log_query_request_headers: X-Access-Policy-Name,X-Token-Name {{- end }} @@ -272,12 +276,17 @@ mimir: frontend_worker: grpc_client_config: max_send_msg_size: 419430400 # 400MiB + {{- if eq .Values.deploymentMode "microservices" }} {{- if .Values.query_scheduler.enabled }} scheduler_address: {{ template "mimir.fullname" . }}-query-scheduler-headless.{{ .Release.Namespace }}.svc:{{ include "mimir.serverGrpcListenPort" . }} {{- else }} frontend_address: {{ template "mimir.fullname" . }}-query-frontend-headless.{{ .Release.Namespace }}.svc:{{ include "mimir.serverGrpcListenPort" . }} {{- end }} + {{- else if eq .Values.deploymentMode "monolithic" }} + frontend_address: {{ include "mimir.resourceName" (dict "ctx" . "component" "monolithic") }}-headless.{{ .Release.Namespace }}.svc:{{ include "mimir.serverGrpcListenPort" . }} + {{- end }} + {{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.enterprise.enabled }} gateway: proxy: @@ -312,16 +321,20 @@ mimir: url: http://{{ template "mimir.fullname" . }}-graphite-querier.{{ .Release.Namespace }}.svc:{{ include "mimir.serverHttpListenPort" . }} {{- end}} {{- end }} + {{- end }} ingester: ring: final_sleep: 0s num_tokens: 512 - tokens_file_path: /data/tokens + tokens_file_path: /data/ingester/tokens unregister_on_shutdown: false heartbeat_period: 2m heartbeat_timeout: 10m - {{- if .Values.ingester.zoneAwareReplication.enabled }} + {{- if or + (and (eq .Values.deploymentMode "microservices") .Values.ingester.zoneAwareReplication.enabled) + (and (eq .Values.deploymentMode "monolithic") .Values.monolithic.zoneAwareReplication.enabled) + }} zone_awareness_enabled: true {{- end }} @@ -330,6 +343,7 @@ mimir: max_recv_msg_size: 104857600 max_send_msg_size: 104857600 + {{- if eq .Values.deploymentMode "microservices" }} {{- if .Values.enterprise.enabled }} instrumentation: enabled: {{ and .Values.distributor.enabled (not .Values.federation_frontend.disableOtherComponents) }} @@ -341,6 +355,7 @@ mimir: license: path: "/license/license.jwt" {{- end }} + {{- end }} limits: # Limit queries to 500 days. You can override this on a per-tenant basis. @@ -369,12 +384,20 @@ mimir: max_outstanding_requests_per_tenant: 800 ruler: + {{- if eq .Values.deploymentMode "microservices" }} alertmanager_url: dnssrvnoa+http://_http-metrics._tcp.{{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}/alertmanager + {{- else if eq .Values.deploymentMode "monolithic" }} + alertmanager_url: dnssrvnoa+http://_http-metrics._tcp.{{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}/alertmanager + {{- end }} enable_api: true - rule_path: /data + rule_path: "/data/ruler" {{- if .Values.ruler.remoteEvaluationDedicatedQueryPath }} query_frontend: + {{- if eq .Values.deploymentMode "microservices" }} address: dns:///{{ template "mimir.fullname" . }}-ruler-query-frontend.{{ .Release.Namespace }}.svc:{{ include "mimir.serverGrpcListenPort" . }} + {{- else if eq .Values.deploymentMode "monolithic" }} + address: dns:///{{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc:{{ include "mimir.serverGrpcListenPort" . }} + {{- end }} {{- end }} {{- if or (.Values.minio.enabled) (index .Values "metadata-cache" "enabled") }} @@ -407,16 +430,23 @@ mimir: heartbeat_period: 1m heartbeat_timeout: 4m wait_stability_min_duration: 1m - {{- if .Values.store_gateway.zoneAwareReplication.enabled }} + {{- if or + (and (eq .Values.deploymentMode "microservices") .Values.store_gateway.zoneAwareReplication.enabled) + (and (eq .Values.deploymentMode "monolithic") .Values.monolithic.zoneAwareReplication.enabled) + }} kvstore: prefix: multi-zone/ {{- end }} tokens_file_path: /data/tokens unregister_on_shutdown: false - {{- if .Values.store_gateway.zoneAwareReplication.enabled }} + {{- if or + (and (eq .Values.deploymentMode "microservices") .Values.store_gateway.zoneAwareReplication.enabled) + (and (eq .Values.deploymentMode "monolithic") .Values.monolithic.zoneAwareReplication.enabled) + }} zone_awareness_enabled: true {{- end }} + {{- if eq .Values.deploymentMode "microservices" }} {{- if and .Values.enterprise.enabled .Values.graphite.enabled }} graphite: enabled: true @@ -441,7 +471,8 @@ mimir: memcached: addresses: dnssrvnoa+{{ template "mimir.fullname" . }}-gr-metricname-cache.{{ .Release.Namespace}}.svc:11211 timeout: 1s - {{- end}} + {{- end }} + {{- end }} # -- Additional structured values on top of the text based 'mimir.config'. Applied after the text based config is evaluated for templates. Enables adding and modifying YAML elements in the evaulated 'mimir.config'. # @@ -3138,70 +3169,125 @@ nginx: # Distributor endpoints location /distributor { - set $distributor {{ template "mimir.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $distributor {{ template "mimir.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $distributor {{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$distributor:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } location = /api/v1/push { - set $distributor {{ template "mimir.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $distributor {{ template "mimir.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $distributor {{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$distributor:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } location /otlp/v1/metrics { - set $distributor {{ template "mimir.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $distributor {{ template "mimir.fullname" . }}-distributor-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $distributor {{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$distributor:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } # Alertmanager endpoints location {{ template "mimir.alertmanagerHttpPrefix" . }} { - set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $alertmanager {{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } location = /multitenant_alertmanager/status { - set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $alertmanager {{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } location = /multitenant_alertmanager/configs { - set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $alertmanager {{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } location = /api/v1/alerts { - set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $alertmanager {{ template "mimir.fullname" . }}-alertmanager-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $alertmanager {{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$alertmanager:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } # Ruler endpoints location {{ template "mimir.prometheusHttpPrefix" . }}/config/v1/rules { - set $ruler {{ template "mimir.fullname" . }}-ruler.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $ruler {{ template "mimir.fullname" . }}-ruler.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $ruler {{ template "mimir.fullname" . }}-monolithic.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$ruler:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } location {{ template "mimir.prometheusHttpPrefix" . }}/api/v1/rules { - set $ruler {{ template "mimir.fullname" . }}-ruler.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $ruler {{ template "mimir.fullname" . }}-ruler.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $ruler {{ template "mimir.fullname" . }}-monolithic.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$ruler:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } location {{ template "mimir.prometheusHttpPrefix" . }}/api/v1/alerts { - set $ruler {{ template "mimir.fullname" . }}-ruler.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $ruler {{ template "mimir.fullname" . }}-ruler.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $ruler {{ template "mimir.fullname" . }}-monolithic.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$ruler:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } location = /ruler/ring { - set $ruler {{ template "mimir.fullname" . }}-ruler.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $ruler {{ template "mimir.fullname" . }}-ruler.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $ruler {{ template "mimir.fullname" . }}-monolithic.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$ruler:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } # Rest of {{ template "mimir.prometheusHttpPrefix" . }} goes to the query frontend location {{ template "mimir.prometheusHttpPrefix" . }} { - set $query_frontend {{ template "mimir.fullname" . }}-query-frontend.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $query_frontend {{ template "mimir.fullname" . }}-query-frontend.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $query_frontend {{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$query_frontend:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } # Buildinfo endpoint can go to any component location = /api/v1/status/buildinfo { - set $query_frontend {{ template "mimir.fullname" . }}-query-frontend.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; - proxy_pass http://$query_frontend:{{ include "mimir.serverHttpListenPort" . }}$request_uri; + {{- if eq .Values.deploymentMode "microservices" }} + set $query_frontend {{ template "mimir.fullname" . }}-query-frontend.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $query_frontend {{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$query_frontend:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } # Compactor endpoint for uploading blocks location /api/v1/upload/block/ { - set $compactor {{ template "mimir.fullname" . }}-compactor.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- if eq .Values.deploymentMode "microservices" }} + set $compactor {{ template "mimir.fullname" . }}-compactor.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- else if eq .Values.deploymentMode "monolithic" }} + set $compactor {{ template "mimir.fullname" . }}-monolithic-headless.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}; + {{- end }} proxy_pass http://$compactor:{{ include "mimir.serverHttpListenPort" . }}$request_uri; } @@ -4661,6 +4747,229 @@ continuous_test: tolerations: [] terminationGracePeriodSeconds: 30 +monolithic: + # -- Total number of replicas for the monolithic across all availability zones + # If ingester.zoneAwareReplication.enabled=false, this number is taken as is. + # Otherwise each zone starts `ceil(replicas / number_of_zones)` number of pods. + # E.g. if 'replicas' is set to 4 and there are 3 zones, then 4/3=1.33 and after rounding up it means 2 pods per zone are started. + replicas: 3 + # TODO Currently I have only foreseen to enable compression for the monolithic deployment mode + compression: + enabled: false + algorithm: snappy + statefulSet: + enabled: true + + service: + annotations: {} + labels: {} + # -- https://kubernetes.io/docs/concepts/services-networking/service-traffic-policy/ + internalTrafficPolicy: Cluster + type: ClusterIP + + # -- Optionally set the scheduler for pods of the monolithic deployment + schedulerName: "" + + resources: + requests: + cpu: 100m + memory: 512Mi + + # Additional monolithic container arguments, e.g. log level (debug, info, warn, error) + extraArgs: {} + # Pod Labels + podLabels: {} + + # Pod Annotations + podAnnotations: {} + + # -- The name of the PriorityClass for monolithic pods + priorityClassName: null + + # -- Pod Disruption Budget for monolithic, this will be applied across availability zones to prevent losing redundancy + podDisruptionBudget: + maxUnavailable: 1 + + podManagementPolicy: Parallel + + # -- NodeSelector to pin monolithic pods to certain set of nodes. This is ignored when monolithic.zoneAwareReplication.enabled=true. + nodeSelector: {} + # -- Pod affinity settings for the monolithic. This is ignored when monolithic.zoneAwareReplication.enabled=true. + 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. + # It is recommended to replace this with requiredDuringSchedulingIgnoredDuringExecution podAntiAffinity rules when + # deploying to production. + topologySpreadConstraints: + maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + # minDomains: 1 + # nodeAffinityPolicy: Honor + # nodeTaintsPolicy: Honor + # matchLabelKeys: + # - pod-template-hash + + annotations: {} + + persistentVolume: + # If true and monolithic.statefulSet.enabled is true, + # Monolithic will create/use a Persistent Volume Claim + # If false, use emptyDir + # + enabled: true + + # Ingester data Persistent Volume Claim annotations + # + annotations: {} + + # Monolithic data Persistent Volume access modes + # Must match those of existing PV or dynamic provisioner + # Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + accessModes: + - ReadWriteOnce + + # Monolithic data Persistent Volume size + size: 2Gi + + # Subdirectory of Monolithic data Persistent Volume to mount + # Useful if the volume's root directory is not empty + subPath: '' + + + # Monolithic data Persistent Volume Storage Class + # If defined, storageClassName: + # If set to "-", storageClassName: "", which disables dynamic provisioning + # If undefined (the default) or set to null, no storageClassName spec is + # set, choosing the default provisioner. + # + # storageClass: "-" + + # -- Enable StatefulSetAutoDeletePVC feature + # https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention + enableRetentionPolicy: false + whenDeleted: Retain + whenScaled: Retain + + readinessProbe: + httpGet: + path: /ready + port: http-metrics + initialDelaySeconds: 60 + + # -- SecurityContext override for monolithic pods + securityContext: {} + + # -- The SecurityContext for monolithic containers + containerSecurityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + capabilities: + drop: [ALL] + + # -- updateStrategy of the monolithic statefulset. This is ignored when monolithic.zoneAwareReplication.enabled=true. + statefulStrategy: + type: RollingUpdate + + terminationGracePeriodSeconds: 900 + + tolerations: [] + initContainers: [] + extraContainers: [] + extraVolumes: [] + extraVolumeMounts: [] + env: [] + extraEnvFrom: [] + + # -- Jaeger reporter queue size + # Set to 'null' to use the Jaeger client's default value + jaegerReporterMaxQueueSize: 1000 + + # -- Options to configure zone-aware replication for monolithic + # Example configuration with full geographical redundancy: + # rollout_operator: + # enabled: true + # monolithic: + # zoneAwareReplication: + # enabled: true + # topologyKey: 'kubernetes.io/hostname' # This generates default anti-affinity rules + # zones: # Zone list has to be fully redefined for modification. Update with you actual zones or skip to use logical zones only. + # - name: zone-a + # nodeSelector: + # topology.kubernetes.io/zone: us-central1-a + # - name: zone-a + # nodeSelector: + # topology.kubernetes.io/zone: us-central1-b + # - name: zone-c + # nodeSelector: + # topology.kubernetes.io/zone: us-central1-c + # + zoneAwareReplication: + # -- Enable zone-aware replication for ingester + enabled: true + # -- Maximum number of ingesters that can be unavailable per zone during rollout + maxUnavailable: 50 + # -- topologyKey to use in pod anti-affinity. If unset, no anti-affinity rules are generated. If set, the generated anti-affinity rule makes sure that pods from different zones do not mix. + # E.g.: topologyKey: 'kubernetes.io/hostname' + topologyKey: null + # -- Auxiliary values for migration, see https://grafana.com/docs/mimir/latest/migration-guide/migrating-from-single-zone-with-helm/ + migration: + # -- Indicate if migration is ongoing for multi zone ingester + enabled: false + # -- Exclude default zone on write path + excludeDefaultZone: false + # -- Enable zone-awareness, read path only + readPath: false + # -- Total number of replicas to start in availability zones when migration is enabled + replicas: 0 + # -- Scale default zone ingesters to 0 + scaleDownDefaultZone: false + # -- Enable zone-awareness, write path only + writePath: false + # -- Zone definitions for monolithic zones. Note: you have to redefine the whole list to change parts as YAML does not allow to modify parts of a list. + zones: + # -- Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + - name: zone-a + # -- nodeselector to restrict where pods of this zone can be placed. E.g.: + # nodeSelector: + # topology.kubernetes.io/zone: zone-a + nodeSelector: null + # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) + extraAffinity: {} + # -- Monolithic data Persistent Volume Storage Class + # If defined, storageClassName: + # If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning + # If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. + storageClass: null + # -- Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + - name: zone-b + # -- nodeselector to restrict where pods of this zone can be placed. E.g.: + # nodeSelector: + # topology.kubernetes.io/zone: zone-b + nodeSelector: null + # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) + extraAffinity: {} + # -- Monolithic data Persistent Volume Storage Class + # If defined, storageClassName: + # If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning + # If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. + storageClass: null + # -- Name of the zone, used in labels and selectors. Must follow Kubernetes naming restrictions: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ + - name: zone-c + # -- nodeselector to restrict where pods of this zone can be placed. E.g.: + # nodeSelector: + # topology.kubernetes.io/zone: zone-c + nodeSelector: null + # -- extraAffinity adds user defined custom affinity rules (merged with generated rules) + extraAffinity: {} + # -- Monolithic data Persistent Volume Storage Class + # If defined, storageClassName: + # If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning + # If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. + storageClass: null + + # -- Add dynamic manifests via values. Example: # extraObjects: # - kind: ConfigMap