Spark-on-k8s-operator: Upgrade CustomResourceDefinitions to use v1 apiVersion

Created on 6 Dec 2020  路  3Comments  路  Source: GoogleCloudPlatform/spark-on-k8s-operator

The apiVersion apiextensions.k8s.io/v1beta1 has been deprecated since Kubernetes v1.16 in favor of apiextensions.k8s.io/v1. One of the new features in apiextensions.k8s.io/v1 is the ability to set defaults for fields.

As a result of not upgrading, every time this project has regenerated CRDs, they need to be manually updated in order to include protocol as one of the required fields in the ports container field, as done in #986.

This change would make the resulting CRDs incompatible with Kubernetes versions older than v1.16.

enhancement

Most helpful comment

@fisache Unfortunately upgrading the dependencies does not seem to help. Throughout the various minor versions, the definition of a ContainerPort remains constant--the protocol field is required, with a default, and this field is used to identify unique entries.

Since the definition remains consistent, the behavior from controller-gen is also consistent. Of course, updating the dependencies would be a good idea nonetheless.

@liyinan926 Currently I don't have enough time to get this PR set up, but may be able to revisit it in a couple weeks.

All 3 comments

Thanks for creating this issue @jutley. Wondering would you be willing to send a PR for the fix?

I wonder whether the result of problem solving is k8s.io package including client-go version up newer than v1.16

@fisache Unfortunately upgrading the dependencies does not seem to help. Throughout the various minor versions, the definition of a ContainerPort remains constant--the protocol field is required, with a default, and this field is used to identify unique entries.

Since the definition remains consistent, the behavior from controller-gen is also consistent. Of course, updating the dependencies would be a good idea nonetheless.

@liyinan926 Currently I don't have enough time to get this PR set up, but may be able to revisit it in a couple weeks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

liyinan926 picture liyinan926  路  4Comments

liyinan926 picture liyinan926  路  7Comments

hongshaoyang picture hongshaoyang  路  3Comments

LeonardAukea picture LeonardAukea  路  8Comments

fisache picture fisache  路  6Comments