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

kubeadm: don't use the Docker SDK in util/system/docker_validator* #79449

Merged
merged 1 commit into from
Jul 1, 2019

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented Jun 26, 2019

What this PR does / why we need it:

Instead of creating a Docker client and fetching an Info object
from the Docker enpoint, call the "docker info" command
and populate a local dockerInfo struct from JSON output.

Also add unit tests.

This change affects "test/e2e_node/e2e_node_suite_test.go"
as it consumes this Docker validator by calling
"system.ValidateSpec()".

this decouples the validator and kubeadm from the Docker SDK.

Which issue(s) this PR fixes:

xref kubernetes/kubeadm#1638

Special notes for your reviewer:
NONE

Does this PR introduce a user-facing change?:

NONE

should not be user facing.

/assign @yastij
@kubernetes/sig-cluster-lifecycle-pr-reviews
cc @dims

/kind cleanup
/priority important-soon

@k8s-ci-robot k8s-ci-robot added 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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 26, 2019
@k8s-ci-robot k8s-ci-robot requested review from dixudx and kad June 26, 2019 23:32
@k8s-ci-robot k8s-ci-robot added area/kubeadm approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 26, 2019
@neolit123
Copy link
Member Author

@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Jun 26, 2019
@neolit123
Copy link
Member Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 26, 2019
@neolit123 neolit123 force-pushed the kubeadm-docker-validator branch 3 times, most recently from bed1a5a to 9b87f1c Compare June 27, 2019 00:47
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 27, 2019
@@ -112,15 +112,7 @@
"github.com/coreos/etcd/pkg/tlsutil",
"github.com/coreos/etcd/pkg/transport",
"github.com/davecgh/go-spew/spew",
"github.com/docker/distribution/digestset",
"github.com/docker/distribution/reference",
Copy link
Member Author

@neolit123 neolit123 Jun 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like we depend on docker still; possibly due to the ipvs imports [1]
should be updated in separate PRs.

"github.com/docker/go-connections/nat",
"github.com/docker/go-connections/sockets",
"github.com/docker/go-connections/tlsconfig",
"github.com/docker/go-units",
"github.com/docker/libnetwork/ipvs",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[1]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly pulled to use consts IIRC, I'll send a PR to consolidate our const usage (rbac, kube-proxy etc..)

Instead of creating a Docker client and fetching an Info object
from the docker enpoint, call the "docker info" command
and populate a local dockerInfo struct from JSON output.

Also
- add unit tests.
- update import boss and bazel.

This change affects "test/e2e_node/e2e_node_suite_test.go"
as it consumes this Docker validator by calling
"system.ValidateSpec()".
@neolit123
Copy link
Member Author

/hold cancel
@timothysc @yastij @dixudx
updated to include json tags.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2019
Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

thx @neolit123

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 1, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neolit123, timothysc

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

@timothysc timothysc added this to the v1.16 milestone Jul 1, 2019
Copy link
Member

@yastij yastij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. 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. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants