GoogleCloudPlatform / flink-on-k8s-operator

[DEPRECATED] Kubernetes operator for managing the lifecycle of Apache Flink and Beam applications.
Apache License 2.0
659 stars 265 forks source link

CustomResourceDefinition apiextensions.k8s.io/v1beta change to apiextensions.k8s.io/v1 unsupport #462

Closed btkinghome closed 3 years ago

btkinghome commented 3 years ago

Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:25:06Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}

When I use helm to deploy flink-operator on kubernetes, i got this error info:

error: error validating "flinkoperator.k8s.io_flinkclusters.yaml": error validating data: [ValidationError(CustomResourceDefinition.spec): unknown field "subresources" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "validation" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec, ValidationError(CustomResourceDefinition.spec): unknown field "version" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec]; if you choose to ignore these errors, turn validation off with --validate=false

Maybe some field un support the CustomResourceDefinition version apiextensions.k8s.io/v1

Similar problem as below https://github.com/kubernetes-csi/external-snapshotter/pull/367

Is any update plan for flink-operator on kubernetes?

btkinghome commented 3 years ago

I fix it by these changes, now it works.

  1. change api version

    "apiVersion: apiextensions.k8s.io/v1beta" to "apiVersion: apiextensions.k8s.io/v1"

  2. change yaml struct

    versions:

    • name: v1beta1 served: true storage: true schema: openAPIV3Schema: <-------------- Copy here properties:

  3. change protocol filed

    x-kubernetes-list-map-keys:

    • containerPort
    • protocol <------Add this, the default is miss

phoerious commented 2 years ago

Why is this issue closed when it's not fixed upstream?

I still cannot deploy the operator and when I patch the YAML files, they get reset by make deploy and I am having a hard time figuring out why.