-
Notifications
You must be signed in to change notification settings - Fork 584
[WIP] STOR-2859: Add APIs for disabling force detach in KCM operator #2668
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
base: master
Are you sure you want to change the base?
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@dobsonj: This pull request references STOR-2859 which is a valid jira issue. DetailsIn response to this:
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. |
|
Hello @dobsonj! Some important instructions when contributing to openshift/api: |
|
@dobsonj: GitHub didn't allow me to request PR reviews from the following users: openshift/storage. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
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. |
📝 WalkthroughWalkthroughAdds a new cluster-scoped ControllerManager CRD to the config/v1 API. Introduces types: ControllerManager, ControllerManagerSpec (with ForceDetachOnTimeoutPolicy), ControllerManagerStatus, ControllerManagerList, and string constants for the policy values. Adds autogenerated deepcopy methods, Swagger and OpenAPI schema entries, a feature-gated CRD manifest entry, and a packaged CRD YAML for controllermanagers.config.openshift.io. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.5.0)Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented Comment |
|
@dobsonj: This pull request references STOR-2859 which is a valid jira issue. DetailsIn response to this:
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. |
1 similar comment
|
@dobsonj: This pull request references STOR-2859 which is a valid jira issue. DetailsIn response to this:
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. |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@config/v1/types_controllermanager.go`:
- Around line 12-15: The +openshift:api-approved annotation in the header
comment of types_controllermanager.go still uses the placeholder URL
"https://github.com/openshift/api/pull/XYZ"; update that annotation to the
actual API approval PR URL (the real pull request number) so it passes API
approval checks—locate the comment block containing
"+openshift:api-approved.openshift.io" and replace the placeholder with the real
PR link.
In `@config/v1/zz_generated.featuregated-crd-manifests.yaml`:
- Around line 199-203: Update the placeholder ApprovedPRNumber value for the CRD
entry with CRDName controllermanagers.config.openshift.io: replace
"https://github.com/openshift/api/pull/XYZ" with the real approval PR URL (or
the correct PR number path) so the ApprovedPRNumber field references the actual
merged/approved PR; ensure the URL is valid and points to the final PR in the
openshift/api repo.
🧹 Nitpick comments (1)
config/v1/types_controllermanager.go (1)
34-42: Addomitemptyto the optional enum field for consistency.
ForceDetachOnTimeoutis marked optional and should useomitemptyin its JSON tag, consistent with other optional enum fields throughout the config/v1 API group (e.g.,Platform,CgroupMode,WorkerLatencyProfile). This keeps manifests clean by omitting the field when unset.♻️ Proposed change
- ForceDetachOnTimeout ForceDetachOnTimeoutPolicy `json:"forceDetachOnTimeout"` + ForceDetachOnTimeout ForceDetachOnTimeoutPolicy `json:"forceDetachOnTimeout,omitempty"`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@payload-manifests/crds/0000_10_config-operator_01_controllermanagers.crd.yaml`:
- Line 5: The api approval annotation api-approved.openshift.io currently
contains a placeholder URL ending with "XYZ"; replace that placeholder with the
actual GitHub PR URL for the OpenShift API approval (the final merged/approved
PR number), e.g. https://github.com/openshift/api/pull/<PR_NUMBER>, ensuring the
annotation value is a valid URL and kept as a single string on the
api-approved.openshift.io line in the CRD manifest so gating will recognize it.
| kind: CustomResourceDefinition | ||
| metadata: | ||
| annotations: | ||
| api-approved.openshift.io: https://github.com/openshift/api/pull/XYZ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace placeholder API approval URL before merge.
The api-approved.openshift.io annotation still points to a placeholder XYZ, which violates API approval compliance and will fail gating. Update it to the actual approval PR URL.
🔧 Suggested fix
- api-approved.openshift.io: https://github.com/openshift/api/pull/XYZ
+ api-approved.openshift.io: https://github.com/openshift/api/pull/2668📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| api-approved.openshift.io: https://github.com/openshift/api/pull/XYZ | |
| api-approved.openshift.io: https://github.com/openshift/api/pull/2668 |
🤖 Prompt for AI Agents
In
`@payload-manifests/crds/0000_10_config-operator_01_controllermanagers.crd.yaml`
at line 5, The api approval annotation api-approved.openshift.io currently
contains a placeholder URL ending with "XYZ"; replace that placeholder with the
actual GitHub PR URL for the OpenShift API approval (the final merged/approved
PR number), e.g. https://github.com/openshift/api/pull/<PR_NUMBER>, ensuring the
annotation value is a valid URL and kept as a single string on the
api-approved.openshift.io line in the CRD manifest so gating will recognize it.
|
@dobsonj: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
User description
https://issues.redhat.com/browse/STOR-2859
/cc @openshift/storage
PR Type
Enhancement
Description
Add ControllerManager API for cluster-wide Kubernetes controller manager configuration
Introduce ForceDetachOnTimeoutPolicy to control volume force detach behavior
Generate deepcopy, swagger documentation, and OpenAPI schema definitions
Create CustomResourceDefinition manifest for controllermanagers resource
Diagram Walkthrough
File Walkthrough
types_controllermanager.go
Define ControllerManager API types and policyconfig/v1/types_controllermanager.go
ControllerManagerstruct with metadata, spec, and statusfields
ControllerManagerSpecwithForceDetachOnTimeoutPolicyfieldForceDetachOnTimeoutPolicytype with Enabled and Disabledconstants
ControllerManagerListstruct for list operationszz_generated.deepcopy.go
Generate deepcopy functions for ControllerManager typesconfig/v1/zz_generated.deepcopy.go
ControllerManager
zz_generated.swagger_doc_generated.go
Generate swagger documentation for ControllerManagerconfig/v1/zz_generated.swagger_doc_generated.go
zz_generated.openapi.go
Generate OpenAPI schema definitions for ControllerManageropenapi/generated_openapi/zz_generated.openapi.go
ControllerManagerList, ControllerManagerSpec, and
ControllerManagerStatus
with properties and dependencies
with items array
ControllerManagerStatus schema functions
0000_10_config-operator_01_controllermanagers.crd.yaml
Create ControllerManager CustomResourceDefinition manifestconfig/v1/zz_generated.crd-manifests/0000_10_config-operator_01_controllermanagers.crd.yaml
controllermanagers.config.openshift.io
Disabled, and empty string values
zz_generated.featuregated-crd-manifests.yaml
Register ControllerManager in featuregated manifestsconfig/v1/zz_generated.featuregated-crd-manifests.yaml
manifests
information
AAA_ungated.yaml
Create ungated ControllerManager CRD manifestconfig/v1/zz_generated.featuregated-crd-manifests/controllermanagers.config.openshift.io/AAA_ungated.yaml
controllermanagers resource
annotations
requirement