Skip to content
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

Merged

Conversation

helenfeng737
Copy link
Contributor

What type of PR is this?

/kind cleanup

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?:

None

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 27, 2020
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 27, 2020
Copy link
Member

@SataQiu SataQiu left a 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

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 28, 2020
Copy link
Contributor

@rosti rosti left a 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{}
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@helenfeng737 helenfeng737 force-pushed the remove-false-positive-warning branch 2 times, most recently from 9d6ebbb to ed94385 Compare July 29, 2020 23:48
@helenfeng737
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

@helenfeng737
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce-100-performance

@helenfeng737
Copy link
Contributor Author

/test pull-kubernetes-kubemark-e2e-gce-big

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 4, 2020
@helenfeng737
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce-100-performance

@helenfeng737
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce-ubuntu-containerd

@helenfeng737
Copy link
Contributor Author

/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.
Copy link
Member

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

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2020
@neolit123
Copy link
Member

/lgtm
thanks @ZhiFeng1993
this should merge once 1.19 code freeze is over.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 6, 2020
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@helenfeng737
Copy link
Contributor Author

/test pull-kubernetes-e2e-kind

@neolit123
Copy link
Member

/milestone v1.20-phase-doc-cleanup

@justaugustus
Copy link
Member

/test pull-kubernetes-e2e-gce-ubuntu-containerd

@k8s-ci-robot k8s-ci-robot merged commit 8297d5f into kubernetes:master Aug 27, 2020
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. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. 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.

remove "WARNING: kubeadm cannot validate component configs for API groups"
7 participants