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

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

@neolit123

This comment has been minimized.

Copy link
Member Author

commented Jun 26, 2019

@k8s-ci-robot k8s-ci-robot requested a review from Random-Liu Jun 26, 2019

@neolit123

This comment has been minimized.

Copy link
Member Author

commented Jun 26, 2019

/hold

@neolit123 neolit123 force-pushed the neolit123:kubeadm-docker-validator branch 3 times, most recently from bed1a5a to 9b87f1c Jun 27, 2019

@k8s-ci-robot k8s-ci-robot added size/L and removed size/M 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",

This comment has been minimized.

Copy link
@neolit123

neolit123 Jun 27, 2019

Author Member

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",

This comment has been minimized.

Copy link
@neolit123

neolit123 Jun 27, 2019

Author Member

[1]

This comment has been minimized.

Copy link
@yastij

yastij Jun 28, 2019

Member

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

kubeadm: don't use the Docker SDK in util/system/docker_validator*
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 neolit123 force-pushed the neolit123:kubeadm-docker-validator branch from 9b87f1c to cb56f91 Jul 1, 2019

@neolit123

This comment has been minimized.

Copy link
Member Author

commented Jul 1, 2019

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

@timothysc
Copy link
Member

left a comment

/lgtm
/approve

thx @neolit123

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 1, 2019

[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

@yastij
Copy link
Member

left a comment

/lgtm

@k8s-ci-robot k8s-ci-robot merged commit de8fb1c into kubernetes:master Jul 1, 2019

23 checks passed

cla/linuxfoundation neolit123 authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.