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
Remove false positive warning in kubeadm cmd #93483
Remove false positive warning in kubeadm cmd #93483
Conversation
Hi @ZhiFeng1993. Thanks for your PR. I'm waiting for a kubernetes 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/test-infra repository. |
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.
Thanks @ZhiFeng1993!
/ok-to-test
/kind cleanup
/priority backlog
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.
Thanks for taking this on @ZhiFeng1993 !
@@ -345,6 +345,5 @@ func Validate(clusterCfg *kubeadmapi.ClusterConfiguration) field.ErrorList { | |||
groups = append(groups, group) | |||
} | |||
sort.Strings(groups) // The sort is needed to make the output predictable | |||
klog.Warningf("WARNING: kubeadm cannot validate component configs for API groups %v", groups) | |||
return field.ErrorList{} |
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.
@ZhiFeng1993 , can you remove everything else from this func but this line?
Also, the "Currently it prints a warining ..." comment above the function needs removal too.
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.
Done. I'm a bit confused about this function though. What's the point of returning an empty list?
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.
we spoke briefly about this function during yesterday's kubeadm office hours meeting.
there are two options:
- remove the function until we need it.
- add a TODO on top of the function to identify this is reserved for component config validation in the future.
@rosti should be able to provide more information.
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.
@ZhiFeng1993
Done. I'm a bit confused about this function though. What's the point of returning an empty list?
An older version of this function was performing actual validation of component configs in the previous implementation of the package. In the new implementation this becomes impossible due to the fact that we can no longer import the validation logic of each component.
As a drop-in replacement, I have started an effort to introduce a standard command line interface for each Kubernetes component to validate its config when invoked from the CLI.
Hence, when I re-implemented the componentconfigs
package, this function's old body was deleted and replaced with a "warning" placeholder. However, validating the configs is not so critical, plus the effort for the standard CLI for validation has ground to a stop ATM.
So this function can either be deleted or left empty with a TODO. I don't have a personal preference actually.
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.
Thank you both for the explanation. Since you guys have future plans for this function, I'll do as suggested.
9d6ebbb
to
ed94385
Compare
/test pull-kubernetes-e2e-gce |
/test pull-kubernetes-e2e-gce-100-performance |
/test pull-kubernetes-kubemark-e2e-gce-big |
0328629
to
a856a85
Compare
/test pull-kubernetes-e2e-gce-100-performance |
/test pull-kubernetes-e2e-gce-ubuntu-containerd |
/test pull-kubernetes-verify |
@@ -338,13 +336,7 @@ func GetVersionStates(clusterCfg *kubeadmapi.ClusterConfiguration, client client | |||
} | |||
|
|||
// Validate is a placeholder for performing a validation on an already loaded component configs in a ClusterConfiguration | |||
// Currently it prints a warning that no validation was performed | |||
// TODO: This empty function is a place holder for future work on standard CLI interface for config validation. |
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.
requesting a minor adjustment to the TODO:
TODO: investigate if the function can be repurposed for validating component config via CLI
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123, ZhiFeng1993 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 |
1a63d6c
to
b90228f
Compare
/lgtm |
/retest Review the full test history for this PR. Silence the bot with an |
/test pull-kubernetes-e2e-kind |
/milestone v1.20-phase-doc-cleanup |
/test pull-kubernetes-e2e-gce-ubuntu-containerd |
What type of PR is this?
What this PR does / why we need it:
This PR is to remove false positive warning message when using several kubeadm commands.
Which issue(s) this PR fixes:
Fixes kubernetes/kubeadm#2230
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: