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

Move AppArmor feature-gate checking out of validation #72655

Merged
merged 2 commits into from Jan 8, 2019

Conversation

@liggitt
Copy link
Member

liggitt commented Jan 7, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
Moves feature-gate checking of apparmor annotations out of validation into the strategy utility methods, and avoids dropping data on update if the existing object already used data related to a feature.

  • First commit plumbs pod annotations to the DropDisabledFields method
  • Second commit moves the feature gate checking from validation to the strategy methods

Which issue(s) this PR fixes:
xref #72651

Does this PR introduce a user-facing change?:

If the AppArmor feature gate is disabled, AppArmor-specific annotations in pod and pod templates are dropped when the object is created, and during update of objects that do not already contain AppArmor annotations, rather than triggering a validation error.

/sig api-machinery
/sig auth

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jan 7, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt

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

@fedebongio

This comment has been minimized.

Copy link
Contributor

fedebongio commented Jan 7, 2019

@k8s-ci-robot k8s-ci-robot requested a review from caesarxuchao Jan 7, 2019

@liggitt

This comment has been minimized.

Copy link
Member Author

liggitt commented Jan 7, 2019

/retest

@sbezverk

This comment has been minimized.

Copy link
Contributor

sbezverk commented Jan 8, 2019

/lgtm

@tallclair

This comment has been minimized.

Copy link
Member

tallclair commented Jan 8, 2019

IIUC, there are a few user-facing changes, which might warrant a release note?

  1. Pods requesting AppArmor with the feature disabled will have the annotation silently dropped rather than triggering a validation error.
  2. In the event that the feature is rolled back, existing workloads will continue to be accepted.

Thanks for fixing this!

@k8s-ci-robot k8s-ci-robot merged commit 35b17dd into kubernetes:master Jan 8, 2019

19 checks passed

cla/linuxfoundation liggitt authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-e2e-kubeadm-gce Skipped
pull-kubernetes-godeps Skipped
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
tide In merge pool.
Details

@liggitt liggitt deleted the liggitt:pod-annotation-features branch Jan 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment