Skip to content

Conversation

TheRealJon
Copy link
Member

@TheRealJon TheRealJon commented Sep 9, 2025

This PR implements two stories:

CONSOLE-4765: Automate console tech preview flag via cluster FeatureSet

Implement automatic enabling of console tech preview features when the cluster FeatureSet is configured to TechPreviewNoUpgrade. The console operator now monitors the cluster's FeatureGate resource and sets the TechPreviewEnabled flag in the console-config ConfigMap accordingly.

Key changes:

  • Add FeatureGate informer to console operator
  • Implement SyncTechPreview function following established patterns
  • Add TechPreviewEnabled field to ClusterInfo in console config
  • Update config builder to support tech preview flag
  • Add comprehensive test coverage

CONSOLE-4767: Grant console service account watch permissions for ClusterCatalogs

Add get, list, and watch permissions for clustercatalogs in the operators.coreos.com
API group to the console ClusterRole. This enables the console backend to monitor
ClusterCatalog resources in real-time and provide accurate OperatorHub status updates.

🤖 Generated with Claude Code

Implement automatic enabling of console tech preview features when the
cluster FeatureSet is configured to TechPreviewNoUpgrade. The console
operator now monitors the cluster's FeatureGate resource and sets the
TechPreviewEnabled flag in the console-config ConfigMap accordingly.

Key changes:
- Add FeatureGate informer to console operator
- Implement SyncTechPreview function following established patterns
- Add TechPreviewEnabled field to ClusterInfo in console config
- Update config builder to support tech preview flag
- Add comprehensive test coverage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 9, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 9, 2025

@TheRealJon: This pull request references CONSOLE-4765 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 story to target the "4.21.0" version, but no target version was set.

In response to this:

Implement automatic enabling of console tech preview features when the cluster FeatureSet is configured to TechPreviewNoUpgrade. The console operator now monitors the cluster's FeatureGate resource and sets the TechPreviewEnabled flag in the console-config ConfigMap accordingly.

Key changes:

  • Add FeatureGate informer to console operator
  • Implement SyncTechPreview function following established patterns
  • Add TechPreviewEnabled field to ClusterInfo in console config
  • Update config builder to support tech preview flag
  • Add comprehensive test coverage

🤖 Generated with Claude Code

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 openshift-ci bot requested review from jhadvig and spadgett September 9, 2025 21:20
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 9, 2025
@TheRealJon TheRealJon changed the title CONSOLE-4765: Automate console tech preview flag via cluster FeatureSet CONSOLE-4765, CONSOLE-4767: Automate console tech preview flag via cluster FeatureSet, Grant console service account watch permissions for ClusterCatalogs Sep 9, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 9, 2025

@TheRealJon: This pull request references CONSOLE-4765 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 story to target the "4.21.0" version, but no target version was set.

This pull request references CONSOLE-4767 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 story to target the "4.21.0" version, but no target version was set.

In response to this:

Implement automatic enabling of console tech preview features when the cluster FeatureSet is configured to TechPreviewNoUpgrade. The console operator now monitors the cluster's FeatureGate resource and sets the TechPreviewEnabled flag in the console-config ConfigMap accordingly.

Key changes:

  • Add FeatureGate informer to console operator
  • Implement SyncTechPreview function following established patterns
  • Add TechPreviewEnabled field to ClusterInfo in console config
  • Update config builder to support tech preview flag
  • Add comprehensive test coverage

🤖 Generated with Claude Code

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.

@TheRealJon
Copy link
Member Author

TheRealJon commented Sep 9, 2025

/hold

Test with openshift/console#15477 and openshift/console#15466

@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 Sep 9, 2025
…sterCatalogs

Add get, list, and watch permissions for clustercatalogs in the operators.coreos.com
API group to the console ClusterRole. This enables the console backend to monitor
ClusterCatalog resources in real-time and provide accurate OperatorHub status updates.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 10, 2025

@TheRealJon: This pull request references CONSOLE-4765 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 story to target the "4.21.0" version, but no target version was set.

This pull request references CONSOLE-4767 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 story to target the "4.21.0" version, but no target version was set.

In response to this:

This PR implements two stories:

CONSOLE-4765: Automate console tech preview flag via cluster FeatureSet

Implement automatic enabling of console tech preview features when the cluster FeatureSet is configured to TechPreviewNoUpgrade. The console operator now monitors the cluster's FeatureGate resource and sets the TechPreviewEnabled flag in the console-config ConfigMap accordingly.

Key changes:

  • Add FeatureGate informer to console operator
  • Implement SyncTechPreview function following established patterns
  • Add TechPreviewEnabled field to ClusterInfo in console config
  • Update config builder to support tech preview flag
  • Add comprehensive test coverage

CONSOLE-4767: Grant console service account watch permissions for ClusterCatalogs

Add get, list, and watch permissions for clustercatalogs in the operators.coreos.com
API group to the console ClusterRole. This enables the console backend to monitor
ClusterCatalog resources in real-time and provide accurate OperatorHub status updates.

🤖 Generated with Claude Code

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.

@TheRealJon
Copy link
Member Author

/unhold

@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 Sep 11, 2025
@TheRealJon
Copy link
Member Author

QE Approver
/assign @yapei

Docs Approver:
/assign @jseseCCS

PX Approver:
/assign @sferich888

Copy link
Contributor

openshift-ci bot commented Sep 12, 2025

@TheRealJon: GitHub didn't allow me to assign the following users: jseseCCS.

Note that only openshift members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

QE Approver
/assign @yapei

Docs Approver:
/assign @jseseCCS

PX Approver:
/assign @sferich888

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.

@yapei
Copy link
Contributor

yapei commented Sep 15, 2025

verified the PR changes with following test scenarios

  • when TechPreviewNoUpgrade is enabled(FeatureGate.spec.featureSet == TechPreviewNoUpgrade), cm/console-config will be updated with techPreviewEnabled: true in clusterInfo
  • console pods will log warn info when TechPreviewNoUpgrade is enabled

/verified by @yapei

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Sep 15, 2025
@openshift-ci-robot
Copy link
Contributor

@yapei: This PR has been marked as verified by @yapei.

In response to this:

verified the PR changes with following test scenarios

  • when TechPreviewNoUpgrade is enabled(FeatureGate.spec.featureSet == TechPreviewNoUpgrade), cm/console-config will be updated with techPreviewEnabled: true in clusterInfo
  • console pods will log warn info when TechPreviewNoUpgrade is enabled

/verified by @yapei

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.

@sferich888
Copy link

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Sep 16, 2025
Copy link

@jseseCCS jseseCCS left a comment

Choose a reason for hiding this comment

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

back to you @TheRealJon

@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Sep 17, 2025
@jseseCCS
Copy link

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Sep 17, 2025
@TheRealJon
Copy link
Member Author

@yapei @Leo6Leo Do you mind taking another look after the recent feedback changes?

Copy link
Contributor

openshift-ci bot commented Sep 17, 2025

@TheRealJon: 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.

@yapei
Copy link
Contributor

yapei commented Sep 18, 2025

verified with latest changes, it looks good

$ oc patch  featuregate cluster -p '{"spec": {"featureSet": "TechPreviewNoUpgrade"}}' --type merge
featuregate.config.openshift.io/cluster patched
$ oc get cm console-config -n openshift-console -o yaml | grep clusterInfo -A10
    clusterInfo:
      consoleBaseAddress: https://console-openshift-console.apps.ci-ln-h9qi0rb-76ef8.aws-2.ci.openshift.org
      controlPlaneTopology: HighlyAvailable
      masterPublicURL: https://api.ci-ln-h9qi0rb-76ef8.aws-2.ci.openshift.org:6443
      nodeArchitectures:
      - amd64
      nodeOperatingSystems:
      - linux
      releaseVersion: 4.21.0-0-2025-09-18-021036-test-ci-ln-h9qi0rb-latest
      techPreviewEnabled: true
    contentSecurityPolicyEnabled: true
$ oc logs console-6755cd4bc5-572jk -n openshift-console
W0918 03:17:33.324010       1 main.go:183] Technology Preview features are enabled. These features are experimental and not supported for production use. If you encounter issues, send feedback through the usual support or bug-reporting channels.
I0918 03:17:33.324044       1 main.go:264] Console plugins are enabled in following order:
......................................................
$  oc logs console-operator-75486874fb-qfbbl  -n openshift-console-operator | grep -i "tech.*preview"
I0918 03:17:04.516651       1 sync_v400.go:575] Console Technology Preview features enabled based on cluster FeatureSet TechPreviewNoUpgrade.
I0918 03:17:05.442203       1 sync_v400.go:575] Console Technology Preview features enabled based on cluster FeatureSet TechPreviewNoUpgrade.
I0918 03:17:06.444818       1 sync_v400.go:575] Console Technology Preview features enabled based on cluster FeatureSet TechPreviewNoUpgrade.
....................................

Copy link
Contributor

@Leo6Leo Leo6Leo left a comment

Choose a reason for hiding this comment

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

Thanks @TheRealJon , i don't see any big issues with the PR, but I do have few questions that will be worthy for considering. Please see the comments on the PR and let me know how do you think.

techPreviewEnabled, techPreviewErrReason, techPreviewErr := co.SyncTechPreview()
statusHandler.AddConditions(status.HandleProgressingOrDegraded("TechPreviewSync", techPreviewErrReason, techPreviewErr))
if techPreviewErr != nil {
return statusHandler.FlushAndReturn(techPreviewErr)
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like the error return here will cause the whole sync to terminate and exit. Will that be okay? If the techPreview is not a core console necessity. I saw customLogosErr in the few lines above is implemented like this way too, so I would assume it should be fine?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this is a pattern used throughout our operator. It is signaling that there is something wrong with either our operator or the cluster configuration. When our operator is unable to sync something, it should indicate that it is degraded in it's conditions.

}

techPreviewEnabled = featureGate.Spec.FeatureSet == configv1.TechPreviewNoUpgrade

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add something like this, to log when there are changes to the TechPreview mode (i.e. being toggled)

Copy link
Member Author

Choose a reason for hiding this comment

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

We aren't very consistent on this, and more frequently don't do this as far as I can tell.

- validatingwebhookconfigurations
verbs:
- get
- apiGroups:
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any documentations or note we need to update to reflect this role change?

Copy link
Member Author

Choose a reason for hiding this comment

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

None that I know of.

@TheRealJon
Copy link
Member Author

verified with latest changes, it looks good

/verified by @yapei
/label qe-approved

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Sep 19, 2025
@openshift-ci-robot
Copy link
Contributor

@TheRealJon: This PR has been marked as verified by @yapei.

In response to this:

verified with latest changes, it looks good

/verified by @yapei
/label qe-approved

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 openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Sep 19, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 19, 2025

@TheRealJon: This pull request references CONSOLE-4765 which is a valid jira issue.

This pull request references CONSOLE-4767 which is a valid jira issue.

In response to this:

This PR implements two stories:

CONSOLE-4765: Automate console tech preview flag via cluster FeatureSet

Implement automatic enabling of console tech preview features when the cluster FeatureSet is configured to TechPreviewNoUpgrade. The console operator now monitors the cluster's FeatureGate resource and sets the TechPreviewEnabled flag in the console-config ConfigMap accordingly.

Key changes:

  • Add FeatureGate informer to console operator
  • Implement SyncTechPreview function following established patterns
  • Add TechPreviewEnabled field to ClusterInfo in console config
  • Update config builder to support tech preview flag
  • Add comprehensive test coverage

CONSOLE-4767: Grant console service account watch permissions for ClusterCatalogs

Add get, list, and watch permissions for clustercatalogs in the operators.coreos.com
API group to the console ClusterRole. This enables the console backend to monitor
ClusterCatalog resources in real-time and provide accurate OperatorHub status updates.

🤖 Generated with Claude Code

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.

@Leo6Leo
Copy link
Contributor

Leo6Leo commented Sep 22, 2025

Thanks @TheRealJon for the clarification, and everything makes sense to me. And all the tests are passing without any issues. Therefore, LGTM!

/lgtm

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

openshift-ci bot commented Sep 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Leo6Leo, TheRealJon

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-merge-bot openshift-merge-bot bot merged commit ca22e61 into openshift:main Sep 22, 2025
13 checks passed
@TheRealJon TheRealJon deleted the CONSOLE-4765 branch September 22, 2025 13:50
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. docs-approved Signifies that Docs has signed off on this PR 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. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants