diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 729167302..f16720ba2 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1188,639 +1188,639 @@ }, { "ImportPath": "k8s.io/client-go/discovery", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/discovery/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/apps", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/apps/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/apps/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/apps/v1beta2", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/autoscaling", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/autoscaling/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/autoscaling/v2beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/batch", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/batch/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/batch/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/batch/v2alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/certificates", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/certificates/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/coordination", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/coordination/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/core", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/core/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/events", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/events/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/extensions", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/extensions/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/internalinterfaces", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/networking", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/networking/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/policy", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/policy/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/rbac", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/rbac/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/rbac/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/rbac/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/scheduling", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/scheduling/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/scheduling/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/settings", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/settings/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/storage", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/storage/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/storage/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/informers/storage/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/scheme", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta2", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/coordination/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/events/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/networking/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/networking/v1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/policy/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/apps/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/apps/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/apps/v1beta2", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/autoscaling/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/autoscaling/v2beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/batch/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/batch/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/batch/v2alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/certificates/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/coordination/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/core/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/events/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/extensions/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/networking/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/policy/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/rbac/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/rbac/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/rbac/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/scheduling/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/scheduling/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/settings/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/storage/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/storage/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/listers/storage/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/pkg/apis/clientauthentication", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/pkg/version", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/plugin/pkg/client/auth/exec", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/rest", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/rest/watch", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/testing", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/tools/auth", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/tools/cache", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd/api", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd/api/latest", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd/api/v1", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/tools/metrics", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/tools/pager", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/tools/reference", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/transport", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/util/buffer", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/util/cert", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/util/connrotation", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/util/flowcontrol", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/util/homedir", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/util/integer", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/client-go/util/retry", - "Rev": "02384dbe123ff097a279965297f327a72ebefb72" + "Rev": "bdfc4cfc125f556bfe46fff68207767a605b64ed" }, { "ImportPath": "k8s.io/kube-openapi/pkg/builder", diff --git a/pkg/admission/attributes.go b/pkg/admission/attributes.go index 7272e888b..c8973cc62 100644 --- a/pkg/admission/attributes.go +++ b/pkg/admission/attributes.go @@ -34,6 +34,7 @@ type attributesRecord struct { resource schema.GroupVersionResource subresource string operation Operation + dryRun bool object runtime.Object oldObject runtime.Object userInfo user.Info @@ -44,7 +45,7 @@ type attributesRecord struct { annotationsLock sync.RWMutex } -func NewAttributesRecord(object runtime.Object, oldObject runtime.Object, kind schema.GroupVersionKind, namespace, name string, resource schema.GroupVersionResource, subresource string, operation Operation, userInfo user.Info) Attributes { +func NewAttributesRecord(object runtime.Object, oldObject runtime.Object, kind schema.GroupVersionKind, namespace, name string, resource schema.GroupVersionResource, subresource string, operation Operation, dryRun bool, userInfo user.Info) Attributes { return &attributesRecord{ kind: kind, namespace: namespace, @@ -52,6 +53,7 @@ func NewAttributesRecord(object runtime.Object, oldObject runtime.Object, kind s resource: resource, subresource: subresource, operation: operation, + dryRun: dryRun, object: object, oldObject: oldObject, userInfo: userInfo, @@ -82,6 +84,10 @@ func (record *attributesRecord) GetOperation() Operation { return record.operation } +func (record *attributesRecord) IsDryRun() bool { + return record.dryRun +} + func (record *attributesRecord) GetObject() runtime.Object { return record.object } diff --git a/pkg/admission/audit_test.go b/pkg/admission/audit_test.go index 31f3b5881..2dd88e9c9 100644 --- a/pkg/admission/audit_test.go +++ b/pkg/admission/audit_test.go @@ -64,7 +64,7 @@ func (h fakeHandler) Handles(o Operation) bool { } func attributes() Attributes { - return NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, "", "", schema.GroupVersionResource{}, "", "", nil) + return NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, "", "", schema.GroupVersionResource{}, "", "", false, nil) } func TestWithAudit(t *testing.T) { diff --git a/pkg/admission/chain_test.go b/pkg/admission/chain_test.go index e3821e731..7c3d940e1 100644 --- a/pkg/admission/chain_test.go +++ b/pkg/admission/chain_test.go @@ -119,7 +119,7 @@ func TestAdmitAndValidate(t *testing.T) { for _, test := range tests { t.Logf("testcase = %s", test.name) // call admit and check that validate was not called at all - err := test.chain.Admit(NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, test.ns, "", schema.GroupVersionResource{}, "", test.operation, nil)) + err := test.chain.Admit(NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, test.ns, "", schema.GroupVersionResource{}, "", test.operation, false, nil)) accepted := (err == nil) if accepted != test.accept { t.Errorf("unexpected result of admit call: %v", accepted) @@ -140,7 +140,7 @@ func TestAdmitAndValidate(t *testing.T) { } // call validate and check that admit was not called at all - err = test.chain.Validate(NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, test.ns, "", schema.GroupVersionResource{}, "", test.operation, nil)) + err = test.chain.Validate(NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, test.ns, "", schema.GroupVersionResource{}, "", test.operation, false, nil)) accepted = (err == nil) if accepted != test.accept { t.Errorf("unexpected result of validate call: %v\n", accepted) diff --git a/pkg/admission/errors_test.go b/pkg/admission/errors_test.go index 305a39dc1..871d7a571 100644 --- a/pkg/admission/errors_test.go +++ b/pkg/admission/errors_test.go @@ -36,6 +36,7 @@ func TestNewForbidden(t *testing.T) { schema.GroupVersionResource{Group: "foo", Version: "bar", Resource: "baz"}, "", Create, + false, nil) err := errors.New("some error") expectedErr := `baz.foo "Unknown/errorGettingName" is forbidden: some error` diff --git a/pkg/admission/interfaces.go b/pkg/admission/interfaces.go index 68ef558da..a17c28990 100644 --- a/pkg/admission/interfaces.go +++ b/pkg/admission/interfaces.go @@ -41,6 +41,11 @@ type Attributes interface { GetSubresource() string // GetOperation is the operation being performed GetOperation() Operation + // IsDryRun indicates that modifications will definitely not be persisted for this request. This is to prevent + // admission controllers with side effects and a method of reconciliation from being overwhelmed. + // However, a value of false for this does not mean that the modification will be persisted, because it + // could still be rejected by a subsequent validation step. + IsDryRun() bool // GetObject is the object from the incoming request prior to default values being applied GetObject() runtime.Object // GetOldObject is the existing object. Only populated for UPDATE requests. diff --git a/pkg/admission/metrics/metrics_test.go b/pkg/admission/metrics/metrics_test.go index 859e3d30e..d2b4bf75a 100644 --- a/pkg/admission/metrics/metrics_test.go +++ b/pkg/admission/metrics/metrics_test.go @@ -28,7 +28,7 @@ import ( var ( kind = schema.GroupVersionKind{Group: "kgroup", Version: "kversion", Kind: "kind"} resource = schema.GroupVersionResource{Group: "rgroup", Version: "rversion", Resource: "resource"} - attr = admission.NewAttributesRecord(nil, nil, kind, "ns", "name", resource, "subresource", admission.Create, nil) + attr = admission.NewAttributesRecord(nil, nil, kind, "ns", "name", resource, "subresource", admission.Create, false, nil) ) func TestObserveAdmissionStep(t *testing.T) { @@ -156,7 +156,7 @@ func TestWithMetrics(t *testing.T) { h := WithMetrics(test.handler, Metrics.ObserveAdmissionController, test.name) // test mutation - err := h.(admission.MutationInterface).Admit(admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, test.ns, "", schema.GroupVersionResource{}, "", test.operation, nil)) + err := h.(admission.MutationInterface).Admit(admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, test.ns, "", schema.GroupVersionResource{}, "", test.operation, false, nil)) if test.admit && err != nil { t.Errorf("expected admit to succeed, but failed: %v", err) continue @@ -181,7 +181,7 @@ func TestWithMetrics(t *testing.T) { } // test validation - err = h.(admission.ValidationInterface).Validate(admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, test.ns, "", schema.GroupVersionResource{}, "", test.operation, nil)) + err = h.(admission.ValidationInterface).Validate(admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, test.ns, "", schema.GroupVersionResource{}, "", test.operation, false, nil)) if test.validate && err != nil { t.Errorf("expected admit to succeed, but failed: %v", err) continue diff --git a/pkg/admission/plugin/initialization/initialization_test.go b/pkg/admission/plugin/initialization/initialization_test.go index a3bb0991b..fd9e1fa77 100644 --- a/pkg/admission/plugin/initialization/initialization_test.go +++ b/pkg/admission/plugin/initialization/initialization_test.go @@ -179,7 +179,7 @@ func TestAdmitUpdate(t *testing.T) { oldObj.Initializers = tc.oldInitializers newObj := &v1.Pod{} newObj.Initializers = tc.newInitializers - a := admission.NewAttributesRecord(newObj, oldObj, schema.GroupVersionKind{}, "", "foo", schema.GroupVersionResource{}, "", admission.Update, nil) + a := admission.NewAttributesRecord(newObj, oldObj, schema.GroupVersionKind{}, "", "foo", schema.GroupVersionResource{}, "", admission.Update, false, nil) err := plugin.Admit(a) switch { case tc.err == "" && err != nil: diff --git a/pkg/admission/plugin/namespace/lifecycle/admission_test.go b/pkg/admission/plugin/namespace/lifecycle/admission_test.go index 3eca3b67f..8a56cc3e8 100644 --- a/pkg/admission/plugin/namespace/lifecycle/admission_test.go +++ b/pkg/admission/plugin/namespace/lifecycle/admission_test.go @@ -104,7 +104,7 @@ func TestAccessReviewCheckOnMissingNamespace(t *testing.T) { } informerFactory.Start(wait.NeverStop) - err = handler.Admit(admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "LocalSubjectAccesReview"}, namespace, "", schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "localsubjectaccessreviews"}, "", admission.Create, nil)) + err = handler.Admit(admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{Group: "authorization.k8s.io", Version: "v1", Kind: "LocalSubjectAccesReview"}, namespace, "", schema.GroupVersionResource{Group: "authorization.k8s.io", Version: "v1", Resource: "localsubjectaccessreviews"}, "", admission.Create, false, nil)) if err != nil { t.Error(err) } @@ -124,7 +124,7 @@ func TestAdmissionNamespaceDoesNotExist(t *testing.T) { informerFactory.Start(wait.NeverStop) pod := newPod(namespace) - err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, nil)) + err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, false, nil)) if err == nil { actions := "" for _, action := range mockClient.Actions() { @@ -134,19 +134,19 @@ func TestAdmissionNamespaceDoesNotExist(t *testing.T) { } // verify create operations in the namespace cause an error - err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, nil)) + err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, false, nil)) if err == nil { t.Errorf("Expected error rejecting creates in a namespace when it is missing") } // verify update operations in the namespace cause an error - err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Update, nil)) + err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Update, false, nil)) if err == nil { t.Errorf("Expected error rejecting updates in a namespace when it is missing") } // verify delete operations in the namespace can proceed - err = handler.Admit(admission.NewAttributesRecord(nil, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Delete, nil)) + err = handler.Admit(admission.NewAttributesRecord(nil, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Delete, false, nil)) if err != nil { t.Errorf("Unexpected error returned from admission handler: %v", err) } @@ -166,7 +166,7 @@ func TestAdmissionNamespaceActive(t *testing.T) { informerFactory.Start(wait.NeverStop) pod := newPod(namespace) - err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, nil)) + err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, false, nil)) if err != nil { t.Errorf("unexpected error returned from admission handler") } @@ -187,31 +187,31 @@ func TestAdmissionNamespaceTerminating(t *testing.T) { pod := newPod(namespace) // verify create operations in the namespace cause an error - err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, nil)) + err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, false, nil)) if err == nil { t.Errorf("Expected error rejecting creates in a namespace when it is terminating") } // verify update operations in the namespace can proceed - err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Update, nil)) + err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Update, false, nil)) if err != nil { t.Errorf("Unexpected error returned from admission handler: %v", err) } // verify delete operations in the namespace can proceed - err = handler.Admit(admission.NewAttributesRecord(nil, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Delete, nil)) + err = handler.Admit(admission.NewAttributesRecord(nil, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Delete, false, nil)) if err != nil { t.Errorf("Unexpected error returned from admission handler: %v", err) } // verify delete of namespace default can never proceed - err = handler.Admit(admission.NewAttributesRecord(nil, nil, v1.SchemeGroupVersion.WithKind("Namespace").GroupKind().WithVersion("version"), "", metav1.NamespaceDefault, v1.Resource("namespaces").WithVersion("version"), "", admission.Delete, nil)) + err = handler.Admit(admission.NewAttributesRecord(nil, nil, v1.SchemeGroupVersion.WithKind("Namespace").GroupKind().WithVersion("version"), "", metav1.NamespaceDefault, v1.Resource("namespaces").WithVersion("version"), "", admission.Delete, false, nil)) if err == nil { t.Errorf("Expected an error that this namespace can never be deleted") } // verify delete of namespace other than default can proceed - err = handler.Admit(admission.NewAttributesRecord(nil, nil, v1.SchemeGroupVersion.WithKind("Namespace").GroupKind().WithVersion("version"), "", "other", v1.Resource("namespaces").WithVersion("version"), "", admission.Delete, nil)) + err = handler.Admit(admission.NewAttributesRecord(nil, nil, v1.SchemeGroupVersion.WithKind("Namespace").GroupKind().WithVersion("version"), "", "other", v1.Resource("namespaces").WithVersion("version"), "", admission.Delete, false, nil)) if err != nil { t.Errorf("Did not expect an error %v", err) } @@ -238,7 +238,7 @@ func TestAdmissionNamespaceForceLiveLookup(t *testing.T) { pod := newPod(namespace) // verify create operations in the namespace is allowed - err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, nil)) + err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, false, nil)) if err != nil { t.Errorf("Unexpected error rejecting creates in an active namespace") } @@ -248,7 +248,7 @@ func TestAdmissionNamespaceForceLiveLookup(t *testing.T) { getCalls = 0 // verify delete of namespace can proceed - err = handler.Admit(admission.NewAttributesRecord(nil, nil, v1.SchemeGroupVersion.WithKind("Namespace").GroupKind().WithVersion("version"), namespace, namespace, v1.Resource("namespaces").WithVersion("version"), "", admission.Delete, nil)) + err = handler.Admit(admission.NewAttributesRecord(nil, nil, v1.SchemeGroupVersion.WithKind("Namespace").GroupKind().WithVersion("version"), namespace, namespace, v1.Resource("namespaces").WithVersion("version"), "", admission.Delete, false, nil)) if err != nil { t.Errorf("Expected namespace deletion to be allowed") } @@ -261,7 +261,7 @@ func TestAdmissionNamespaceForceLiveLookup(t *testing.T) { phases[namespace] = v1.NamespaceTerminating // verify create operations in the namespace cause an error - err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, nil)) + err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, false, nil)) if err == nil { t.Errorf("Expected error rejecting creates in a namespace right after deleting it") } @@ -274,7 +274,7 @@ func TestAdmissionNamespaceForceLiveLookup(t *testing.T) { fakeClock.Step(forceLiveLookupTTL) // verify create operations in the namespace cause an error - err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, nil)) + err = handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, false, nil)) if err == nil { t.Errorf("Expected error rejecting creates in a namespace right after deleting it") } @@ -287,7 +287,7 @@ func TestAdmissionNamespaceForceLiveLookup(t *testing.T) { fakeClock.Step(time.Millisecond) // verify create operations in the namespace don't force a live lookup after the timeout - handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, nil)) + handler.Admit(admission.NewAttributesRecord(&pod, nil, v1.SchemeGroupVersion.WithKind("Pod").GroupKind().WithVersion("version"), pod.Namespace, pod.Name, v1.Resource("pods").WithVersion("version"), "", admission.Create, false, nil)) if getCalls != 0 { t.Errorf("Expected no live lookup of the namespace at t=forceLiveLookupTTL+1ms, got %d", getCalls) } diff --git a/pkg/admission/plugin/webhook/mutating/dispatcher_test.go b/pkg/admission/plugin/webhook/mutating/dispatcher_test.go index efa534c08..ccea26862 100644 --- a/pkg/admission/plugin/webhook/mutating/dispatcher_test.go +++ b/pkg/admission/plugin/webhook/mutating/dispatcher_test.go @@ -123,7 +123,7 @@ func TestDispatch(t *testing.T) { }, } attr := generic.VersionedAttributes{ - Attributes: admission.NewAttributesRecord(test.out, nil, schema.GroupVersionKind{}, "", "", schema.GroupVersionResource{}, "", admission.Operation(""), nil), + Attributes: admission.NewAttributesRecord(test.out, nil, schema.GroupVersionKind{}, "", "", schema.GroupVersionResource{}, "", admission.Operation(""), false, nil), VersionedOldObject: nil, VersionedObject: test.in, } diff --git a/pkg/admission/plugin/webhook/namespace/matcher_test.go b/pkg/admission/plugin/webhook/namespace/matcher_test.go index d0aee1499..bf7dee828 100644 --- a/pkg/admission/plugin/webhook/namespace/matcher_test.go +++ b/pkg/admission/plugin/webhook/namespace/matcher_test.go @@ -75,27 +75,27 @@ func TestGetNamespaceLabels(t *testing.T) { }{ { name: "request is for creating namespace, the labels should be from the object itself", - attr: admission.NewAttributesRecord(&namespace2, nil, schema.GroupVersionKind{}, "", namespace2.Name, schema.GroupVersionResource{Resource: "namespaces"}, "", admission.Create, nil), + attr: admission.NewAttributesRecord(&namespace2, nil, schema.GroupVersionKind{}, "", namespace2.Name, schema.GroupVersionResource{Resource: "namespaces"}, "", admission.Create, false, nil), expectedLabels: namespace2Labels, }, { name: "request is for updating namespace, the labels should be from the new object", - attr: admission.NewAttributesRecord(&namespace2, nil, schema.GroupVersionKind{}, namespace2.Name, namespace2.Name, schema.GroupVersionResource{Resource: "namespaces"}, "", admission.Update, nil), + attr: admission.NewAttributesRecord(&namespace2, nil, schema.GroupVersionKind{}, namespace2.Name, namespace2.Name, schema.GroupVersionResource{Resource: "namespaces"}, "", admission.Update, false, nil), expectedLabels: namespace2Labels, }, { name: "request is for deleting namespace, the labels should be from the cache", - attr: admission.NewAttributesRecord(&namespace2, nil, schema.GroupVersionKind{}, namespace1.Name, namespace1.Name, schema.GroupVersionResource{Resource: "namespaces"}, "", admission.Delete, nil), + attr: admission.NewAttributesRecord(&namespace2, nil, schema.GroupVersionKind{}, namespace1.Name, namespace1.Name, schema.GroupVersionResource{Resource: "namespaces"}, "", admission.Delete, false, nil), expectedLabels: namespace1Labels, }, { name: "request is for namespace/finalizer", - attr: admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, namespace1.Name, "mock-name", schema.GroupVersionResource{Resource: "namespaces"}, "finalizers", admission.Create, nil), + attr: admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, namespace1.Name, "mock-name", schema.GroupVersionResource{Resource: "namespaces"}, "finalizers", admission.Create, false, nil), expectedLabels: namespace1Labels, }, { name: "request is for pod", - attr: admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, namespace1.Name, "mock-name", schema.GroupVersionResource{Resource: "pods"}, "", admission.Create, nil), + attr: admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, namespace1.Name, "mock-name", schema.GroupVersionResource{Resource: "pods"}, "", admission.Create, false, nil), expectedLabels: namespace1Labels, }, } @@ -117,7 +117,7 @@ func TestNotExemptClusterScopedResource(t *testing.T) { hook := ®istrationv1beta1.Webhook{ NamespaceSelector: &metav1.LabelSelector{}, } - attr := admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, "", "mock-name", schema.GroupVersionResource{Version: "v1", Resource: "nodes"}, "", admission.Create, nil) + attr := admission.NewAttributesRecord(nil, nil, schema.GroupVersionKind{}, "", "mock-name", schema.GroupVersionResource{Version: "v1", Resource: "nodes"}, "", admission.Create, false, nil) matcher := Matcher{} matches, err := matcher.MatchNamespaceSelector(hook, attr) if err != nil { diff --git a/pkg/admission/plugin/webhook/rules/rules_test.go b/pkg/admission/plugin/webhook/rules/rules_test.go index 3418a1708..2827558af 100644 --- a/pkg/admission/plugin/webhook/rules/rules_test.go +++ b/pkg/admission/plugin/webhook/rules/rules_test.go @@ -38,6 +38,7 @@ func a(group, version, resource, subresource, name string, operation admission.O "ns", name, schema.GroupVersionResource{Group: group, Version: version, Resource: resource}, subresource, operation, + false, nil, ) } diff --git a/pkg/admission/plugin/webhook/testing/testcase.go b/pkg/admission/plugin/webhook/testing/testcase.go index e2bb01bd6..453ba11ee 100644 --- a/pkg/admission/plugin/webhook/testing/testcase.go +++ b/pkg/admission/plugin/webhook/testing/testcase.go @@ -95,7 +95,7 @@ func newAttributesRecord(object metav1.Object, oldObject metav1.Object, kind sch UID: "webhook-test", } - return admission.NewAttributesRecord(object.(runtime.Object), oldObject.(runtime.Object), kind, namespace, name, gvr, subResource, admission.Update, &userInfo) + return admission.NewAttributesRecord(object.(runtime.Object), oldObject.(runtime.Object), kind, namespace, name, gvr, subResource, admission.Update, false, &userInfo) } // NewAttribute returns static admission Attributes for testing. diff --git a/pkg/endpoints/handlers/create.go b/pkg/endpoints/handlers/create.go index c838546a7..69006c5bb 100644 --- a/pkg/endpoints/handlers/create.go +++ b/pkg/endpoints/handlers/create.go @@ -34,6 +34,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/util/dryrun" utiltrace "k8s.io/apiserver/pkg/util/trace" ) @@ -116,7 +117,7 @@ func createHandler(r rest.NamedCreater, scope RequestScope, admit admission.Inte audit.LogRequestObject(ae, obj, scope.Resource, scope.Subresource, scope.Serializer) userInfo, _ := request.UserFrom(ctx) - admissionAttributes := admission.NewAttributesRecord(obj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, userInfo) + admissionAttributes := admission.NewAttributesRecord(obj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, dryrun.IsDryRun(options.DryRun), userInfo) if mutatingAdmission, ok := admit.(admission.MutationInterface); ok && mutatingAdmission.Handles(admission.Create) { err = mutatingAdmission.Admit(admissionAttributes) if err != nil { diff --git a/pkg/endpoints/handlers/delete.go b/pkg/endpoints/handlers/delete.go index fc37e71b2..b753b83b5 100644 --- a/pkg/endpoints/handlers/delete.go +++ b/pkg/endpoints/handlers/delete.go @@ -32,6 +32,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/util/dryrun" utiltrace "k8s.io/apiserver/pkg/util/trace" ) @@ -108,7 +109,7 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope RequestSco trace.Step("About to check admission control") if admit != nil && admit.Handles(admission.Delete) { userInfo, _ := request.UserFrom(ctx) - attrs := admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Delete, userInfo) + attrs := admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Delete, dryrun.IsDryRun(options.DryRun), userInfo) if mutatingAdmission, ok := admit.(admission.MutationInterface); ok { if err := mutatingAdmission.Admit(attrs); err != nil { scope.err(err, w, req) @@ -196,27 +197,6 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) ae := request.AuditEventFrom(ctx) - admit = admission.WithAudit(admit, ae) - - if admit != nil && admit.Handles(admission.Delete) { - userInfo, _ := request.UserFrom(ctx) - attrs := admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, "", scope.Resource, scope.Subresource, admission.Delete, userInfo) - if mutatingAdmission, ok := admit.(admission.MutationInterface); ok { - err = mutatingAdmission.Admit(attrs) - if err != nil { - scope.err(err, w, req) - return - } - } - - if validatingAdmission, ok := admit.(admission.ValidationInterface); ok { - err = validatingAdmission.Validate(attrs) - if err != nil { - scope.err(err, w, req) - return - } - } - } listOptions := metainternalversion.ListOptions{} if err := metainternalversion.ParameterCodec.DecodeParameters(req.URL.Query(), scope.MetaGroupVersion, &listOptions); err != nil { @@ -279,6 +259,27 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco return } + admit = admission.WithAudit(admit, ae) + if admit != nil && admit.Handles(admission.Delete) { + userInfo, _ := request.UserFrom(ctx) + attrs := admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, "", scope.Resource, scope.Subresource, admission.Delete, dryrun.IsDryRun(options.DryRun), userInfo) + if mutatingAdmission, ok := admit.(admission.MutationInterface); ok { + err = mutatingAdmission.Admit(attrs) + if err != nil { + scope.err(err, w, req) + return + } + } + + if validatingAdmission, ok := admit.(admission.ValidationInterface); ok { + err = validatingAdmission.Validate(attrs) + if err != nil { + scope.err(err, w, req) + return + } + } + } + result, err := finishRequest(timeout, func() (runtime.Object, error) { return r.DeleteCollection(ctx, options, &listOptions) }) diff --git a/pkg/endpoints/handlers/patch.go b/pkg/endpoints/handlers/patch.go index 65588638b..95e7ab5f6 100644 --- a/pkg/endpoints/handlers/patch.go +++ b/pkg/endpoints/handlers/patch.go @@ -41,6 +41,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/util/dryrun" utiltrace "k8s.io/apiserver/pkg/util/trace" ) @@ -130,6 +131,7 @@ func PatchResource(r rest.Patcher, scope RequestScope, admit admission.Interface scope.Resource, scope.Subresource, admission.Update, + dryrun.IsDryRun(options.DryRun), userInfo, ) admissionCheck := func(updatedObject runtime.Object, currentObject runtime.Object) error { @@ -144,6 +146,7 @@ func PatchResource(r rest.Patcher, scope RequestScope, admit admission.Interface scope.Resource, scope.Subresource, admission.Update, + dryrun.IsDryRun(options.DryRun), userInfo, )) } diff --git a/pkg/endpoints/handlers/rest.go b/pkg/endpoints/handlers/rest.go index 3f1b42327..aa3760072 100644 --- a/pkg/endpoints/handlers/rest.go +++ b/pkg/endpoints/handlers/rest.go @@ -123,14 +123,14 @@ func ConnectResource(connecter rest.Connecter, scope RequestScope, admit admissi userInfo, _ := request.UserFrom(ctx) // TODO: remove the mutating admission here as soon as we have ported all plugin that handle CONNECT if mutatingAdmission, ok := admit.(admission.MutationInterface); ok { - err = mutatingAdmission.Admit(admission.NewAttributesRecord(connectRequest, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, userInfo)) + err = mutatingAdmission.Admit(admission.NewAttributesRecord(connectRequest, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, false, userInfo)) if err != nil { scope.err(err, w, req) return } } if validatingAdmission, ok := admit.(admission.ValidationInterface); ok { - err = validatingAdmission.Validate(admission.NewAttributesRecord(connectRequest, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, userInfo)) + err = validatingAdmission.Validate(admission.NewAttributesRecord(connectRequest, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, false, userInfo)) if err != nil { scope.err(err, w, req) return diff --git a/pkg/endpoints/handlers/update.go b/pkg/endpoints/handlers/update.go index a164ca203..dafe8c767 100644 --- a/pkg/endpoints/handlers/update.go +++ b/pkg/endpoints/handlers/update.go @@ -35,6 +35,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/util/dryrun" utiltrace "k8s.io/apiserver/pkg/util/trace" ) @@ -119,11 +120,11 @@ func UpdateResource(r rest.Updater, scope RequestScope, admit admission.Interfac return nil, fmt.Errorf("unexpected error when extracting UID from oldObj: %v", err.Error()) } else if !isNotZeroObject { if mutatingAdmission.Handles(admission.Create) { - return newObj, mutatingAdmission.Admit(admission.NewAttributesRecord(newObj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, userInfo)) + return newObj, mutatingAdmission.Admit(admission.NewAttributesRecord(newObj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, dryrun.IsDryRun(options.DryRun), userInfo)) } } else { if mutatingAdmission.Handles(admission.Update) { - return newObj, mutatingAdmission.Admit(admission.NewAttributesRecord(newObj, oldObj, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, userInfo)) + return newObj, mutatingAdmission.Admit(admission.NewAttributesRecord(newObj, oldObj, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, dryrun.IsDryRun(options.DryRun), userInfo)) } } return newObj, nil @@ -153,11 +154,11 @@ func UpdateResource(r rest.Updater, scope RequestScope, admit admission.Interfac rest.DefaultUpdatedObjectInfo(obj, transformers...), withAuthorization(rest.AdmissionToValidateObjectFunc( admit, - admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, userInfo)), + admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, dryrun.IsDryRun(options.DryRun), userInfo)), scope.Authorizer, createAuthorizerAttributes), rest.AdmissionToValidateObjectUpdateFunc( admit, - admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, userInfo)), + admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, dryrun.IsDryRun(options.DryRun), userInfo)), false, options, ) diff --git a/pkg/registry/rest/create.go b/pkg/registry/rest/create.go index f399ebdc2..619acc3e0 100644 --- a/pkg/registry/rest/create.go +++ b/pkg/registry/rest/create.go @@ -170,6 +170,7 @@ func AdmissionToValidateObjectFunc(admit admission.Interface, staticAttributes a staticAttributes.GetResource(), staticAttributes.GetSubresource(), staticAttributes.GetOperation(), + staticAttributes.IsDryRun(), staticAttributes.GetUserInfo(), ) if !validatingAdmission.Handles(finalAttributes.GetOperation()) { diff --git a/pkg/registry/rest/update.go b/pkg/registry/rest/update.go index b08dd1479..24e918604 100644 --- a/pkg/registry/rest/update.go +++ b/pkg/registry/rest/update.go @@ -263,6 +263,7 @@ func AdmissionToValidateObjectUpdateFunc(admit admission.Interface, staticAttrib staticAttributes.GetResource(), staticAttributes.GetSubresource(), staticAttributes.GetOperation(), + staticAttributes.IsDryRun(), staticAttributes.GetUserInfo(), ) if !validatingAdmission.Handles(finalAttributes.GetOperation()) {