Skip to content

etcd-shield: fix metrics in staging #6834

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sadlerap
Copy link
Contributor

Metrics for etcd-shield were misconfigured in two ways. First, the labels selectors were incorrect and not applied to the relevant service. Applying the correct labels and label selectors allows the servicemonitor to pick up the correct metrics endpoints. Second, because etcd-shield is run not as a user workload but as a core service, the prometheus-k8s service account in the namespace openshift-monitoring needs to be given appropriate permissions to look at resources in the etcd-shield namespace. This is fixed by adding a role and a rolebinding.

@sadlerap sadlerap requested review from gbenhaim and filariow June 23, 2025 23:41
@openshift-ci openshift-ci bot requested a review from hugares June 23, 2025 23:41
Copy link

openshift-ci bot commented Jun 23, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sadlerap

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sadlerap
Copy link
Contributor Author

/retest

@sadlerap sadlerap force-pushed the etcd-shield-metrics-staging branch from 9c01ece to 30b0bb0 Compare June 24, 2025 13:14
@sadlerap
Copy link
Contributor Author

/retest

1 similar comment
@sadlerap
Copy link
Contributor Author

/retest

@sadlerap
Copy link
Contributor Author

/retest

@filariow do you have any ideas why e2e tests might be failing? None of the components that fail are related to etcd-shield.

@sadlerap
Copy link
Contributor Author

/retest

@filariow
Copy link
Member

try rebasing on upstream/main

Metrics for etcd-shield were misconfigured in two ways.  First, the
labels selectors were incorrect and not applied to the relevant service.
Applying the correct labels and label selectors allows the
servicemonitor to pick up the correct metrics endpoints.  Second,
because etcd-shield is run not as a user workload but as a core service,
the prometheus-k8s service account in the namespace
`openshift-monitoring` needs to be given appropriate permissions to look
at resources in the `etcd-shield` namespace.  This is fixed by adding a
role and a rolebinding.

Signed-off-by: Andy Sadler <[email protected]>
@sadlerap sadlerap force-pushed the etcd-shield-metrics-staging branch from 30b0bb0 to d4bbc1b Compare June 25, 2025 20:07
Copy link

openshift-ci bot commented Jun 25, 2025

@sadlerap: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/appstudio-e2e-tests d4bbc1b link true /test appstudio-e2e-tests

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants