dalelane opened a new pull request, #1275: URL: https://github.com/apache/flink-kubernetes-operator/pull/1275
This PR depends on #1223, #1259, #1261, #1262, #1263, #1264, #1265, #1266, #1270 Please only review the last **2 commits**, prefixed with FLINK-40870 If it helps with reading, you can see a draft PR with just that commit in my fork at https://github.com/dalelane/flink-kubernetes-operator/pull/10 --- Pending pull requests for [FLIP-611](https://cwiki.apache.org/confluence/spaces/FLINK/pages/451974246/FLIP-611+Running+Flink+jobs+in+MiniCluster+using+the+Kubernetes+Operator): - https://github.com/apache/flink-kubernetes-operator/pull/1223 - https://github.com/apache/flink-kubernetes-operator/pull/1259 - https://github.com/apache/flink-kubernetes-operator/pull/1261 - https://github.com/apache/flink-kubernetes-operator/pull/1262 - https://github.com/apache/flink-kubernetes-operator/pull/1263 - https://github.com/apache/flink-kubernetes-operator/pull/1264 - https://github.com/apache/flink-kubernetes-operator/pull/1265 - https://github.com/apache/flink-kubernetes-operator/pull/1266 - https://github.com/apache/flink-kubernetes-operator/pull/1269 - https://github.com/apache/flink-kubernetes-operator/pull/1270 --- ## What is the purpose of the change This pull request adds end-to-end tests for the FlinkMiniCluster behaviour specified by [FLIP-611](https://cwiki.apache.org/confluence/spaces/FLINK/pages/451974246/FLIP-611+Running+Flink+jobs+in+MiniCluster+using+the+Kubernetes+Operator), and runs them in CI against Flink 2.4. Most of the scripts follow an existing FlinkDeployment e2e test that does the same thing, and a couple test new MiniCluster-specific operations. ## Brief change log - `e2e-tests/utils.sh` - modified existing functions to let them be reused in minicluster tests - `e2e-tests/utils.sh`: new k8s helpers - `e2e-tests/data/minicluster-cr.yaml`: a FlinkMiniCluster based on `flinkdep-cr.yaml` with K8s HA, last-state upgrades and an Ingress. It uses native savepoints like `test_snapshot.sh` - `test_minicluster_operations.sh` - based on `test_application_operations.sh` - savepoint, last-state upgrade, and deleting the resource removes its Deployment, Service, ConfigMap and Ingress - `test_minicluster_kubernetes_ha.sh` - based on `test_application_kubernetes_ha.sh` - checks the job is recovered, not resubmitted, after a pod restart - `test_minicluster_snapshot.sh` - based on `test_snapshot.sh` - `FlinkStateSnapshot` savepoints, nonce savepoints and checkpoints, periodic savepoints, and suspend/resume from the upgrade savepoint - `test_minicluster_no_ha.sh` - checks that without HA, a pod restart resubmits the job from scratch - `test_minicluster_migration.sh` - checks that a job suspended with a savepoint on a FlinkMiniCluster can resume from it on a FlinkDeployment - `.github/workflows/ci.yml`: a new `e2e_minicluster` job ## Verifying this change - All five scripts pass locally on minikube, with the operator image built from this branch and a Flink image built from release-2.4. - The new CI job will not pass until an official `flink:2.4` image is published ## 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? yes - If yes, how is the feature documented? not applicable --- ##### Was generative AI tooling used to co-author this PR? - [ ] Yes (please specify the tool below) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
