-
Notifications
You must be signed in to change notification settings - Fork 253
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
Introduce nfd client for image compatibilty #1932
Introduce nfd client for image compatibilty #1932
Conversation
Hi @mfranczy. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
✅ Deploy Preview for kubernetes-sigs-nfd ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
b269c77
to
86ddc6a
Compare
/ok-to-test |
86ddc6a
to
e05aa41
Compare
1097251
to
1d6d96a
Compare
7491e5a
to
6227de7
Compare
@marquiz PTAL |
/milestone v0.17 |
eccc960
to
f605488
Compare
MatchStatus provides details about successful expressions and their results, which are the matched host features. Additionally, a new flag controls rule processing behavior: it can either stop at the first error or continue processing all expressions and rules. Signed-off-by: Marcin Franczyk <[email protected]>
Signed-off-by: Marcin Franczyk <[email protected]>
Signed-off-by: Marcin Franczyk <[email protected]>
f605488
to
5b57312
Compare
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.
@mfranczy very good job on this one. A few minor comments/questions below.
Also, WDYT about announcing this as experimental (see #1932 (review))?
api/nfd/v1alpha1/types.go
Outdated
@@ -298,6 +300,13 @@ type MatchExpression struct { | |||
Value MatchValue `json:"value,omitempty"` | |||
} | |||
|
|||
func (m MatchExpression) String() string { |
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.
Hmm, this now sticks into my eye. We should at least move this into a separate file out of types.go
, to keep the type definitions file clean.
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.
Fixed. Moved to utils.go
.
} | ||
|
||
if readAccessToken && readPassword { | ||
return fmt.Errorf("cannot use --read-access-token and --read-password at the same time") |
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.
nit: the error message does not seem to be in sync with the actual flags
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.
Good catch! Fixed.
validateNodeCmd.Flags().StringVar(&username, "reg-username", "", "registry username") | ||
validateNodeCmd.Flags().BoolVar(&readPassword, "reg-password-stdin", false, "read registry password from stdin") | ||
validateNodeCmd.Flags().BoolVar(&readAccessToken, "reg-token-stdin", false, "read registry access token from stdin") |
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.
note/nit: I'd consider having --registry-username
or just plain --username
(and ditto for the other reg-* flags), not combining abbreviated and fully spelled out words in the name. WDYT?
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.
I like the idea, I changed to the fully spelled out words.
Signed-off-by: Marcin Franczyk <[email protected]>
Thanks. I've added the experimental note in the nfd client and image compatibility docs. |
/retest |
|
||
The `--output-json` flag prints the output as a JSON object. | ||
|
||
#### --reg-username |
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.
Ach, now that the flag names were updated we need to update the documentation, too. Sorry about that 🙈
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.
Of course. No worries, my bad. Fixed.
Signed-off-by: Marcin Franczyk <[email protected]>
/test pull-node-feature-discovery-build-image-cross-generic |
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.
Wow @mfranczy, I'm ready to merge.
Let's hope something greater good comes out of this work 🚀
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ArangoGutierrez, ChaoyiHuang, marquiz, mfranczy 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 |
If @ArangoGutierrez is still around I'll let him do the last check 😄 |
/retest |
/test pull-node-feature-discovery-build-image-cross-generic |
/retest |
/lgtm |
LGTM label has been added. Git tree hash: 40dfbe159aca1fdb5bdad98fe3d14e3e4ecaf376
|
The PR provides an initial implementation of #1845. Image compatibility is defined by Node Feature Rules, so a change was also necessary there. A run strategy pattern has been implemented to control rule execution, allowing either all rules to be executed or stopping at the first failure.
The work is still in progress but is ready for the first review round.Remaining tasks:- [x] write unit tests- [x] write documentation and add appropriate code comments- [x] refine the commands