-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
Signed-off-by: Thibault Mange <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,10 @@ import ( | |
"github.com/observatorium/observatorium/configuration_go/abstr/kubernetes/thanos/store" | ||
"github.com/observatorium/observatorium/configuration_go/k8sutil" | ||
Check failure on line 13 in services_go/observatorium/metrics.go GitHub Actions / build
|
||
"github.com/observatorium/observatorium/configuration_go/openshift" | ||
Check failure on line 14 in services_go/observatorium/metrics.go GitHub Actions / build
|
||
"github.com/observatorium/observatorium/configuration_go/schemas/thanos/common" | ||
"github.com/observatorium/observatorium/configuration_go/schemas/thanos/log" | ||
Check failure on line 15 in services_go/observatorium/metrics.go GitHub Actions / build
|
||
"github.com/observatorium/observatorium/configuration_go/schemas/thanos/objstore" | ||
Check failure on line 16 in services_go/observatorium/metrics.go GitHub Actions / build
|
||
objstore3 "github.com/observatorium/observatorium/configuration_go/schemas/thanos/objstore/s3" | ||
Check failure on line 17 in services_go/observatorium/metrics.go GitHub Actions / build
|
||
thanostime "github.com/observatorium/observatorium/configuration_go/schemas/thanos/time" | ||
Check failure on line 18 in services_go/observatorium/metrics.go GitHub Actions / build
|
||
trclient "github.com/observatorium/observatorium/configuration_go/schemas/thanos/tracing/client" | ||
Check failure on line 19 in services_go/observatorium/metrics.go GitHub Actions / build
|
||
"github.com/observatorium/observatorium/configuration_go/schemas/thanos/tracing/jaeger" | ||
routev1 "github.com/openshift/api/route/v1" | ||
|
@@ -54,10 +55,14 @@ func makeReceiveRouter(namespace, imageTag string, cfg ThanosReceiveRouterConfig | |
router.PodResources.Requests[corev1.ResourceMemory] = resource.MustParse("200Gi") | ||
router.PodResources.Limits[corev1.ResourceMemory] = resource.MustParse("200Gi") | ||
router.Sidecars = []k8sutil.ContainerProvider{makeJaegerAgent("observatorium-tools")} | ||
receiveLimitsConfigMap := "receive-limits-config-" + cfg.Tenant | ||
router.ConfigMaps[receiveLimitsConfigMap] = map[string]string{ | ||
"receive-limits.yaml": cfg.ReceiveLimits.String(), | ||
} | ||
|
||
// Router config | ||
router.Options.LogLevel = common.LogLevelWarn | ||
router.Options.LogFormat = common.LogFormatLogfmt | ||
router.Options.LogLevel = log.LogLevelWarn | ||
router.Options.LogFormat = log.LogFormatLogfmt | ||
router.Options.TracingConfig = &trclient.TracingConfig{ | ||
Type: trclient.Jaeger, | ||
Config: jaeger.Config{ | ||
|
@@ -81,7 +86,7 @@ func makeReceiveRouter(namespace, imageTag string, cfg ThanosReceiveRouterConfig | |
routerDeployment := getObject[*appsv1.Deployment](manifests) | ||
routerDeployment.Spec.Template.Spec.Volumes = []corev1.Volume{ | ||
k8sutil.NewPodVolumeFromConfigMap("hashring-config", generatedHashringCm), | ||
k8sutil.NewPodVolumeFromConfigMap("receive-limits-config", "receive-limits-config"), | ||
k8sutil.NewPodVolumeFromConfigMap("receive-limits-config", receiveLimitsConfigMap), | ||
} | ||
|
||
// Add thanos-receive-controller | ||
|
@@ -140,8 +145,8 @@ func makeReceiveIngestor(namespace, imageTag string, cfg ThanosTenantConfig[rece | |
ingestor.Sidecars = []k8sutil.ContainerProvider{makeJaegerAgent("observatorium-tools")} | ||
|
||
// Router config | ||
ingestor.Options.LogLevel = common.LogLevelWarn | ||
ingestor.Options.LogFormat = common.LogFormatLogfmt | ||
ingestor.Options.LogLevel = log.LogLevelWarn | ||
ingestor.Options.LogFormat = log.LogFormatLogfmt | ||
ingestor.Options.TracingConfig = &trclient.TracingConfig{ | ||
Type: trclient.Jaeger, | ||
Config: jaeger.Config{ | ||
|
@@ -198,7 +203,7 @@ func makeCompactor(namespace, imageTag string, cfg ThanosTenantConfig[compactor. | |
compactorSatefulset.Sidecars = []k8sutil.ContainerProvider{makeOauthProxy(10902, namespace, compactorSatefulset.Name, tlsSecret)} | ||
|
||
// Compactor config | ||
compactorSatefulset.Options.LogLevel = common.LogLevelWarn | ||
compactorSatefulset.Options.LogLevel = log.LogLevelWarn | ||
compactorSatefulset.Options.RetentionResolutionRaw = 0 | ||
compactorSatefulset.Options.RetentionResolution5m = 0 | ||
compactorSatefulset.Options.RetentionResolution1h = 0 | ||
|
@@ -353,11 +358,11 @@ func makeStore(namespace, imageTag string, cfg ThanosTenantConfig[store.StoreSta | |
} | ||
|
||
// Store config | ||
storeStatefulSet.Options.LogLevel = common.LogLevelWarn | ||
storeStatefulSet.Options.LogFormat = common.LogFormatLogfmt | ||
storeStatefulSet.Options.LogLevel = log.LogLevelWarn | ||
storeStatefulSet.Options.LogFormat = log.LogFormatLogfmt | ||
storeStatefulSet.Options.IgnoreDeletionMarksDelay = 24 * time.Hour | ||
maxTimeDur := time.Duration(-22) * time.Hour | ||
storeStatefulSet.Options.MaxTime = &common.TimeOrDurationValue{Dur: &maxTimeDur} | ||
storeStatefulSet.Options.MaxTime = &thanostime.TimeOrDurationValue{Dur: &maxTimeDur} | ||
storeStatefulSet.Options.SelectorRelabelConfigFile = "/tmp/config/hashmod-config.yaml" | ||
storeStatefulSet.Options.TracingConfig = &trclient.TracingConfig{ | ||
Type: trclient.Jaeger, | ||
|