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

Skip Docker install #6957

Merged
merged 5 commits into from
Sep 18, 2019
Merged

Conversation

austinmoore-
Copy link
Contributor

Adds configuration (spec.dockerInstall.skipInstall) that indicates to nodeup that it should skip the Docker tasks. See the added docs for details on how to use it. My thinking with this configuration is that if the user specifies it, nodeup should not do anything related to Docker and it's up to the user to ensure Docker is setup as it needs to be.

The motivation for this came from an old situation I encountered. The base AMIs we were building from already had Docker install. So to get kops working with these AMIs, we would simply uninstall Docker from our AMIs and then just let kops install Docker. 🙄

Even though I personally don't have a use for this right now, I figured that while I was working on #6956 I could do this real quick. Hopefully someone out there in a similar situation finds this useful!

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 13, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @austinmoore-. 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 13, 2019
@austinmoore-
Copy link
Contributor Author

/assign @geojaz

@rdrgmnzs
Copy link
Contributor

Thanks @austinmoore- this looks great, I actually have a use case for this similar to the one you described.

I'm wondering if instead of adding yet another feature flag skipInstall, if there is any way of just leveraging the existing docker spec and setting version to something like noop to simplify things such as:

spec:
  docker:
    version: noop

What do you think?

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 20, 2019
@austinmoore-
Copy link
Contributor Author

My personal opinion is that I usually prefer to have the key indicate the operation, rather than a value. It feels more explicit to me that way. In my mind, docker.version is unrelated to whether or not kops should install Docker or not. But I don't really have strong feelings one way or the other though, so if simplifying it to just noop fits kops' solution pattern better, just let me know I can definitely make that change!

@chrisz100
Copy link
Contributor

chrisz100 commented Jun 12, 2019

I would love if people could choose their own docker version here (and noop if none) looking at all the CVE's from the last year. Do you think something getting close to this goal could be doable?

Also - if possible - could you rebase the last two commits?

@austinmoore- austinmoore- force-pushed the skip-docker-install branch from a9939af to 3175ade Compare June 12, 2019 18:17
@austinmoore-
Copy link
Contributor Author

I cleaned up those commits. And yes I think it's totally doable. Since there are two voice support for that, I can go ahead and make that change.

So just to confirm the new spec will look like:

spec:
  docker:
    version: noop

@austinmoore-
Copy link
Contributor Author

@chrisz100 Actually, I might have misread what you said. By specifying your own Docker version are you thinking of something like this: #6956

Or were you referring to @rdrgmnzs suggestion?

@granular-ryanbonham
Copy link
Contributor

/retest

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 10, 2019
@ReillyTevera
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 11, 2019
@austinmoore-
Copy link
Contributor Author

/retest

#7571 makes me wonder if this was a flaky failure

@mikesplain
Copy link
Contributor

Thanks for the ping on this @rdrgmnzs, I agree with everyones comments above.

A separate DockerInstallSpec feels like a bit much for me considering the simplicity of what's being accomplished here, since as you noted, this isn't new behavior, just allowing users to configure it.

Is there a reason this couldn't just be part of the DockerConfig spec? If all of those attributes only drove docker I would say no, but we already have nodeup using the Version attribute.

So I think my preference would be:

spec:
  docker:
    skipInstall: true

@mikesplain
Copy link
Contributor

/assign @rdrgmnzs
/assign @mikesplain

@austinmoore-
Copy link
Contributor Author

austinmoore- commented Sep 13, 2019

The reason I had added a new DockerInstallSpec field was because I knew that I would also be implementing #6956 which also uses that. But I agree that

spec:
  docker:
    skipInstall: true

is a good place for this and removes the need to add a new field. So if we go through with this, I think we should also move overrideSources from the other PR to spec.docker. What do you think?

@mikesplain
Copy link
Contributor

Ahh yeah I see, that makes sense but personally, I don't mind having that in DockerConfig as well, others may feel more strongly. Before you move things over, lets confirm that @rdrgmnzs and @chrisz100 agree. Thanks for the work on this!

@rdrgmnzs
Copy link
Contributor

👍 to having everything under DockerConfig.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 17, 2019
austinmoore- added a commit to austinmoore-/kops that referenced this pull request Sep 17, 2019
@austinmoore-
Copy link
Contributor Author

@mikesplain @rdrgmnzs How's it look?

@rdrgmnzs
Copy link
Contributor

This looks great @austinmoore- ! Thanks you so much for sticking with this and getting it to this point.

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: austinmoore-, rdrgmnzs

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 Sep 18, 2019
@k8s-ci-robot k8s-ci-robot merged commit 30c6f65 into kubernetes:master Sep 18, 2019
k8s-ci-robot added a commit that referenced this pull request Sep 19, 2019
k8s-ci-robot added a commit that referenced this pull request Sep 19, 2019
austinmoore- added a commit to austinmoore-/kops that referenced this pull request Sep 23, 2019
@austinmoore- austinmoore- deleted the skip-docker-install branch September 24, 2019 15:03
austinmoore- added a commit to austinmoore-/kops that referenced this pull request Oct 10, 2019
austinmoore- added a commit to austinmoore-/kops that referenced this pull request Feb 12, 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants