GoogleCloudPlatform / flink-on-k8s-operator

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

Not able to deploy the Operator with master branch code #330

Open navneet066 opened 3 years ago

navneet066 commented 3 years ago

Details:

Kubernetes Version: 1.18.9 Kubectl Version: 1.18.3 Helm Version: 3.3.0

Steps:

1. git clone https://github.com/GoogleCloudPlatform/flink-on-k8s-operator.git
2. cd flink-on-k8s-operator
3. make deploy

Error :

kubectl apply -f config/crd/bases
The CustomResourceDefinition "flinkclusters.flinkoperator.k8s.io" is invalid:
* spec.validation.openAPIV3Schema.properties[spec].properties[taskManager].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[taskManager].properties[sidecars].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[jobManager].properties[sidecars].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[jobManager].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[job].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
make: *** [install] Error 1

We are getting same issue with Helm Installation also:

Steps:

1. git clone https://github.com/GoogleCloudPlatform/flink-on-k8s-operator.git
2. cd flink-on-k8s-operator
3. helm install -g  ./helm-chart/flink-operator/ --set operatorImage.name=gcr.io/flink-operator/flink-operator:latest

Error:

Error: CustomResourceDefinition.apiextensions.k8s.io "flinkclusters.flinkoperator.k8s.io" is invalid: 
[spec.validation.openAPIV3Schema.properties[spec].properties[taskManager].properties[sidecars].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property,
 spec.validation.openAPIV3Schema.properties[spec].properties[taskManager].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, 
spec.validation.openAPIV3Schema.properties[spec].properties[jobManager].properties[sidecars].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, 
spec.validation.openAPIV3Schema.properties[spec].properties[jobManager].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, 
spec.validation.openAPIV3Schema.properties[spec].properties[job].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property]

Please check this issue.

EnriqueL8 commented 3 years ago

See: https://github.com/GoogleCloudPlatform/flink-on-k8s-operator/issues/311

navneet066 commented 3 years ago

Able to deploy the Operator by adding below as mentioned in #311

We added protocol as mentioned in the error.

                        required:
                          - containerPort
                          - protocol

File Path: helm-chart/flink-operator/templates/flink-cluster-crd.yaml

Note: Make sure you put this at right place.

Thank you @EnriqueL8 for pointing to the correct issue.