cruise-automation / k-rail

Kubernetes security tool for policy enforcement
Apache License 2.0
444 stars 54 forks source link

Update deprecated api group admissionregistration.k8s.io/v1beta1 #86

Closed daftping closed 3 years ago

daftping commented 3 years ago

Update WebhookConfigurations to v1 https://github.com/cruise-automation/k-rail/search?q=%22admissionregistration.k8s.io%2Fv1beta1%22 v1 version of Admission should be used https://github.com/cruise-automation/k-rail/search?q=%22admission%2Fv1beta1%22&type=code

https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.16.md#deprecations-and-removals The admissionregistration.k8s.io/v1beta1 versions of MutatingWebhookConfiguration and ValidatingWebhookConfiguration are deprecated and will no longer be served in v1.19. Use admissionregistration.k8s.io/v1 instead. (#79549, @liggitt)

The MutatingWebhookConfiguration and ValidatingWebhookConfiguration APIs have been promoted to admissionregistration.k8s.io/v1:

  • failurePolicy default changed from Ignore to Fail for v1
  • matchPolicy default changed from Exact to Equivalent for v1
  • timeout default changed from 30s to 10s for v1
  • sideEffects default value is removed, and the field made required, and only None and NoneOnDryRun are permitted for v1
  • admissionReviewVersions default value is removed and the field made required for v1 (supported versions for AdmissionReview are v1 and v1beta1)
  • The name field for specified webhooks must be unique for MutatingWebhookConfiguration and ValidatingWebhookConfiguration objects created via admissionregistration.k8s.io/v1 The admissionregistration.k8s.io/v1beta1 versions of MutatingWebhookConfiguration and ValidatingWebhookConfiguration are deprecated and will no longer be served in v1.19.
dustin-decker commented 3 years ago

Thanks for pointing that out. We'll update it soon.