From 86a63fb491a55890c49e5859f6ee7f2ca486c5ef Mon Sep 17 00:00:00 2001 From: Patrick Oyarzun Date: Fri, 15 Mar 2024 15:22:49 -0500 Subject: [PATCH] Helm 5.2.3 release (#7633) * [Helm] Fix admin-cache max connections (#7632) * [Helm] Fix admin-cache max connections * Enable caches in enterprise test * Enable only the admin cache * Fix typo * Push updated tests * rebase main and add back all caches * Update CHANGELOG (cherry picked from commit f377ac354e0559d781797785b89848a85806dfe1) * Update version and release notes * helm-docs * Rebuild helm tests --- .../mimir-distributed/release-notes/v5.2.md | 4 + .../charts/mimir-distributed/CHANGELOG.md | 4 + .../helm/charts/mimir-distributed/Chart.yaml | 2 +- .../helm/charts/mimir-distributed/README.md | 4 +- .../ci/test-enterprise-configmap-values.yaml | 30 ++++++ .../helm/charts/mimir-distributed/values.yaml | 3 + .../admin-cache/admin-cache-pdb.yaml | 19 ++++ .../admin-cache/admin-cache-statefulset.yaml | 100 ++++++++++++++++++ .../admin-cache/admin-cache-svc-headless.yaml | 30 ++++++ .../chunks-cache/chunks-cache-pdb.yaml | 19 ++++ .../chunks-cache-statefulset.yaml | 100 ++++++++++++++++++ .../chunks-cache-svc-headless.yaml | 30 ++++++ .../index-cache/index-cache-pdb.yaml | 19 ++++ .../index-cache/index-cache-statefulset.yaml | 100 ++++++++++++++++++ .../index-cache/index-cache-svc-headless.yaml | 30 ++++++ .../metadata-cache/metadata-cache-pdb.yaml | 19 ++++ .../metadata-cache-statefulset.yaml | 100 ++++++++++++++++++ .../metadata-cache-svc-headless.yaml | 30 ++++++ .../templates/mimir-config.yaml | 38 +++++++ .../results-cache/results-cache-pdb.yaml | 19 ++++ .../results-cache-statefulset.yaml | 100 ++++++++++++++++++ .../results-cache-svc-headless.yaml | 30 ++++++ 22 files changed, 827 insertions(+), 3 deletions(-) create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-pdb.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-statefulset.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-svc-headless.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-pdb.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-statefulset.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-svc-headless.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-pdb.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-statefulset.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-svc-headless.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-pdb.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-statefulset.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-svc-headless.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-pdb.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-statefulset.yaml create mode 100644 operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-svc-headless.yaml diff --git a/docs/sources/helm-charts/mimir-distributed/release-notes/v5.2.md b/docs/sources/helm-charts/mimir-distributed/release-notes/v5.2.md index 1382975769a..ece999dda3e 100644 --- a/docs/sources/helm-charts/mimir-distributed/release-notes/v5.2.md +++ b/docs/sources/helm-charts/mimir-distributed/release-notes/v5.2.md @@ -32,3 +32,7 @@ Notable enhancements are as follows: ### 5.2.2 - [PR 7555](https://github.com/grafana/mimir/pull/7555): Update GEM to v2.11.2 + +### 5.2.3 + +- [PR 7632](https://github.com/grafana/mimir/pull/7632): Fix crashloop in GEM admin-cache container diff --git a/operations/helm/charts/mimir-distributed/CHANGELOG.md b/operations/helm/charts/mimir-distributed/CHANGELOG.md index 6e1e867c7bf..969f15f66ad 100644 --- a/operations/helm/charts/mimir-distributed/CHANGELOG.md +++ b/operations/helm/charts/mimir-distributed/CHANGELOG.md @@ -28,6 +28,10 @@ Entries should include a reference to the Pull Request that introduced the chang ## main / unreleased +## 5.2.3 + +* [BUGFIX] admin-cache: set max connections to fix failure to start #7632 + ## 5.2.2 * [BUGFix] Updated GEM image to v2.11.2. #7555 diff --git a/operations/helm/charts/mimir-distributed/Chart.yaml b/operations/helm/charts/mimir-distributed/Chart.yaml index e87f4097255..55ea8e80f31 100644 --- a/operations/helm/charts/mimir-distributed/Chart.yaml +++ b/operations/helm/charts/mimir-distributed/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -version: 5.2.2 +version: 5.2.3 appVersion: 2.11.0 description: "Grafana Mimir" home: https://grafana.com/docs/helm-charts/mimir-distributed/latest/ diff --git a/operations/helm/charts/mimir-distributed/README.md b/operations/helm/charts/mimir-distributed/README.md index bc0a6da2377..f07f4c53534 100644 --- a/operations/helm/charts/mimir-distributed/README.md +++ b/operations/helm/charts/mimir-distributed/README.md @@ -4,7 +4,7 @@ Helm chart for deploying [Grafana Mimir](https://grafana.com/docs/mimir/latest/) For the full documentation, visit [Grafana mimir-distributed Helm chart documentation](https://grafana.com/docs/helm-charts/mimir-distributed/latest/). -> **Note:** The documentation version is derived from the Helm chart version which is 5.2.2. +> **Note:** The documentation version is derived from the Helm chart version which is 5.2.3. When upgrading from Helm chart version 4.X, please see [Migrate the Helm chart from version 4.x to 5.0](https://grafana.com/docs/helm-charts/mimir-distributed/latest/migration-guides/migrate-helm-chart-4.x-to-5.0/). When upgrading from Helm chart version 3.x, please see [Migrate from single zone to zone-aware replication with Helm](https://grafana.com/docs/helm-charts/mimir-distributed/latest/migration-guides/migrate-from-single-zone-with-helm/). @@ -14,7 +14,7 @@ When upgrading from Helm chart version 2.1, please see [Upgrade the Grafana Mimi # mimir-distributed -![Version: 5.2.2](https://img.shields.io/badge/Version-5.2.2-informational?style=flat-square) ![AppVersion: 2.11.0](https://img.shields.io/badge/AppVersion-2.11.0-informational?style=flat-square) +![Version: 5.2.3](https://img.shields.io/badge/Version-5.2.3-informational?style=flat-square) ![AppVersion: 2.11.0](https://img.shields.io/badge/AppVersion-2.11.0-informational?style=flat-square) Grafana Mimir diff --git a/operations/helm/charts/mimir-distributed/ci/test-enterprise-configmap-values.yaml b/operations/helm/charts/mimir-distributed/ci/test-enterprise-configmap-values.yaml index fb95e61c37b..d2f5923a91b 100644 --- a/operations/helm/charts/mimir-distributed/ci/test-enterprise-configmap-values.yaml +++ b/operations/helm/charts/mimir-distributed/ci/test-enterprise-configmap-values.yaml @@ -83,3 +83,33 @@ testing: rollout_operator: enabled: false + +admin-cache: + enabled: true + replicas: 1 + resources: + <<: *ci_resources + +chunks-cache: + enabled: true + replicas: 1 + resources: + <<: *ci_resources + +index-cache: + enabled: true + replicas: 1 + resources: + <<: *ci_resources + +metadata-cache: + enabled: true + replicas: 1 + resources: + <<: *ci_resources + +results-cache: + enabled: true + replicas: 1 + resources: + <<: *ci_resources diff --git a/operations/helm/charts/mimir-distributed/values.yaml b/operations/helm/charts/mimir-distributed/values.yaml index 6f4cf0dbd09..40098fd4f09 100644 --- a/operations/helm/charts/mimir-distributed/values.yaml +++ b/operations/helm/charts/mimir-distributed/values.yaml @@ -3261,6 +3261,9 @@ admin-cache: # -- Maximum item memory for admin-cache (in MB). maxItemMemory: 1 + # -- Maximum number of connections allowed + connectionLimit: 16384 + # -- Extra init containers for admin-cache pods initContainers: [] diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-pdb.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-pdb.yaml new file mode 100644 index 00000000000..b4f800b7c0d --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/admin-cache/admin-cache-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-enterprise-configmap-values-mimir-admin-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: admin-cache + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: admin-cache + maxUnavailable: 1 diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-statefulset.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-statefulset.yaml new file mode 100644 index 00000000000..d674a9a1eef --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-statefulset.yaml @@ -0,0 +1,100 @@ +--- +# Source: mimir-distributed/templates/admin-cache/admin-cache-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-enterprise-configmap-values-mimir-admin-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: memcached + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: admin-cache + updateStrategy: + type: RollingUpdate + serviceName: test-enterprise-configmap-values-mimir-admin-cache + + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: admin-cache + annotations: + minio-secret-version: "42" + + spec: + serviceAccountName: test-enterprise-configmap-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + initContainers: + [] + nodeSelector: + {} + affinity: + {} + + tolerations: + [] + terminationGracePeriodSeconds: 60 + containers: + - name: memcached + image: memcached:1.6.22-alpine + imagePullPolicy: IfNotPresent + resources: + limits: null + requests: null + ports: + - containerPort: 11211 + name: client + args: + - -m 64 + - --extended=modern,track_sizes + - -I 1m + - -c 16384 + - -v + - -u 11211 + env: + envFrom: + - secretRef: + name: mimir-minio-secret + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + - name: exporter + image: prom/memcached-exporter:v0.14.2 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9150 + name: http-metrics + args: + - "--memcached.address=localhost:11211" + - "--web.listen-address=0.0.0.0:9150" + resources: + limits: {} + requests: {} + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-svc-headless.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-svc-headless.yaml new file mode 100644 index 00000000000..a5479d0c1bf --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/admin-cache/admin-cache-svc-headless.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/templates/admin-cache/admin-cache-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-enterprise-configmap-values-mimir-admin-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: admin-cache + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + clusterIP: None + ports: + - name: memcached-client + port: 11211 + targetPort: 11211 + + - name: http-metrics + port: 9150 + targetPort: 9150 + + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: admin-cache diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-pdb.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-pdb.yaml new file mode 100644 index 00000000000..a88b9eed827 --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/chunks-cache/chunks-cache-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-enterprise-configmap-values-mimir-chunks-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: chunks-cache + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: chunks-cache + maxUnavailable: 1 diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-statefulset.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-statefulset.yaml new file mode 100644 index 00000000000..a4701addfb8 --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-statefulset.yaml @@ -0,0 +1,100 @@ +--- +# Source: mimir-distributed/templates/chunks-cache/chunks-cache-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-enterprise-configmap-values-mimir-chunks-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: memcached + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: chunks-cache + updateStrategy: + type: RollingUpdate + serviceName: test-enterprise-configmap-values-mimir-chunks-cache + + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: chunks-cache + annotations: + minio-secret-version: "42" + + spec: + serviceAccountName: test-enterprise-configmap-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + initContainers: + [] + nodeSelector: + {} + affinity: + {} + + tolerations: + [] + terminationGracePeriodSeconds: 60 + containers: + - name: memcached + image: memcached:1.6.22-alpine + imagePullPolicy: IfNotPresent + resources: + limits: null + requests: null + ports: + - containerPort: 11211 + name: client + args: + - -m 8192 + - --extended=modern,track_sizes + - -I 1m + - -c 16384 + - -v + - -u 11211 + env: + envFrom: + - secretRef: + name: mimir-minio-secret + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + - name: exporter + image: prom/memcached-exporter:v0.14.2 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9150 + name: http-metrics + args: + - "--memcached.address=localhost:11211" + - "--web.listen-address=0.0.0.0:9150" + resources: + limits: {} + requests: {} + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-svc-headless.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-svc-headless.yaml new file mode 100644 index 00000000000..dec09c5ccbf --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/chunks-cache/chunks-cache-svc-headless.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/templates/chunks-cache/chunks-cache-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-enterprise-configmap-values-mimir-chunks-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: chunks-cache + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + clusterIP: None + ports: + - name: memcached-client + port: 11211 + targetPort: 11211 + + - name: http-metrics + port: 9150 + targetPort: 9150 + + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: chunks-cache diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-pdb.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-pdb.yaml new file mode 100644 index 00000000000..88abf412698 --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/index-cache/index-cache-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-enterprise-configmap-values-mimir-index-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: index-cache + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: index-cache + maxUnavailable: 1 diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-statefulset.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-statefulset.yaml new file mode 100644 index 00000000000..5953da3a0fc --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-statefulset.yaml @@ -0,0 +1,100 @@ +--- +# Source: mimir-distributed/templates/index-cache/index-cache-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-enterprise-configmap-values-mimir-index-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: memcached + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: index-cache + updateStrategy: + type: RollingUpdate + serviceName: test-enterprise-configmap-values-mimir-index-cache + + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: index-cache + annotations: + minio-secret-version: "42" + + spec: + serviceAccountName: test-enterprise-configmap-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + initContainers: + [] + nodeSelector: + {} + affinity: + {} + + tolerations: + [] + terminationGracePeriodSeconds: 60 + containers: + - name: memcached + image: memcached:1.6.22-alpine + imagePullPolicy: IfNotPresent + resources: + limits: null + requests: null + ports: + - containerPort: 11211 + name: client + args: + - -m 2048 + - --extended=modern,track_sizes + - -I 5m + - -c 16384 + - -v + - -u 11211 + env: + envFrom: + - secretRef: + name: mimir-minio-secret + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + - name: exporter + image: prom/memcached-exporter:v0.14.2 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9150 + name: http-metrics + args: + - "--memcached.address=localhost:11211" + - "--web.listen-address=0.0.0.0:9150" + resources: + limits: {} + requests: {} + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-svc-headless.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-svc-headless.yaml new file mode 100644 index 00000000000..6c9de68824c --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/index-cache/index-cache-svc-headless.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/templates/index-cache/index-cache-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-enterprise-configmap-values-mimir-index-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: index-cache + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + clusterIP: None + ports: + - name: memcached-client + port: 11211 + targetPort: 11211 + + - name: http-metrics + port: 9150 + targetPort: 9150 + + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: index-cache diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-pdb.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-pdb.yaml new file mode 100644 index 00000000000..f0c6a55f148 --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/metadata-cache/metadata-cache-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-enterprise-configmap-values-mimir-metadata-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: metadata-cache + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: metadata-cache + maxUnavailable: 1 diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-statefulset.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-statefulset.yaml new file mode 100644 index 00000000000..2c838cbf14a --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-statefulset.yaml @@ -0,0 +1,100 @@ +--- +# Source: mimir-distributed/templates/metadata-cache/metadata-cache-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-enterprise-configmap-values-mimir-metadata-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: memcached + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: metadata-cache + updateStrategy: + type: RollingUpdate + serviceName: test-enterprise-configmap-values-mimir-metadata-cache + + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: metadata-cache + annotations: + minio-secret-version: "42" + + spec: + serviceAccountName: test-enterprise-configmap-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + initContainers: + [] + nodeSelector: + {} + affinity: + {} + + tolerations: + [] + terminationGracePeriodSeconds: 60 + containers: + - name: memcached + image: memcached:1.6.22-alpine + imagePullPolicy: IfNotPresent + resources: + limits: null + requests: null + ports: + - containerPort: 11211 + name: client + args: + - -m 512 + - --extended=modern,track_sizes + - -I 1m + - -c 16384 + - -v + - -u 11211 + env: + envFrom: + - secretRef: + name: mimir-minio-secret + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + - name: exporter + image: prom/memcached-exporter:v0.14.2 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9150 + name: http-metrics + args: + - "--memcached.address=localhost:11211" + - "--web.listen-address=0.0.0.0:9150" + resources: + limits: {} + requests: {} + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-svc-headless.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-svc-headless.yaml new file mode 100644 index 00000000000..3d39ebe8202 --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/metadata-cache/metadata-cache-svc-headless.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/templates/metadata-cache/metadata-cache-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-enterprise-configmap-values-mimir-metadata-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: metadata-cache + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + clusterIP: None + ports: + - name: memcached-client + port: 11211 + targetPort: 11211 + + - name: http-metrics + port: 9150 + targetPort: 9150 + + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: metadata-cache diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/mimir-config.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/mimir-config.yaml index a62b0d25a8c..4912383b4ce 100644 --- a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/mimir-config.yaml +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/mimir-config.yaml @@ -22,6 +22,11 @@ data: store: memberlist admin_client: storage: + cache: + backend: memcached + memcached: + addresses: dns+test-enterprise-configmap-values-mimir-admin-cache.citestns.svc:11211 + max_item_size: 1048576 s3: access_key_id: ${MINIO_ROOT_USER} bucket_name: enterprise-metrics-admin @@ -47,6 +52,26 @@ data: blocks_storage: backend: s3 bucket_store: + chunks_cache: + backend: memcached + memcached: + addresses: dns+test-enterprise-configmap-values-mimir-chunks-cache.citestns.svc:11211 + max_idle_connections: 150 + max_item_size: 1048576 + timeout: 450ms + index_cache: + backend: memcached + memcached: + addresses: dns+test-enterprise-configmap-values-mimir-index-cache.citestns.svc:11211 + max_idle_connections: 150 + max_item_size: 5242880 + timeout: 450ms + metadata_cache: + backend: memcached + memcached: + addresses: dns+test-enterprise-configmap-values-mimir-metadata-cache.citestns.svc:11211 + max_idle_connections: 150 + max_item_size: 1048576 sync_dir: /data/tsdb-sync s3: access_key_id: ${MINIO_ROOT_USER} @@ -70,7 +95,15 @@ data: wait_stability_min_duration: 1m symbols_flushers_concurrency: 4 frontend: + cache_results: true parallelize_shardable_queries: true + query_sharding_target_series_per_shard: 2500 + results_cache: + backend: memcached + memcached: + addresses: dns+test-enterprise-configmap-values-mimir-results-cache.citestns.svc:11211 + max_item_size: 5242880 + timeout: 500ms scheduler_address: test-enterprise-configmap-values-mimir-query-scheduler-headless.citestns.svc:9095 frontend_worker: grpc_client_config: @@ -131,6 +164,11 @@ data: rule_path: /data ruler_storage: backend: s3 + cache: + backend: memcached + memcached: + addresses: dns+test-enterprise-configmap-values-mimir-metadata-cache.citestns.svc:11211 + max_item_size: 1048576 s3: access_key_id: ${MINIO_ROOT_USER} bucket_name: mimir-ruler diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-pdb.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-pdb.yaml new file mode 100644 index 00000000000..0487bd5898c --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-pdb.yaml @@ -0,0 +1,19 @@ +--- +# Source: mimir-distributed/templates/results-cache/results-cache-pdb.yaml +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: test-enterprise-configmap-values-mimir-results-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: results-cache + app.kubernetes.io/managed-by: Helm + namespace: "citestns" +spec: + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: results-cache + maxUnavailable: 1 diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-statefulset.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-statefulset.yaml new file mode 100644 index 00000000000..13c802f0819 --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-statefulset.yaml @@ -0,0 +1,100 @@ +--- +# Source: mimir-distributed/templates/results-cache/results-cache-statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: test-enterprise-configmap-values-mimir-results-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: memcached + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + podManagementPolicy: Parallel + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: results-cache + updateStrategy: + type: RollingUpdate + serviceName: test-enterprise-configmap-values-mimir-results-cache + + template: + metadata: + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/component: results-cache + annotations: + minio-secret-version: "42" + + spec: + serviceAccountName: test-enterprise-configmap-values-mimir + securityContext: + fsGroup: 10001 + runAsGroup: 10001 + runAsNonRoot: true + runAsUser: 10001 + seccompProfile: + type: RuntimeDefault + initContainers: + [] + nodeSelector: + {} + affinity: + {} + + tolerations: + [] + terminationGracePeriodSeconds: 60 + containers: + - name: memcached + image: memcached:1.6.22-alpine + imagePullPolicy: IfNotPresent + resources: + limits: null + requests: null + ports: + - containerPort: 11211 + name: client + args: + - -m 512 + - --extended=modern,track_sizes + - -I 5m + - -c 16384 + - -v + - -u 11211 + env: + envFrom: + - secretRef: + name: mimir-minio-secret + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + - name: exporter + image: prom/memcached-exporter:v0.14.2 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9150 + name: http-metrics + args: + - "--memcached.address=localhost:11211" + - "--web.listen-address=0.0.0.0:9150" + resources: + limits: {} + requests: {} + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true diff --git a/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-svc-headless.yaml b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-svc-headless.yaml new file mode 100644 index 00000000000..0eb4763da09 --- /dev/null +++ b/operations/helm/tests/test-enterprise-configmap-values-generated/mimir-distributed/templates/results-cache/results-cache-svc-headless.yaml @@ -0,0 +1,30 @@ +--- +# Source: mimir-distributed/templates/results-cache/results-cache-svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: test-enterprise-configmap-values-mimir-results-cache + labels: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: results-cache + app.kubernetes.io/managed-by: Helm + annotations: + {} + namespace: "citestns" +spec: + type: ClusterIP + clusterIP: None + ports: + - name: memcached-client + port: 11211 + targetPort: 11211 + + - name: http-metrics + port: 9150 + targetPort: 9150 + + selector: + app.kubernetes.io/name: mimir + app.kubernetes.io/instance: test-enterprise-configmap-values + app.kubernetes.io/component: results-cache