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

Tighten validation of mirror pod annotations #45775

Merged
merged 2 commits into from May 16, 2017

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented May 13, 2017

Tightens validation for pods with a mirror pod annotation:

  1. spec.nodeName must be set
  2. makes the mirror pod annotation immutable
  3. starts validating pod-specific annotations during pod status update

None of these changes affect usage of the mirror pod annotation by kubelets, which only set it on pod creation (verified this is true back to 1.5.x)

the second commit updates the pod validation tests to look for specific error messages (best reviewed ignoring whitespace changes)

This is the validation portion of https://github.com/kubernetes/community/blob/master/contributors/design-proposals/kubelet-authorizer.md and kubernetes/enhancements#279

Mirror pods must now indicate the nodeName they are bound to on creation. The mirror pod annotation is now treated as immutable and cannot be added to an existing pod, removed from a pod, or modified.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 13, 2017
@k8s-github-robot k8s-github-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note-label-needed labels May 13, 2017
@liggitt
Copy link
Member Author

liggitt commented May 13, 2017

cc @kubernetes/sig-auth-pr-reviews @kubernetes/sig-node-pr-reviews

@k8s-ci-robot k8s-ci-robot added sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/node Categorizes an issue or PR as relevant to SIG Node. labels May 13, 2017
@liggitt liggitt changed the title Validate mirror pod annotations Tighten validation of mirror pod annotations May 13, 2017
@k8s-github-robot k8s-github-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels May 13, 2017
@liggitt liggitt added area/security release-note-label-needed release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. release-note-label-needed labels May 13, 2017
@k8s-github-robot k8s-github-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 13, 2017
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 14, 2017

@liggitt: The following test(s) failed:

Test name Commit Details Rerun command
pull-kubernetes-federation-e2e-gce eb0e4fa link @k8s-bot pull-kubernetes-federation-e2e-gce test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@liggitt
Copy link
Member Author

liggitt commented May 14, 2017

@k8s-bot kubemark e2e test this

@liggitt liggitt added this to the v1.7 milestone May 14, 2017
@deads2k
Copy link
Contributor

deads2k commented May 15, 2017

lgtm

@timstclair
Copy link

/lgtm
/approve

Nice!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 15, 2017
@smarterclayton
Copy link
Contributor

/approve

API changes LGTM - annotation move to public package decoupled from kubelet.

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, smarterclayton, timstclair

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2017
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 44337, 45775, 45832, 45574, 45758)

@k8s-github-robot k8s-github-robot merged commit 7cd32ab into kubernetes:master May 16, 2017
@liggitt liggitt deleted the mirror-pod-validation branch May 16, 2017 01:57
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. area/security 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants