nowke opened a new pull request, #487:
URL: https://github.com/apache/flink-kubernetes-operator/pull/487

   ## What is the purpose of the change
   
   This PR validates `FlinkDeployment` without `jobManager` or `taskManager` 
spec. Currently, `FlinkDeployment` gets stuck in `UPGRADING` state if you don't 
specify `jobManager` or `taskManager` spec. 
   
   By adding validation, `helm install` directly fails.
   
   **Example: `basic.yaml`**
   
   ```yaml
   apiVersion: flink.apache.org/v1beta1
   kind: FlinkDeployment
   metadata:
     name: basic-example
   spec:
     image: flink:1.15
     flinkVersion: v1_15
     flinkConfiguration:
       taskmanager.numberOfTaskSlots: "2"
     serviceAccount: flink
     job:
       jarURI: local:///opt/flink/examples/streaming/StateMachineExample.jar
       parallelism: 2
       upgradeMode: stateless
   ```
   
   ## Brief change log
   
   - Validate `FlinkDeployment` without `jobManager` or `taskManager` spec.
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   - Extended existing unit test for the change as part of the PR
   - Manually verified by removing `jobManager` and `taskManager` from 
[`examples/basic.yaml`](https://github.com/apache/flink-kubernetes-operator/blob/c8ed11dfde1e0fc57d8fa45b0121ecec362bd03d/examples/basic.yaml#L29-L36)
     - *Before change* - ensured `FlinkDeployment` gets stuck in `UPGRADING` 
state.
     - *After change* - `helm install example/basic.yaml` fails with error 
message. Reverting back the file deploys the job successfully.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changes to the `CustomResourceDescriptors`: 
no
     - Core observer or reconciler logic that is regularly executed: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to