Skip to content

ROX-31149: Improve monitoring deployment customization#83

Open
JoukoVirtanen wants to merge 6 commits intomainfrom
jv-ROX-31149-improve-monitoring-deployment-customization
Open

ROX-31149: Improve monitoring deployment customization#83
JoukoVirtanen wants to merge 6 commits intomainfrom
jv-ROX-31149-improve-monitoring-deployment-customization

Conversation

@JoukoVirtanen
Copy link
Contributor

@JoukoVirtanen JoukoVirtanen commented Feb 13, 2026

Currently monitoring for the long running clusters the config for the Prometheus is overwritten. This was done in a PR for increasing the berserker load. That change required changes to the Prometheus config. A comment in that PR suggested another method for adjusting the Prometheus config for the long running cluster. This PR implements that suggestion.

See the companion stackrox/stackrox PR stackrox/stackrox#18928

Testing is explained there.

Copy link
Collaborator

@tommartensen tommartensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach works, but I have a concern about the general structure of the scripts in the start-secured-cluster directory.

# Replace the prometheus ConfigMap with one that doesn't scrape as much info from berserker containers
kubectl -n stackrox delete configmap prometheus
kubectl create -f "${SCRIPT_DIR}"/prometheus.yaml
# Compare version to determine which script to use
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have two different versions, what is the difference between them? I would prefer to have just start-secured-cluster.sh and if necessary control logic and functions for each version there.
That should reduce code duplication and make the intents clearer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have combined the scripts.

version_major=$(echo "${version_major_minor}" | cut -d. -f1)
version_minor=$(echo "${version_major_minor}" | cut -d. -f2)

# Determine if version is 4.11 or later (compare as integers, not floats)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a Jira under https://issues.redhat.com/browse/ROX-33013 for the cleanup, when 4.11 is the last lowest supported ACS version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +48 to +49
--set resources.requests.memory="8Gi"
--set resources.limits.memory="8Gi"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't these two values be set through the same mechanism as for < 4.11 ?
In the end, they're both overriding the resources.requests.memory and resources.limits.memory value in the monitoring chart.

# Replace the prometheus ConfigMap with one that doesn't scrape as much info from berserker containers
kubectl -n stackrox delete configmap prometheus
kubectl create -f "${SCRIPT_DIR}"/prometheus.yaml
# Pre-4.11 only: Replace prometheus ConfigMap
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use kubectl apply -f?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants