Skip to content

Commit 2620343

Browse files
committed
Adding store-gw and memcached configuration to match existing datahub store path
Signed-off-by: Moad Zardab <[email protected]>
1 parent 5df6d43 commit 2620343

File tree

3 files changed

+38
-15
lines changed

3 files changed

+38
-15
lines changed

resources/services/telemeter-prod-01/rhobs/telemeter/observatorium-metrics-store-telemeter-template.yaml

+17-14
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ objects:
8383
name: observatorium-thanos-store-bucket-cache-memcached-telemeter
8484
namespace: rhobs
8585
spec:
86-
replicas: 1
86+
replicas: 5
8787
selector:
8888
matchLabels:
8989
app.kubernetes.io/component: store-bucket-cache
@@ -135,10 +135,11 @@ objects:
135135
protocol: TCP
136136
resources:
137137
limits:
138-
memory: 3Gi
138+
cpu: "7"
139+
memory: 12Gi
139140
requests:
140-
cpu: 500m
141-
memory: 2Gi
141+
cpu: "6"
142+
memory: 10Gi
142143
terminationMessagePolicy: FallbackToLogsOnError
143144
- args:
144145
- --memcached.address=localhost:0
@@ -240,7 +241,7 @@ objects:
240241
name: observatorium-thanos-store-index-cache-memcached-telemeter
241242
namespace: rhobs
242243
spec:
243-
replicas: 1
244+
replicas: 5
244245
selector:
245246
matchLabels:
246247
app.kubernetes.io/component: store-index-cache
@@ -292,10 +293,11 @@ objects:
292293
protocol: TCP
293294
resources:
294295
limits:
295-
memory: 3Gi
296+
cpu: "7"
297+
memory: 12Gi
296298
requests:
297-
cpu: 500m
298-
memory: 2Gi
299+
cpu: "6"
300+
memory: 10Gi
299301
terminationMessagePolicy: FallbackToLogsOnError
300302
- args:
301303
- --memcached.address=localhost:0
@@ -517,7 +519,7 @@ objects:
517519
dns_provider_update_interval: 10s
518520
- --log.format=logfmt
519521
- --log.level=${STORE_LOG_LEVEL}
520-
- --max-time=-22h0m0s
522+
- --max-time=-336h0m0s
521523
- --objstore.config=$(OBJSTORE_CONFIG)
522524
- --selector.relabel-config-file=/etc/thanos/hashmod/hashmod-config.yaml
523525
- |
@@ -607,6 +609,7 @@ objects:
607609
periodSeconds: 5
608610
resources:
609611
limits:
612+
cpu: "7"
610613
memory: ${STORE_MEMORY_LIMIT}
611614
requests:
612615
cpu: ${STORE_CPU_REQUEST}
@@ -706,7 +709,7 @@ objects:
706709
- ReadWriteOnce
707710
resources:
708711
requests:
709-
storage: 5Gi
712+
storage: 50Gi
710713
storageClassName: gp2
711714
- apiVersion: monitoring.coreos.com/v1
712715
kind: ServiceMonitor
@@ -809,12 +812,12 @@ objects:
809812
observatorium/tenant: telemeter
810813
parameters:
811814
- name: STORE_CPU_REQUEST
812-
value: "2"
815+
value: "5"
813816
- name: STORE_LOG_LEVEL
814817
value: warn
815818
- name: STORE_MEMORY_LIMIT
816-
value: 20Gi
819+
value: 60Gi
817820
- name: STORE_MEMORY_REQUEST
818-
value: 5Gi
821+
value: 40Gi
819822
- name: STORE_REPLICAS
820-
value: "1"
823+
value: "5"

services_go/instances/rhobs/rhobs.go

+19-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import (
66
"sort"
77
"time"
88

9+
"github.com/observatorium/observatorium/configuration_go/abstr/kubernetes/memcached"
10+
thanostime "github.com/observatorium/observatorium/configuration_go/schemas/thanos/time"
11+
912
"github.com/google/go-jsonnet"
1013
observatoriumapi "github.com/observatorium/observatorium/configuration_go/abstr/kubernetes/observatorium/api"
1114
"github.com/observatorium/observatorium/configuration_go/abstr/kubernetes/thanos/receive"
@@ -331,7 +334,22 @@ func prodConfig() observatorium.Observatorium {
331334
ingestor.VolumeSize = "5Gi"
332335
},
333336
StorePreManifestsHook: func(store *store.StoreStatefulSet) {
334-
store.VolumeSize = "5Gi"
337+
store.VolumeSize = "50Gi"
338+
store.Replicas = 5
339+
store.ContainerResources = kghelpers.NewResourcesRequirements("5", "7", "40Gi", "60Gi")
340+
},
341+
StoreOpts: func(opts *store.StoreOptions) {
342+
// Telemeter Lookback is -14 days (336 hours) during migration to account for an overlap with our hot telemeter instance
343+
telemeterMaxLookBack := time.Duration(-336) * time.Hour
344+
opts.MaxTime = &thanostime.TimeOrDurationValue{Dur: &telemeterMaxLookBack}
345+
},
346+
IndexCachePreManifestsHook: func(indexCache *memcached.MemcachedDeployment) {
347+
indexCache.Replicas = 5
348+
indexCache.ContainerResources = kghelpers.NewResourcesRequirements("6", "7", "10Gi", "12Gi")
349+
},
350+
BucketCachePreManifestsHook: func(bucketCache *memcached.MemcachedDeployment) {
351+
bucketCache.Replicas = 5
352+
bucketCache.ContainerResources = kghelpers.NewResourcesRequirements("6", "7", "10Gi", "12Gi")
335353
},
336354
},
337355
},

services_go/observatorium/metrics.go

+2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ type ObservatoriumMetricsInstance struct {
8888
ObjStoreSecret string
8989
Tenants []Tenants
9090
StorePreManifestsHook func(*store.StoreStatefulSet)
91+
StoreOpts func(opts *store.StoreOptions)
9192
IndexCachePreManifestsHook func(*memcached.MemcachedDeployment)
9293
BucketCachePreManifestsHook func(*memcached.MemcachedDeployment)
9394
CompactorPreManifestsHook func(*compactor.CompactorStatefulSet)
@@ -939,6 +940,7 @@ func (o *ObservatoriumMetrics) makeStore(instanceCfg *ObservatoriumMetricsInstan
939940
},
940941
}
941942
opts.AddExtraOpts("--store.enable-index-header-lazy-reader")
943+
executeIfNotNil(instanceCfg.StoreOpts, opts)
942944

943945
indexCacheName := fmt.Sprintf("observatorium-thanos-store-index-cache-memcached-%s", instanceCfg.InstanceName)
944946
bucketCacheName := fmt.Sprintf("observatorium-thanos-store-bucket-cache-memcached-%s", instanceCfg.InstanceName)

0 commit comments

Comments
 (0)