Skip to content

WRKLDS-1676: OCM config: Remove obsolete fields #2364

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

Conversation

tchap
Copy link
Contributor

@tchap tchap commented Jun 11, 2025

As OCM moves to use library-go for configuration, some fields present into OpenShiftControllerManagerConfig are no longer needed since they are actually accessed via GenericOperatorConfig.

There is no stability promise tied to these fields, they are only being used internally by OCM.

Leaving the fields there commented out as a tombstone.

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

openshift-ci-robot commented Jun 11, 2025

@tchap: This pull request references WRKLDS-1676 which is a valid jira issue.

In response to this:

As OCM moves to use library-go for configuration, some fields present into OpenShiftControllerManagerConfig are no longer needed since they are actually accessed via GenericOperatorConfig.

Leaving the fields there commented out as a tombstone.

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.

Copy link
Contributor

openshift-ci bot commented Jun 11, 2025

Hello @tchap! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 11, 2025
@openshift-ci openshift-ci bot requested review from everettraven and JoelSpeed June 11, 2025 08:38
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 11, 2025

@tchap: This pull request references WRKLDS-1676 which is a valid jira issue.

In response to this:

As OCM moves to use library-go for configuration, some fields present into OpenShiftControllerManagerConfig are no longer needed since they are actually accessed via GenericOperatorConfig.

There is no stability promise tied to these fields, they are only being used internally by OCM.

Leaving the fields there commented out as a tombstone.

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.

@tchap
Copy link
Contributor Author

tchap commented Jun 11, 2025

/hold

I actually need to check more thoroughly where the struct is being used and whether the fields are really unused.

@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 Jun 11, 2025
As OCM moves to use library-go for configuration, some fields present
into OpenShiftControllerManagerConfig are no longer needed since they
are actually accessed via GenericOperatorConfig.

Leaving the fields there commented out as a tombstone.
@tchap tchap force-pushed the openshiftcontrollermanager-obsolete-fields branch from 8dafc05 to f5a5920 Compare June 11, 2025 09:00
@openshift-ci openshift-ci bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 11, 2025
@tchap
Copy link
Contributor Author

tchap commented Jun 11, 2025

/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 Jun 11, 2025
@@ -258,7 +258,10 @@ const (
type OpenShiftControllerManagerConfig struct {
metav1.TypeMeta `json:",inline"`

KubeClientConfig configv1.KubeClientConfig `json:"kubeClientConfig"`
// KubeClientConfig is no longer being used.
Copy link
Contributor

Choose a reason for hiding this comment

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

No longer? Or never? Was it ever actually implemented?

Copy link
Contributor Author

@tchap tchap Jun 11, 2025

Choose a reason for hiding this comment

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

It was. Before using library-go to setup the executable, OCM used this field to configure the client. Kubeconfig file path is now being passed in using a command line flag and library-go machinery uses that to init a client.

Copy link
Contributor

Choose a reason for hiding this comment

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

And who typically writes to this object? Is this generally only written to by an operator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's used by OCMO or Hypershift. But neither accesses this field.

Hypershift only sets it statically in a YAML and it's been updated for the library-go way of config in openshift/hypershift#6203

OCMO doesn't set the field, because OCM uses in-cluster config there and an explicit kubeconfig is not needed.

Copy link
Contributor

openshift-ci bot commented Jun 11, 2025

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

@JoelSpeed
Copy link
Contributor

/lgtm

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

openshift-ci bot commented Jun 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoelSpeed, tchap

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 Jun 11, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 7941651 into openshift:master Jun 11, 2025
12 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: ose-cluster-config-api
This PR has been included in build ose-cluster-config-api-container-v4.20.0-202506111547.p0.g7941651.assembly.stream.el9.
All builds following this will include this PR.

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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants