openkruise / kruise

Automated management of large-scale applications on Kubernetes (incubating project under CNCF)
https://openkruise.io
Other
4.62k stars 762 forks source link

[feature request] Change rollout CustomResourceDefinition configuration conversionReviewVersions to v1 #1558

Closed zmberg closed 2 months ago

zmberg commented 6 months ago

What would you like to be added: ConversionReview v1beta1 deprecated in v1.16 in favor of apiextensions.k8s.io/v1, refer to: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#webhook-request-and-response

  1. Change rollout CustomResourceDefinition configuration conversionReviewVersions to v1, related code: https://github.com/openkruise/rollouts/blob/master/config/crd/patches/webhook_in_batchreleases.yaml and https://github.com/openkruise/rollouts/blob/master/config/crd/patches/webhook_in_rollouts.yaml
  2. webhook controller, related code: https://github.com/openkruise/rollouts/blob/master/pkg/webhook/util/crd/crd.go#L79

Why is this needed:

im-jinxinwang commented 6 months ago

@zmberg I understand that it is enough to remove v1beta1?

newCRD.Spec.Conversion.Webhook = &apiextensionsv1.WebhookConversion{
    ClientConfig:             webhookConfig.DeepCopy(),
    ConversionReviewVersions: []string{"v1"},
}
chenshiwei-io commented 5 months ago

Is it just changing 'v1beta1' to 'v1' in the configuration of these two CRDs, and then deleting 'v1beta1' from the code? I want to try submitting the feature request." /assign

chenshiwei-io commented 5 months ago

@zmberg This feature belongs to #rollouts, Is the rollouts PR I submitted associated with this issue?

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.