Skip to content

Kubelet & API changes for Windows GMSA support#75459

Merged
k8s-ci-robot merged 4 commits intokubernetes:masterfrom
wk8:wk8/gmsa_beta
May 21, 2019
Merged

Kubelet & API changes for Windows GMSA support#75459
k8s-ci-robot merged 4 commits intokubernetes:masterfrom
wk8:wk8/gmsa_beta

Conversation

@wk8
Copy link
Copy Markdown
Contributor

@wk8 wk8 commented Mar 19, 2019

What type of PR is this?
/kind feature

What this PR does / why we need it:
This patch comprises the kubelet & API changes outlined in the Windows GMSA KEP
(https://github.com/kubernetes/enhancements/blob/master/keps/sig-windows/20181221-windows-group-managed-service-accounts-for-container-identity.md)
to add GMSA support to Windows workloads.

This essentially means moving the GMSA cred spec names & contents
from annotations to dedicated API fields.
More specifically, this is affecting PodSecurityContext and SecurityContext
structs, adding a WindowsOptions object to both.

Updated tests.

Special notes for your reviewer:
Still a WIP, will also update the webhook
(https://github.com/kubernetes-sigs/windows-gmsa)
to ensure all is in order before merging.

Does this PR introduce a user-facing change?:

API changes and deprecating the use of special annotations for Windows GMSA support (version beta)

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 19, 2019
@wk8 wk8 changed the title Kubelet & API changes for GMSA support - version beta Kubelet & API changes for Windows GMSA support - version beta Mar 19, 2019
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Mar 19, 2019
@k8s-ci-robot k8s-ci-robot added area/kubelet area/test kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 19, 2019
@wk8
Copy link
Copy Markdown
Contributor Author

wk8 commented Mar 19, 2019

Putting on hold until the webhook is upated too.

@wk8
Copy link
Copy Markdown
Contributor Author

wk8 commented Mar 19, 2019

/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 Mar 19, 2019
@wk8
Copy link
Copy Markdown
Contributor Author

wk8 commented Mar 19, 2019

/sig windows

@k8s-ci-robot k8s-ci-robot added the sig/windows Categorizes an issue or PR as relevant to SIG Windows. label Mar 19, 2019
Copy link
Copy Markdown
Contributor

@ddebroy ddebroy left a comment

Choose a reason for hiding this comment

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

Overall looks good. Once comment about removing the feature flag. While the link to the KEP is useful, can you update the PR description please with the API objects changed: PodSecurityContext and SecurityContext) and the new fields introduced?

@ddebroy
Copy link
Copy Markdown
Contributor

ddebroy commented Mar 19, 2019

/assign @liggitt @yujuhong

@ddebroy
Copy link
Copy Markdown
Contributor

ddebroy commented Mar 19, 2019

@michmike
Copy link
Copy Markdown
Contributor

/milestone v1.15
/sig windows

@wk8
Copy link
Copy Markdown
Contributor Author

wk8 commented May 13, 2019

@liggitt : thanks for the review, amended as requested.

@wk8 wk8 force-pushed the wk8/gmsa_beta branch 4 times, most recently from 690c0c2 to c74cdad Compare May 15, 2019 19:18
Copy link
Copy Markdown
Member

@liggitt liggitt left a comment

Choose a reason for hiding this comment

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

thanks for the update. you can squash the Review comment: renaming GMSA go variables files into the right commits.

found a couple potential NPEs in pkg/securitycontext/util.go

the update to dropDisabledFields() (#75459 (comment)) is still outstanding as well

looking good otherwise

@wk8 wk8 force-pushed the wk8/gmsa_beta branch from c74cdad to 2002833 Compare May 15, 2019 19:32
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 16, 2019
wk8 added 3 commits May 16, 2019 15:32
This patch comprises the API changes outlined in the Windows GMSA KEP
(https://github.com/kubernetes/enhancements/blob/master/keps/sig-windows/20181221-windows-group-managed-service-accounts-for-container-identity.md)
to add GMSA support to Windows workloads.

It includes validation, as well as dropping fields if the `WindowsGMSA` feature
flag is not set, both with unit tests.

Signed-off-by: Jean Rouge <rougej+github@gmail.com>
Signed-off-by: Jean Rouge <rougej+github@gmail.com>
This patch comprises the auto-generated changes for the API changes outlined in
the Windows GMSA KEP
(https://github.com/kubernetes/enhancements/blob/master/keps/sig-windows/20181221-windows-group-managed-service-accounts-for-container-identity.md)
to add GMSA support to Windows workloads.

Signed-off-by: Jean Rouge <rougej+github@gmail.com>
@wk8 wk8 force-pushed the wk8/gmsa_beta branch from 1432a2a to 2e4850d Compare May 16, 2019 22:35
@wk8
Copy link
Copy Markdown
Contributor Author

wk8 commented May 16, 2019

@liggitt @ddebroy : amended as requested, including #75459 (comment), could you please take another look?

This patch comprises the kubelet changes outlined in the Windows GMSA KEP
(https://github.com/kubernetes/enhancements/blob/master/keps/sig-windows/20181221-windows-group-managed-service-accounts-for-container-identity.md)
to add GMSA support to Windows workloads.

Updated tests.

Signed-off-by: Jean Rouge <rougej+github@gmail.com>
@wk8 wk8 force-pushed the wk8/gmsa_beta branch from 2e4850d to b39d8f4 Compare May 17, 2019 02:07
@liggitt
Copy link
Copy Markdown
Member

liggitt commented May 17, 2019

/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 May 17, 2019
@liggitt
Copy link
Copy Markdown
Member

liggitt commented May 17, 2019

/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels May 17, 2019
@liggitt
Copy link
Copy Markdown
Member

liggitt commented May 17, 2019

/cc @yujuhong

for cri approval

@k8s-ci-robot k8s-ci-robot requested a review from yujuhong May 17, 2019 15:54
string run_as_username = 1;

// The contents of the GMSA credential spec to use to run this container.
string credential_spec = 2;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The API change LGTM. We may need to change the comment to make it clear if we ever supports non-GMSA spects.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@yujuhong : sorry if I'm misunderstanding, but that field's name was requested to not include "GMSA" in #75459 (comment), and the comment makes it clear it's for GMSA for now; so not sure what else we should do here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this is fine for now. The field name matches the oci field name, and the description is reasonably consistent with the oci doc.

@PatrickLang
Copy link
Copy Markdown
Contributor

@yujuhong - can you approve or find one from SIG-Node?

@yujuhong
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, wk8, yujuhong

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 May 21, 2019
@k8s-ci-robot k8s-ci-robot merged commit ae2a162 into kubernetes:master May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

Status: API review completed, 1.15

Development

Successfully merging this pull request may close these issues.

7 participants