-
Couldn't load subscription status.
- Fork 576
[WIP] AGENT-1330: machineconfiguration/v1alpha1: add InternalReleaseImage #2510
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?
[WIP] AGENT-1330: machineconfiguration/v1alpha1: add InternalReleaseImage #2510
Conversation
|
@andfasano: This pull request references AGENT-1330 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:
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 @andfasano! Some important instructions when contributing to openshift/api: |
|
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
9ea943a to
9eca225
Compare
0d80867 to
7ea433e
Compare
|
/retest-required |
|
I'm currently experimenting with AI for API review, hopefully some of the content it is generating is helpful for you to improve your API The following code blocks were generated by Claude I think the linting issues are actually not the response I'd like. Instead lets try and make the zero values not valid (required fields or For the comments, it has highlighted that you haven't explained what happens when the optional fields are omitted, though I'm not sure its suggestions are super helpful, please review and think about what you'd actually like to put in. If it has identified something where you can't think of a reason why it wouldn't be present, then maybe the field should actually be required Quizzing specifically about whether all validations were documented, some further output |
7b60a33 to
ab6545c
Compare
|
/api-review |
cf83224 to
c2f669c
Compare
|
/test verify |
f330e2a to
6b6941e
Compare
|
|
||
| // InternalReleaseImageSpec defines the desired state of a InternalReleaseImage. | ||
| type InternalReleaseImageSpec struct { | ||
| // releases is a list of release bundle identifiers that the user wants to |
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.
(suggestion from claude): we should document the constraints (maximum # you can specify)
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.
Isn't sufficient to specify the +kubebuilder:validation:MaxItems value?
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.
Right, that's the validation, it's asking for the godoc to explicitly state for the user what the maximum is, something like This field can contain between x and y release bundles
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.
Ah ok
a9c080e to
5bb2da8
Compare
|
/retest |
5bb2da8 to
ee91dd4
Compare
|
/retest |
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.
Overall the structure makes more sense to me. A few questions/comments on the new MCN fields (and the previous question on the conditions)
| // +listType=map | ||
| // +listMapKey=name | ||
| // +kubebuilder:validation:MaxItems=5 | ||
| // +optional |
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.
Just thinking out loud, maybe we should have this be required (if the IRI status exists) so at it would always reflect what the daemon is currently detecting? And if we don't detect anything we just have an empty list?
| // +listMapKey=name | ||
| // +kubebuilder:validation:MaxItems=5 | ||
| // +optional | ||
| AvailableReleases []InternalReleaseImageRef `json:"availableReleases,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.
Now that we have the split, what get's reflected here? If e.g. each control plane node doesn't currently have the same available (mounted) releases, would this reflect it as available if any control plane node is hosting that image? Or only when all control plane nodes have it mounted and reporting?
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.
As mentioned before, the idea was to keep IRI as the main (centralized) user interface both for editing and monitoring (for the sake of simplicity). As soon as a new release will be detected on on of the node, and reported on its MCN status, it will be added as well in the IRI availableRelease field.
So, the IRI reports the info from a cluster-wide scope point of view, where the the MCN remains scoped only for the node
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.
iiuc a release will be added here if and only if all nodes have it properly stored. So, iiuc, the only possibilities for a realease to not be in all nodes are:
- The image is still being copied.
- There's a failure in the copy process. I guess we will add details in the MCN and here, isn't it? What would each CR report in its conditions?
| // +kubebuilder:validation:MinItems=1 | ||
| // +kubebuilder:validation:MaxItems=5 | ||
| // +optional | ||
| InstalledReleases []InternalReleaseImageDetailedRef `json:"installedReleases,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.
Same question as above
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.
Yep, as above, the IRI will report that a release is installed (at a cluster level) only when all the node successfully completed the installation
63bf18d to
eb17df7
Compare
eb17df7 to
b91c71a
Compare
| // be used to amend the `spec.Releases` field to add a new release bundle to the cluster. | ||
| // An empty value indicates that no ISOs are currently being detected on any control plane | ||
| // node. | ||
| // Must not exceed 5 entries. |
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.
| crdName: internalreleaseimages.machineconfiguration.openshift.io | ||
| featureGate: NoRegistryClusterOperations | ||
| tests: | ||
| onCreate: |
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.
No onUpdate tests? Look like a CR that really needs them. (add/remove a release)
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.
Ok, will followup
…re adopted for the MCN status field
|
@andfasano: The following tests failed, say
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. |
This patch adds the new
InternalReleaseImageCRD. See openshift/enhancements#1821 for additional details