Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Add GMSA credential spec passing #1505

Merged
merged 1 commit into from
Jun 14, 2020

Conversation

dcantah
Copy link
Member

@dcantah dcantah commented Jun 8, 2020

Signed-off-by: Daniel Canter [email protected]

@k8s-ci-robot
Copy link

Hi @dcantah. Thanks for your PR.

I'm waiting for a containerd 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.

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

thx for your PR see comments

pkg/server/container_create_windows.go Outdated Show resolved Hide resolved
pkg/server/container_create_windows.go Outdated Show resolved Hide resolved
@mikebrow
Copy link
Member

mikebrow commented Jun 8, 2020

/ok-to-test

@dcantah
Copy link
Member Author

dcantah commented Jun 9, 2020

@mikebrow Thanks, will fix up and add the test :)

@dcantah
Copy link
Member Author

dcantah commented Jun 10, 2020

@mikebrow PTAL (assuming the last half of the CI passes 😄)

Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

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

LGTM

if windowsConfig != nil {
specOpts = append(specOpts, customopts.WithWindowsResources(windowsConfig.GetResources()))
securityCtx := windowsConfig.GetSecurityContext()
if securityCtx != nil {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need all these nil checks. The Get* functions in protobuf should propagate nils forward, so if you do config.GetWindows().GetSecurityContext().GetRunAsUsername() it should return "" even if GetWindows() returns nil.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can update 👍

Copy link
Member

Choose a reason for hiding this comment

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

which nil check is not needed they all look valid to me..

Copy link
Member

Choose a reason for hiding this comment

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

IMO it's not a matter of will it panic.. it won't .. It's a matter of should the code proceed as if the get was successful.

Copy link
Member Author

Choose a reason for hiding this comment

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

The caching of securityCtx and if securityCtx != nil could be removed in favor of just checking if windowsConfig.GetSecurityContext.GetRunAsUsername() and windowsConfig.GetSecurityContext.GetCredentialSpec() aren't empty strings. Either way works. I'm going to leave unless you feel strongly about it @kevpar

Copy link
Member

Choose a reason for hiding this comment

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

I don't feel strongly. It seemed cleaner the other way, but agree it's a bit of an optimization to avoid doing some of the other work if an earlier Get call fails.

@dcantah
Copy link
Member Author

dcantah commented Jun 11, 2020

@mikebrow What's the process of getting cri revendored into containerd?

@mikebrow
Copy link
Member

@mikebrow What's the process of getting cri revendored into containerd?

summary: we'll update all our dependencies here to cover containerd dependencies considering if we need other dependencies updated as well, then when that tests out ok we'll do the same over on containerd/containerd merging containerd/cri dependency updates into containerd and the merge commit for containerd/cri that we decide to merge from...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants