Skip to content
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

OCPBUGS-32510: tweak Prometheus RBAC setup as a temp fix. #2334

Merged
merged 2 commits into from
May 6, 2024

Conversation

machine424
Copy link
Contributor

OCPBUGS-32510: adapt the metrics-server readiness probe config.

See the added comments and https://docs.google.com/document/d/1VpGBbV30-bb-eq-JYi2q5B8Hyll37tp30OrHcnCifpo/edit?usp=sharing for more details

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

/cc @slashpai
/cc @simonpasquier

@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Apr 29, 2024
@openshift-ci-robot
Copy link
Contributor

@machine424: This pull request references Jira Issue OCPBUGS-32510, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @juzhao

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

OCPBUGS-32510: adapt the metrics-server readiness probe config.

See the added comments and https://docs.google.com/document/d/1VpGBbV30-bb-eq-JYi2q5B8Hyll37tp30OrHcnCifpo/edit?usp=sharing for more details

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

/cc @slashpai
/cc @simonpasquier

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Apr 29, 2024
@@ -40,6 +40,32 @@ func (t *MetricsServerTask) Run(ctx context.Context) error {
}

func (t *MetricsServerTask) create(ctx context.Context) error {
{
// TODO: This is a temporary workaround until the requirements for https://github.com/openshift/cluster-monitoring-operator/pull/2329
Copy link
Contributor Author

Choose a reason for hiding this comment

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

put it here to make it easier to revert + to not bend MetricsClientCATask and make it look as a good fix.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 29, 2024
@machine424
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-hypershift-release-4.16-periodics-e2e-aws-ovn-conformance openshift/api#1865

Copy link
Contributor

openshift-ci bot commented Apr 29, 2024

@machine424: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-hypershift-release-4.16-periodics-e2e-aws-ovn-conformance

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/f690e7b0-061b-11ef-9fd2-47a92bba20d9-0

@machine424
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node openshift/api#1865

Copy link
Contributor

openshift-ci bot commented Apr 29, 2024

@machine424: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/076427f0-061c-11ef-9ef0-5fb887b41964-0

@machine424
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-release-master-ci-4.16-e2e-aws-ovn openshift/api#1865

Copy link
Contributor

openshift-ci bot commented Apr 29, 2024

@machine424: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-ci-4.16-e2e-aws-ovn

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/4fbb7170-061c-11ef-8f50-6f9c4ffaf8f8-0

Copy link
Contributor

openshift-ci bot commented Apr 29, 2024

@machine424: 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/versions 1fc3e3a link false /test versions

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/test-infra repository. I understand the commands that are listed here.

// Because the metrics-server Pods rely on the system:serviceaccount:openshift-monitoring:prometheus-k8s SA to reach kubelet,
// the task needs to ensure that the necessary RBAC permissions for that SA are set up before starting the Pods to avoid scrape failures.
// For detailed information, refer to: https://issues.redhat.com/browse/OCPBUGS-32510.
cr, err := t.factory.PrometheusK8sClusterRole()
Copy link
Member

Choose a reason for hiding this comment

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

should we not have prometheus service account also setup ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the prometheus SA is not used directly.
metrics-server just uses a client cert that is issued for the prometheus SA and kubelet uses the RBAC authz to make sure that client=metrics-server=prometheus SA has the required permissions (get /metrics of nodes)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(kubelet will not check that the SA exists and RBAC can be defined and applied even for non existing SA, IIRC)

@simonpasquier
Copy link
Contributor

/skip

@machine424
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node openshift/api#1865,openshift/kubernetes-metrics-server#26,openshift/kubernetes#1960,openshift/machine-config-operator#4338

Copy link
Contributor

openshift-ci bot commented May 2, 2024

@machine424: it appears that you have attempted to use some version of the payload command, but your comment was incorrectly formatted and cannot be acted upon. See the docs for usage info.

@machine424
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node openshift/api#1865 openshift/kubernetes-metrics-server#26 openshift/kubernetes#1960 openshift/machine-config-operator#4338

Copy link
Contributor

openshift-ci bot commented May 2, 2024

@machine424: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/03f35510-0896-11ef-802d-50a22c76e308-0

@machine424
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node openshift/api#1865 openshift/kubernetes-metrics-server#26 openshift/kubernetes#1960 openshift/machine-config-operator#4338

Copy link
Contributor

openshift-ci bot commented May 3, 2024

@machine424: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/8e57e7a0-091a-11ef-938e-27baa3eaae5d-0

@machine424
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node openshift/api#1865 openshift/kubernetes-metrics-server#26 openshift/kubernetes#1960 openshift/machine-config-operator#4338

Copy link
Contributor

openshift-ci bot commented May 3, 2024

@machine424: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/8c828630-092c-11ef-9a2d-618f2d601a8f-0

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

/hold
/lgtm

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 3, 2024
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 3, 2024
@machine424
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node openshift/api#1878 openshift/kubernetes-metrics-server#26 openshift/kubernetes#1960

Copy link
Contributor

openshift-ci bot commented May 3, 2024

@machine424: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/7edfae70-0965-11ef-9e7d-f89ee8db2303-0

slashpai added a commit to slashpai/api that referenced this pull request May 3, 2024
@slashpai
Copy link
Member

slashpai commented May 3, 2024

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node openshift/api#1865

Copy link
Contributor

openshift-ci bot commented May 3, 2024

@slashpai: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/d0cc0670-096a-11ef-9dbc-acfab9cb5559-0

@slashpai
Copy link
Member

slashpai commented May 3, 2024

/payload-job-with-prs periodic-ci-openshift-hypershift-release-4.16-periodics-e2e-aws-ovn-conformance openshift/api#1865

Copy link
Contributor

openshift-ci bot commented May 3, 2024

@slashpai: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-hypershift-release-4.16-periodics-e2e-aws-ovn-conformance

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/f6994d40-096a-11ef-92d9-e176bdd904a1-0

@machine424
Copy link
Contributor Author

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node openshift/api#1878 openshift/kubernetes-metrics-server#26 openshift/kubernetes#1960

Copy link
Contributor

openshift-ci bot commented May 6, 2024

@machine424: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/56fe3270-0b7a-11ef-8f34-6b42ed678a2f-0

@slashpai
Copy link
Member

slashpai commented May 6, 2024

/lgtm

Copy link
Contributor

openshift-ci bot commented May 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: machine424, simonpasquier, slashpai

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:
  • OWNERS [machine424,simonpasquier,slashpai]

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

@simonpasquier
Copy link
Contributor

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 6, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 93a4599 into openshift:master May 6, 2024
17 checks passed
@openshift-ci-robot
Copy link
Contributor

@machine424: Jira Issue OCPBUGS-32510: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with /jira refresh.

Jira Issue OCPBUGS-32510 has not been moved to the MODIFIED state.

In response to this:

OCPBUGS-32510: adapt the metrics-server readiness probe config.

See the added comments and https://docs.google.com/document/d/1VpGBbV30-bb-eq-JYi2q5B8Hyll37tp30OrHcnCifpo/edit?usp=sharing for more details

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

/cc @slashpai
/cc @simonpasquier

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build cluster-monitoring-operator-container-v4.17.0-202405061412.p0.g93a4599.assembly.stream.el9 for distgit cluster-monitoring-operator.
All builds following this will include this PR.

slashpai added a commit to slashpai/api that referenced this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants