From f23e4dc7d022d28cc01c78fbbe160894446bc92f Mon Sep 17 00:00:00 2001 From: Saswata Mukherjee Date: Fri, 24 Jan 2025 12:44:47 +0000 Subject: [PATCH] Add missing replica args Signed-off-by: Saswata Mukherjee --- services/observatorium-metrics-template-overwrites.libsonnet | 1 + services/observatorium-metrics-template.jsonnet | 4 ++++ services/observatorium-metrics.libsonnet | 2 +- services/observatorium.libsonnet | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/services/observatorium-metrics-template-overwrites.libsonnet b/services/observatorium-metrics-template-overwrites.libsonnet index b623bd1f87a..5a391fbe3f3 100644 --- a/services/observatorium-metrics-template-overwrites.libsonnet +++ b/services/observatorium-metrics-template-overwrites.libsonnet @@ -190,6 +190,7 @@ local thanosRuleSyncer = import './sidecars/thanos-rule-syncer.libsonnet'; spec+: { template+: { spec+: { + replicas: '${{THANOS_RECEIVE_CONTROLLER_REPLICAS}}', securityContext: {}, containers: [ if c.name == 'thanos-receive-controller' then c { diff --git a/services/observatorium-metrics-template.jsonnet b/services/observatorium-metrics-template.jsonnet index b0b588f7d38..adac362391d 100644 --- a/services/observatorium-metrics-template.jsonnet +++ b/services/observatorium-metrics-template.jsonnet @@ -170,5 +170,9 @@ local obs = import 'observatorium.libsonnet'; { name: 'THANOS_STORE_INDEX_HEADER_LAZY_READER_IDLE_TIMEOUT', value: '3m' }, { name: 'CONFIGMAP_RELOADER_IMAGE', value: 'quay.io/openshift/origin-configmap-reloader' }, { name: 'CONFIGMAP_RELOADER_IMAGE_TAG', value: '4.5.0' }, + { name: 'THANOS_RECEIVE_CONTROLLER_REPLICAS', value: '1' }, + { name: 'THANOS_QUERY_FRONTEND_QUERY_RANGE_CACHE_REPLICAS', value: '1' }, + { name: 'OBSCTL_RELOADER_REPLICAS', value: '1' }, + { name: 'RULES_OBJSTORE_REPLICAS', value: '2' }, ], } diff --git a/services/observatorium-metrics.libsonnet b/services/observatorium-metrics.libsonnet index 8321a2784f5..506e0eb2c9d 100644 --- a/services/observatorium-metrics.libsonnet +++ b/services/observatorium-metrics.libsonnet @@ -649,7 +649,7 @@ local oauthProxy = import './sidecars/oauth-proxy.libsonnet'; connectionLimit: '${THANOS_QUERY_FRONTEND_QUERY_CACHE_CONNECTION_LIMIT}', memoryLimitMb: '${THANOS_QUERY_FRONTEND_QUERY_CACHE_MEMORY_LIMIT_MB}', maxItemSize: '64m', - replicas: 1, // overwritten in observatorium-metrics-template.libsonnet + replicas: '${{THANOS_QUERY_FRONTEND_QUERY_RANGE_CACHE_REPLICAS}}', // overwritten in observatorium-metrics-template.libsonnet resources: { memcached: { requests: { diff --git a/services/observatorium.libsonnet b/services/observatorium.libsonnet index ace28de9ca8..6655f335dbf 100644 --- a/services/observatorium.libsonnet +++ b/services/observatorium.libsonnet @@ -154,7 +154,7 @@ local obsctlReloader = (import 'github.com/rhobs/obsctl-reloader/jsonnet/lib/obs name: 'rules-obsctl-reloader', version: '${OBSCTL_RELOADER_IMAGE_TAG}', image: '%s:%s' % ['${OBSCTL_RELOADER_IMAGE}', cfg.version], - replicas: 1, + replicas: '${{OBSCTL_RELOADER_REPLICAS}}', logLevel: 'debug', commonLabels+:: { 'app.kubernetes.io/name': 'rules-obsctl-reloader', @@ -357,7 +357,7 @@ local obsctlReloader = (import 'github.com/rhobs/obsctl-reloader/jsonnet/lib/obs version: '${RULES_OBJSTORE_IMAGE_TAG}', image: '%s:%s' % ['${RULES_OBJSTORE_IMAGE}', cfg.version], logLevel: '${RULES_OBJSTORE_LOG_LEVEL}', - replicas: 2, + replicas: '${{RULES_OBJSTORE_REPLICAS}}', objectStorageConfig: { name: '${RULES_OBJSTORE_SECRET}', key: 'objstore.yaml',