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

PodPreset: Add same functionality for init containers as standard containers #71479

Merged
merged 3 commits into from
Mar 1, 2019

Conversation

soggiest
Copy link

What type of PR is this?
/kind feature

What this PR does / why we need it:
Adds the same functionality for init containers as standard containers in the PodPreset admission controller.

Which issue(s) this PR fixes:
Fixes #55410

Does this PR introduce a user-facing change?:

Adds the same information to an init container as a standard container in a pod when using PodPresets.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 27, 2018
@k8s-ci-robot
Copy link
Contributor

Hi @soggiest. 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.

@dims
Copy link
Member

dims commented Nov 27, 2018

/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 Nov 27, 2018
@ncdc
Copy link
Member

ncdc commented Nov 28, 2018

@soggiest I would recommend updating test/e2e/servicecatalog/podpreset.go to include verifying the init containers were modified as expected.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 28, 2018
@soggiest
Copy link
Author

/retest

@soggiest
Copy link
Author

/sig service-catalog

@k8s-ci-robot k8s-ci-robot added the sig/service-catalog Categorizes an issue or PR as relevant to SIG Service Catalog. label Nov 29, 2018
@soggiest
Copy link
Author

/test all

@ncdc
Copy link
Member

ncdc commented Nov 29, 2018

FWIW, since the PodPreset e2es don't seem to run in CI that I can find, I built a kube-apiserver with the changes from this PR, finagled it into a Minikube environment, and I was able to manually run the PodPreset e2e tests (including removing the skip that it should only run on gce), and everything passed.

Copy link
Member

@oomichi oomichi left a comment

Choose a reason for hiding this comment

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

just one comment

test/e2e/servicecatalog/podpreset.go Outdated Show resolved Hide resolved
@soggiest
Copy link
Author

soggiest commented Dec 4, 2018

/retest

{
Name: "init1",
Image: imageutils.GetE2EImage(imageutils.BusyBox),
Env: []v1.EnvVar{{Name: "abc", Value: "value2"}, {Name: "ABC", Value: "value"}},
Copy link
Member

Choose a reason for hiding this comment

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

Sorry for missing this point on my previous review.
After reading the original issue(#55410) carefully, the reporter wanted to set the init container specific environment values on podPresets.
Current ones are the same as the container's one of line 218. So it is better to set different environment value as the e2e test to verify the behavior.

Copy link
Author

Choose a reason for hiding this comment

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

I don't see where the original user wanted there to be different values for the init container vs the main container. The way that I've read it is that they want podpresets to function with init containers at all.

@soggiest
Copy link
Author

@kubernetes/sig-service-catalog-feature-requests
Can someone review this PR, please?

@mbarthelemy-grab
Copy link

Hi,
Will this get merged? Would be super useful for us (we need to be able to access PodPreset env vars from initContainers).

@ncdc
Copy link
Member

ncdc commented Feb 6, 2019

@jessfraz @dims @smarterclayton @timothysc @pmorie - anyone object to this going in?

@derekwaynecarr
Copy link
Member

@ncdc I thought we had decided against further evolution of pod preset in favor of webhooks out of tree, but it’s possible I missed something that changed.

@dims
Copy link
Member

dims commented Feb 6, 2019

/milestone v1.14
/sig node
/assign @derekwaynecarr @deads2k

Let's mark this as v1.14 so folks look at it and we can yank it out if it does not make it (as @derekwaynecarr mentions that a decision was made at some point)

@k8s-ci-robot k8s-ci-robot added this to the v1.14 milestone Feb 6, 2019
@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Feb 6, 2019
@smarterclayton
Copy link
Contributor

We really should move forward with pod preset as a beta CRD and webhook in a kubernetes sig namespace. It’s a great feature, one that I think a lot of people want, and we’ve come so close. But according to the last state of this discussion, we did agree to move this out before we do much more work on it.

@ncdc
Copy link
Member

ncdc commented Feb 6, 2019

@derekwaynecarr @smarterclayton @pmorie I completely understand the motivation for moving this out of tree. I agree with it. However, the current in-tree feature only applies the presets to normal containers, and not init containers. It's only doing half the job it should be doing. I'm advocating that we complete the in-tree feature with this PR. Is that ok for now, and going forward, someone can look at externalizing this?

@ncdc
Copy link
Member

ncdc commented Feb 14, 2019

@soggiest
Copy link
Author

@smarterclayton @derekwaynecarr @pmorie with code freeze coming up can we get another look at this PR, please?

@dims
Copy link
Member

dims commented Feb 28, 2019

@ncdc i can buy that argument! so

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 28, 2019
@ncdc
Copy link
Member

ncdc commented Feb 28, 2019

@dims thank you thank you thank you!

@ncdc
Copy link
Member

ncdc commented Feb 28, 2019

/approve
(for the test bit)

@dims
Copy link
Member

dims commented Feb 28, 2019

need the approvers though! @ncdc :)

@smarterclayton
Copy link
Contributor

smarterclayton commented Feb 28, 2019 via email

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ncdc, smarterclayton, soggiest

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 Feb 28, 2019
@k8s-ci-robot k8s-ci-robot merged commit 55a6576 into kubernetes:master Mar 1, 2019
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/service-catalog Categorizes an issue or PR as relevant to SIG Service Catalog. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

Pod Preset does not inject the init container
9 participants