Skip to content

Conversation

linoyaslan
Copy link
Contributor

@linoyaslan linoyaslan commented Aug 21, 2025

To provide a consistent, out-of-the-box monitoring experience, the Assisted Installer automatically enables cluster monitoring for all operators that support this feature (i.e., those with the "Enable Operator-recommended cluster monitoring..." option in OperatorHub). This choice is enabled by default and cannot be changed by the user during the assisted installation process. To enforce this, the Assisted Installer's code must perform two key actions for each monitoring-aware operator:

  1. apply the openshift.io/cluster-monitoring=true label to the operator's pre-created namespace
  2. if an operator does not provide its own RBAC, the installer code is responsible for creating the standard Prometheus Role and RoleBinding in the operator's namespace.

Note: When a developer adds a new operator to Assisted, they are responsible for the following:

  1. Check the operator's CSV for the openshift.io/cluster-monitoring=true annotation. If the annotation is present, add the openshift.io/cluster-monitoring=true namespace label.
  2. Check if the operator already includes its own Prometheus Role and RoleBinding. If not, add the logic to the installer to create them.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 21, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 21, 2025

@linoyaslan: This pull request references MGMT-21395 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.20.0" version, but no target version was set.

In response to this:

For operators with “Enable Operator-recommended cluster monitoring on this namespace” option in OperatorHub, Assisted treats it as always on (users can’t toggle it). Since we pre-create the operator namespaces, we must set openshift.io/cluster-monitoring=true by default for those operators.

Note: When new operators are added to Assisted, developers should verify whether their namespace requires this cluster-monitoring label and add it accordingly.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@linoyaslan linoyaslan marked this pull request as draft August 21, 2025 09:22
@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 21, 2025
@openshift-ci openshift-ci bot requested review from danielerez and omertuc August 21, 2025 09:23
Copy link

openshift-ci bot commented Aug 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: linoyaslan

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 21, 2025
@linoyaslan linoyaslan force-pushed the add_monitoring_label_to_operators_namespace branch 2 times, most recently from 526f3e6 to 4ad8105 Compare August 21, 2025 09:57
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 21, 2025

@linoyaslan: This pull request references MGMT-21395 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.20.0" version, but no target version was set.

In response to this:

For operators with “Enable Operator-recommended cluster monitoring on this namespace” option in OperatorHub, Assisted treats it as always on (users can’t toggle it). Since we pre-create the operator namespaces, we must set openshift.io/cluster-monitoring=true by default for those operators.

Note: When new operators are added to Assisted, developers should verify whether their namespace requires this cluster-monitoring label and add it accordingly.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@linoyaslan
Copy link
Contributor Author

/cc @tiraboschi @danmanor

@openshift-ci openshift-ci bot requested review from danmanor and tiraboschi August 21, 2025 10:02
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 21, 2025

@linoyaslan: This pull request references MGMT-21395 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.20.0" version, but no target version was set.

In response to this:

For operators with “Enable Operator-recommended cluster monitoring on this namespace” option in OperatorHub, Assisted treats it as always on (users can’t toggle it). Since we pre-create the operator namespaces, we must set openshift.io/cluster-monitoring=true by default for those operators.

Note: When new operators are added to Assisted, developers should verify whether their namespace requires this cluster-monitoring label and add it accordingly.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@linoyaslan linoyaslan marked this pull request as ready for review August 21, 2025 10:07
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 21, 2025
@openshift-ci openshift-ci bot requested a review from jhernand August 21, 2025 10:09
@linoyaslan linoyaslan marked this pull request as draft August 21, 2025 10:15
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 21, 2025
@linoyaslan linoyaslan force-pushed the add_monitoring_label_to_operators_namespace branch from 4ad8105 to d43badd Compare August 25, 2025 08:41
@openshift-ci openshift-ci bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 25, 2025
@linoyaslan linoyaslan force-pushed the add_monitoring_label_to_operators_namespace branch from d43badd to b43291e Compare August 25, 2025 12:14
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 25, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 25, 2025

@linoyaslan: This pull request references MGMT-21395 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.20.0" version, but no target version was set.

In response to this:

To provide a consistent, out-of-the-box monitoring experience, the Assisted Installer automatically enables cluster monitoring for all operators that support this feature (i.e., those with the "Enable Operator-recommended cluster monitoring..." option in OperatorHub). This choice is enabled by default and cannot be changed by the user during the assisted installation process. To enforce this, the Assisted Installer's code must perform two key actions for each monitoring-aware operator:

  1. apply the openshift.io/cluster-monitoring=true label to the operator's pre-created namespace
  2. if an operator does not provide its own RBAC, the installer code is responsible for creating the standard Prometheus Role and RoleBinding in the operator's namespace.

Note: When a developer adds a new operator to Assisted, they are responsible for the following:

  1. Check the operator's CSV for the operatorframework.io/cluster-monitoring=true annotation. If the annotation is present, ensure the installer's code is updated to apply the monitoring label to that operator's namespace.
  2. check if the operator already includes its own Prometheus Role and RoleBinding. If not, add the logic to the installer to create them.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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
Copy link

openshift-ci-robot commented Aug 25, 2025

@linoyaslan: This pull request references MGMT-21395 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.20.0" version, but no target version was set.

In response to this:

To provide a consistent, out-of-the-box monitoring experience, the Assisted Installer automatically enables cluster monitoring for all operators that support this feature (i.e., those with the "Enable Operator-recommended cluster monitoring..." option in OperatorHub). This choice is enabled by default and cannot be changed by the user during the assisted installation process. To enforce this, the Assisted Installer's code must perform two key actions for each monitoring-aware operator:

  1. apply the openshift.io/cluster-monitoring=true label to the operator's pre-created namespace
  2. if an operator does not provide its own RBAC, the installer code is responsible for creating the standard Prometheus Role and RoleBinding in the operator's namespace.

Note: When a developer adds a new operator to Assisted, they are responsible for the following:

  1. Check the operator's CSV for the operatorframework.io/cluster-monitoring=true annotation. If the annotation is present, ensure the installer's code is updated to apply the monitoring label to that operator's namespace.
  2. Check if the operator already includes its own Prometheus Role and RoleBinding. If not, add the logic to the installer to create them.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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
Copy link

openshift-ci-robot commented Aug 25, 2025

@linoyaslan: This pull request references MGMT-21395 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.20.0" version, but no target version was set.

In response to this:

To provide a consistent, out-of-the-box monitoring experience, the Assisted Installer automatically enables cluster monitoring for all operators that support this feature (i.e., those with the "Enable Operator-recommended cluster monitoring..." option in OperatorHub). This choice is enabled by default and cannot be changed by the user during the assisted installation process. To enforce this, the Assisted Installer's code must perform two key actions for each monitoring-aware operator:

  1. apply the openshift.io/cluster-monitoring=true label to the operator's pre-created namespace
  2. if an operator does not provide its own RBAC, the installer code is responsible for creating the standard Prometheus Role and RoleBinding in the operator's namespace.

Note: When a developer adds a new operator to Assisted, they are responsible for the following:

  1. Check the operator's CSV for the openshift.io/cluster-monitoring=true annotation. If the annotation is present, ensure the installer's code is updated to apply the monitoring label to that operator's namespace.
  2. Check if the operator already includes its own Prometheus Role and RoleBinding. If not, add the logic to the installer to create them.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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
Copy link

openshift-ci-robot commented Aug 25, 2025

@linoyaslan: This pull request references MGMT-21395 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.20.0" version, but no target version was set.

In response to this:

To provide a consistent, out-of-the-box monitoring experience, the Assisted Installer automatically enables cluster monitoring for all operators that support this feature (i.e., those with the "Enable Operator-recommended cluster monitoring..." option in OperatorHub). This choice is enabled by default and cannot be changed by the user during the assisted installation process. To enforce this, the Assisted Installer's code must perform two key actions for each monitoring-aware operator:

  1. apply the openshift.io/cluster-monitoring=true label to the operator's pre-created namespace
  2. if an operator does not provide its own RBAC, the installer code is responsible for creating the standard Prometheus Role and RoleBinding in the operator's namespace.

Note: When a developer adds a new operator to Assisted, they are responsible for the following:

  1. Check the operator's CSV for the openshift.io/cluster-monitoring=true annotation. If the annotation is present, add the openshift.io/cluster-monitoring=true namespace label.
  2. Check if the operator already includes its own Prometheus Role and RoleBinding. If not, add the logic to the installer to create them.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@linoyaslan linoyaslan force-pushed the add_monitoring_label_to_operators_namespace branch 2 times, most recently from 78785f4 to 71a294a Compare August 25, 2025 12:34
@linoyaslan linoyaslan marked this pull request as ready for review August 25, 2025 14:23
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 25, 2025
@openshift-ci openshift-ci bot requested review from adriengentil and gamli75 August 25, 2025 14:24
@linoyaslan
Copy link
Contributor Author

/cc @tiraboschi @danmanor I'd appreciate your review, thanks!

@linoyaslan linoyaslan changed the title MGMT-21395: Add cluster monitoring label to operators's namespace with monitoring enabled by default MGMT-21395: Add monitoring label and Prometheus RBAC for supported OLM operators Aug 25, 2025
@linoyaslan linoyaslan force-pushed the add_monitoring_label_to_operators_namespace branch from 71a294a to c113d18 Compare August 25, 2025 14:27
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.68%. Comparing base (b9c6e63) to head (fc18ffc).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7949   +/-   ##
=======================================
  Coverage   73.67%   73.68%           
=======================================
  Files         400      400           
  Lines       68565    68567    +2     
=======================================
+ Hits        50516    50522    +6     
+ Misses      15338    15336    -2     
+ Partials     2711     2709    -2     
Files with missing lines Coverage Δ
internal/operators/lso/manifest.go 81.81% <100.00%> (+1.17%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@linoyaslan linoyaslan force-pushed the add_monitoring_label_to_operators_namespace branch from c113d18 to 391d2ba Compare August 26, 2025 12:51
@linoyaslan
Copy link
Contributor Author

/retest

@pastequo
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 28, 2025
@linoyaslan
Copy link
Contributor Author

/retest

@linoyaslan linoyaslan force-pushed the add_monitoring_label_to_operators_namespace branch from 391d2ba to 8c46735 Compare August 28, 2025 10:08
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 28, 2025
…M operators

To provide a consistent, out-of-the-box monitoring experience, the Assisted Installer automatically enables cluster monitoring for all operators that support this feature (i.e., those with the "Enable Operator-recommended cluster monitoring..." option in OperatorHub). This choice is enabled by default and cannot be changed by the user during the assisted installation process. To enforce this, the Assisted Installer's code must perform two key actions for each monitoring-aware operator:

1. apply the openshift.io/cluster-monitoring=true label to the operator's pre-created namespace
2. if an operator does not provide its own RBAC, the installer code is responsible for creating the standard Prometheus Role and RoleBinding in the operator's namespace.

Note: When a developer adds a new operator to Assisted, they are responsible for the following:

1. Check the operator's CSV for the openshift.io/cluster-monitoring=true annotation. If the annotation is present, add the openshift.io/cluster-monitoring=true namespace label.
2. Check if the operator already includes its own Prometheus Role and RoleBinding. If not, add the logic to the installer to create them.
@linoyaslan linoyaslan force-pushed the add_monitoring_label_to_operators_namespace branch from 8c46735 to fc18ffc Compare August 28, 2025 10:55
@pastequo
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 28, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD b9c6e63 and 2 for PR HEAD fc18ffc in total

Copy link

openshift-ci bot commented Aug 28, 2025

@linoyaslan: all tests passed!

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.

@openshift-merge-bot openshift-merge-bot bot merged commit d727215 into openshift:master Aug 28, 2025
26 checks passed
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/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants