Skip to content

RHOBS-904: Standalone Store and Compactor for RH Resource Optimisation (ROS) Managed Service #932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions magefiles/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,14 @@ func stageGatewayTenants(m TemplateMaps, namespace string) *corev1.Secret {
issuerURL: https://sso.redhat.com/auth/realms/redhat-external
redirectURL: https://observatorium.api.stage.openshift.com/oidc/telemeter/callback
usernameClaim: preferred_username
- id: B5B43A0A-3BC5-4D8D-BAAB-E424A835AA7D
name: ros
oidc:
clientID: ${CLIENT_ID}
clientSecret: ${CLIENT_SECRET}
issuerURL: https://sso.redhat.com/auth/realms/redhat-external
redirectURL: https://observatorium.api.stage.openshift.com/oidc/telemeter/callback
usernameClaim: preferred_username
`,
},
}
Expand Down
63 changes: 62 additions & 1 deletion magefiles/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,14 @@ var StageImages = ParamMap[string]{
"STORE02W": thanosImage,
"STORE2W90D": thanosImage,
"STORE90D+": thanosImage,
"STORE_ROS": thanosImage,
"STORE_DEFAULT": thanosImage,
"RECEIVE_ROUTER": thanosImage,
"RECEIVE_INGESTOR_TELEMETER": thanosImage,
"RECEIVE_INGESTOR_DEFAULT": thanosImage,
"RULER": thanosImage,
"COMPACT_DEFAULT": thanosImage,
"COMPACT_ROS": thanosImage,
"COMPACT_TELEMETER": thanosImage,
"QUERY": thanosImage,
"QUERY_FRONTEND": thanosImage,
Expand All @@ -90,12 +92,14 @@ var StageVersions = ParamMap[string]{
"STORE02W": thanosVersionStage,
"STORE2W90D": thanosVersionStage,
"STORE90D+": thanosVersionStage,
"STORE_ROS": thanosVersionStage,
"STORE_DEFAULT": thanosVersionStage,
"RECEIVE_ROUTER": thanosVersionStage,
"RECEIVE_INGESTOR_TELEMETER": thanosVersionStage,
"RECEIVE_INGESTOR_DEFAULT": thanosVersionStage,
"RULER": thanosVersionStage,
"COMPACT_DEFAULT": thanosVersionStage,
"COMPACT_ROS": thanosVersionStage,
"COMPACT_TELEMETER": thanosVersionStage,
"QUERY": thanosVersionStage,
"QUERY_FRONTEND": thanosVersionStage,
Expand All @@ -108,12 +112,14 @@ var StageLogLevels = ParamMap[string]{
"STORE02W": logLevels[1],
"STORE2W90D": logLevels[1],
"STORE90D+": logLevels[1],
"STORE_ROS": logLevels[1],
"STORE_DEFAULT": logLevels[1],
"RECEIVE_ROUTER": logLevels[1],
"RECEIVE_INGESTOR_TELEMETER": logLevels[1],
"RECEIVE_INGESTOR_DEFAULT": logLevels[1],
"RULER": logLevels[1],
"COMPACT_DEFAULT": logLevels[1],
"COMPACT_ROS": logLevels[1],
"COMPACT_TELEMETER": logLevels[1],
"QUERY": logLevels[1],
"QUERY_FRONTEND": logLevels[1],
Expand All @@ -125,11 +131,13 @@ var StageStorageSize = ParamMap[v1alpha1.StorageSize]{
"STORE02W": "512Mi",
"STORE2W90D": "512Mi",
"STORE90D+": "512Mi",
"STORE_ROS": "512Mi",
"STORE_DEFAULT": "512Mi",
"RECEIVE_TELEMETER": "3Gi",
"RECEIVE_DEFAULT": "3Gi",
"RULER": "512Mi",
"COMPACT_DEFAULT": "512Mi",
"COMPACT_ROS": "512Mi",
"COMPACT_TELEMETER": "512Mi",
}

Expand All @@ -138,6 +146,7 @@ var StageReplicas = ParamMap[int32]{
"STORE02W": 3,
"STORE2W90D": 3,
"STORE90D+": 3,
"STORE_ROS": 3,
"STORE_DEFAULT": 3,
"RECEIVE_ROUTER": 3,
"RECEIVE_INGESTOR_TELEMETER": 6,
Expand Down Expand Up @@ -181,6 +190,16 @@ var StageResourceRequirements = ParamMap[corev1.ResourceRequirements]{
corev1.ResourceMemory: resource.MustParse("2Gi"),
},
},
"STORE_ROS": corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("50m"),
corev1.ResourceMemory: resource.MustParse("512Mi"),
},
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("250m"),
corev1.ResourceMemory: resource.MustParse("2Gi"),
},
},
"STORE_DEFAULT": corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("50m"),
Expand Down Expand Up @@ -241,6 +260,16 @@ var StageResourceRequirements = ParamMap[corev1.ResourceRequirements]{
corev1.ResourceMemory: resource.MustParse("5Gi"),
},
},
"COMPACT_ROS": corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("100m"),
corev1.ResourceMemory: resource.MustParse("1Gi"),
},
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("1"),
corev1.ResourceMemory: resource.MustParse("5Gi"),
},
},
"COMPACT_TELEMETER": corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("100m"),
Expand Down Expand Up @@ -339,13 +368,21 @@ var StageObjectStorageBucket = ParamMap[v1alpha1.ObjectStorageConfig]{
},
Optional: ptr.To(false),
},
"ROS": v1alpha1.ObjectStorageConfig{
Key: "thanos.yaml",
LocalObjectReference: corev1.LocalObjectReference{
Name: "observatorium-ros-objectstorage",
},
Optional: ptr.To(false),
},
}

// ProductionImages is a map of production images.
var ProductionImages = ParamMap[string]{
"STORE02W": thanosImage,
"STORE2W90D": thanosImage,
"STORE90D+": thanosImage,
"STORE_ROS": thanosImage,
"STORE_DEFAULT": thanosImage,
"QUERY": thanosImage,
"QUERY_FRONTEND": thanosImage,
Expand All @@ -362,6 +399,7 @@ var ProductionVersions = ParamMap[string]{
"STORE02W": thanosVersionProd,
"STORE2W90D": thanosVersionProd,
"STORE90D+": thanosVersionProd,
"STORE_ROS": thanosVersionProd,
"STORE_DEFAULT": thanosVersionProd,
"QUERY": thanosVersionProd,
"QUERY_FRONTEND": thanosVersionProd,
Expand All @@ -374,6 +412,7 @@ var ProductionLogLevels = ParamMap[string]{
"STORE02W": logLevels[0],
"STORE2W90D": logLevels[0],
"STORE90D+": logLevels[0],
"STORE_ROS": logLevels[0],
"STORE_DEFAULT": logLevels[0],
"QUERY": logLevels[0],
"QUERY_FRONTEND": logLevels[0],
Expand All @@ -385,6 +424,7 @@ var ProductionStorageSize = ParamMap[v1alpha1.StorageSize]{
"STORE02W": "300Gi",
"STORE2W90D": "300Gi",
"STORE90D+": "300Gi",
"STORE_ROS": "300Gi",
"STORE_DEFAULT": "300Gi",
}

Expand All @@ -393,6 +433,7 @@ var ProductionReplicas = ParamMap[int32]{
"STORE02W": 2,
"STORE2W90D": 2,
"STORE90D+": 1,
"STORE_ROS": 0, //TODO @moadz RHOBS-904: Temporary stage-only configuration for ROS disabled in Production.
"STORE_DEFAULT": 2,
"QUERY": 3,
"QUERY_FRONTEND": 3,
Expand Down Expand Up @@ -420,6 +461,12 @@ var ProductionResourceRequirements = ParamMap[corev1.ResourceRequirements]{
corev1.ResourceMemory: resource.MustParse("512Mi"),
},
},
"STORE_ROS": corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("50m"),
corev1.ResourceMemory: resource.MustParse("512Mi"),
},
},
"STORE_DEFAULT": corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("50m"),
Expand Down Expand Up @@ -506,6 +553,13 @@ var ProductionObjectStorageBucket = ParamMap[v1alpha1.ObjectStorageConfig]{
},
Optional: ptr.To(false),
},
"ROS": v1alpha1.ObjectStorageConfig{
Key: "thanos.yaml",
LocalObjectReference: corev1.LocalObjectReference{
Name: "observatorium-ros-objectstorage",
},
Optional: ptr.To(false),
},
}

var StageMaps = TemplateMaps{
Expand Down Expand Up @@ -562,12 +616,14 @@ var LocalImages = ParamMap[string]{
"STORE02W": localThanosImage,
"STORE2W90D": localThanosImage,
"STORE90D+": localThanosImage,
"STORE_ROS": localThanosImage,
"STORE_DEFAULT": localThanosImage,
"RECEIVE_ROUTER": localThanosImage,
"RECEIVE_INGESTOR_TELEMETER": localThanosImage,
"RECEIVE_INGESTOR_DEFAULT": localThanosImage,
"RULER": localThanosImage,
"COMPACT_DEFAULT": localThanosImage,
"COMPACT_ROS": localThanosImage,
"COMPACT_TELEMETER": localThanosImage,
"QUERY": localThanosImage,
"QUERY_FRONTEND": localThanosImage,
Expand All @@ -580,13 +636,14 @@ var LocalImages = ParamMap[string]{
var LocalVersions = ParamMap[string]{
"STORE02W": localThanosVersion,
"STORE2W90D": localThanosVersion,
"STORE90D+": localThanosVersion,
"STORE_ROS": localThanosVersion,
"STORE_DEFAULT": localThanosVersion,
"RECEIVE_ROUTER": localThanosVersion,
"RECEIVE_INGESTOR_TELEMETER": localThanosVersion,
"RECEIVE_INGESTOR_DEFAULT": localThanosVersion,
"RULER": localThanosVersion,
"COMPACT_DEFAULT": localThanosVersion,
"COMPACT_ROS": localThanosVersion,
"COMPACT_TELEMETER": localThanosVersion,
"QUERY": localThanosVersion,
"QUERY_FRONTEND": localThanosVersion,
Expand All @@ -597,11 +654,13 @@ var LocalStorageSize = ParamMap[v1alpha1.StorageSize]{
"STORE02W": "1Gi",
"STORE2W90D": "1Gi",
"STORE90D+": "1Gi",
"STORE_ROS": "1Gi",
"STORE_DEFAULT": "1Gi",
"RECEIVE_TELEMETER": "1Gi",
"RECEIVE_DEFAULT": "1Gi",
"RULER": "1Gi",
"COMPACT_DEFAULT": "1Gi",
"COMPACT_ROS": "1Gi",
"COMPACT_TELEMETER": "1Gi",
}

Expand All @@ -610,12 +669,14 @@ var LocalResourceRequirements = ParamMap[corev1.ResourceRequirements]{
"STORE02W": getLocalResources(),
"STORE2W90D": getLocalResources(),
"STORE90D+": getLocalResources(),
"STORE_ROS": getLocalResources(),
"STORE_DEFAULT": getLocalResources(),
"RECEIVE_ROUTER": getLocalResources(),
"RECEIVE_INGESTOR_TELEMETER": getLocalResources(),
"RECEIVE_INGESTOR_DEFAULT": getLocalResources(),
"RULER": getLocalResources(),
"COMPACT_DEFAULT": getLocalResources(),
"COMPACT_ROS": getLocalResources(),
"COMPACT_TELEMETER": getLocalResources(),
"QUERY": getLocalResources(),
"QUERY_FRONTEND": getLocalResources(),
Expand Down
Loading