This is an automated email from the ASF dual-hosted git repository.

gyfora pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 98f1be90 [FLINK-40581] Fix examples that cannot run against their 
declared Flink version
98f1be90 is described below

commit 98f1be9082f4031cf55df4cbd8da909c3d3d2af3
Author: Dennis-Mircea Ciupitu <[email protected]>
AuthorDate: Mon Sep 14 18:15:05 2026 +0200

    [FLINK-40581] Fix examples that cannot run against their declared Flink 
version
---
 examples/flink-beam-example/Dockerfile             |  2 +-
 examples/flink-beam-example/beam-example.yaml      |  4 +--
 examples/flink-beam-example/pom.xml                |  4 +--
 examples/flink-sql-runner-example/Dockerfile       |  2 +-
 examples/flink-sql-runner-example/sql-example.yaml |  2 +-
 examples/hpa/basic-hpa.yaml                        | 30 +++++++++++++++++++++-
 examples/snapshot/savepoint-job-defaults.yaml      |  3 ++-
 examples/snapshot/savepoint-job-full-spec.yaml     |  2 +-
 8 files changed, 39 insertions(+), 10 deletions(-)

diff --git a/examples/flink-beam-example/Dockerfile 
b/examples/flink-beam-example/Dockerfile
index 9c06c819..df10c793 100644
--- a/examples/flink-beam-example/Dockerfile
+++ b/examples/flink-beam-example/Dockerfile
@@ -16,7 +16,7 @@
 # limitations under the License.
 
################################################################################
 
-FROM flink:1.16
+FROM flink:2.2
 
 RUN mkdir /opt/flink/usrlib
 ADD target/flink-beam-example-*.jar /opt/flink/usrlib/beam-runner.jar
diff --git a/examples/flink-beam-example/beam-example.yaml 
b/examples/flink-beam-example/beam-example.yaml
index d873befa..26d9bf76 100644
--- a/examples/flink-beam-example/beam-example.yaml
+++ b/examples/flink-beam-example/beam-example.yaml
@@ -38,7 +38,7 @@ spec:
         cpu: "1"
   job:
     entryClass: org.apache.beam.examples.WordCount
-    jarURI: local:///opt/flink/usrlib/beam-runner.jar
-    args: [ "--runner=FlinkRunner", "--output=file://opt/output.txt" ]
+    jarURI: file:///opt/flink/usrlib/beam-runner.jar
+    args: [ "--runner=FlinkRunner", "--output=file:///opt/flink/output.txt", 
"--attachedMode=false" ]
     parallelism: 1
     upgradeMode: stateless
diff --git a/examples/flink-beam-example/pom.xml 
b/examples/flink-beam-example/pom.xml
index 6de17927..0ad4a091 100644
--- a/examples/flink-beam-example/pom.xml
+++ b/examples/flink-beam-example/pom.xml
@@ -31,7 +31,7 @@ under the License.
     <name>Flink Beam Example</name>
 
     <properties>
-        <beam.version>2.73.0</beam.version>
+        <beam.version>2.76.0</beam.version>
     </properties>
 
     <repositories>
@@ -69,7 +69,7 @@ under the License.
 
         <dependency>
             <groupId>org.apache.beam</groupId>
-            <artifactId>beam-runners-flink-1.19</artifactId>
+            <artifactId>beam-runners-flink-2.2</artifactId>
             <version>${beam.version}</version>
         </dependency>
 
diff --git a/examples/flink-sql-runner-example/Dockerfile 
b/examples/flink-sql-runner-example/Dockerfile
index d46f9280..fe8a4244 100644
--- a/examples/flink-sql-runner-example/Dockerfile
+++ b/examples/flink-sql-runner-example/Dockerfile
@@ -16,7 +16,7 @@
 # limitations under the License.
 
################################################################################
 
-FROM flink:1.16
+FROM flink:2.2
 
 RUN mkdir /opt/flink/usrlib
 ADD target/flink-sql-runner-example-*.jar /opt/flink/usrlib/sql-runner.jar
diff --git a/examples/flink-sql-runner-example/sql-example.yaml 
b/examples/flink-sql-runner-example/sql-example.yaml
index c7d7ec1c..8914acde 100644
--- a/examples/flink-sql-runner-example/sql-example.yaml
+++ b/examples/flink-sql-runner-example/sql-example.yaml
@@ -22,7 +22,7 @@ metadata:
   name: sql-example
 spec:
   image: flink-sql-runner-example:latest
-  flinkVersion: v1_20
+  flinkVersion: v2_2
   flinkConfiguration:
     taskmanager.numberOfTaskSlots: 1
   serviceAccount: flink
diff --git a/examples/hpa/basic-hpa.yaml b/examples/hpa/basic-hpa.yaml
index e35be9cf..999f582e 100644
--- a/examples/hpa/basic-hpa.yaml
+++ b/examples/hpa/basic-hpa.yaml
@@ -16,6 +16,34 @@
 # limitations under the License.
 
################################################################################
 
+apiVersion: flink.apache.org/v1beta1
+kind: FlinkDeployment
+metadata:
+  name: basic-hpa-example
+spec:
+  image: flink:2.2
+  flinkVersion: v2_2
+  mode: standalone
+  flinkConfiguration:
+    scheduler-mode: REACTIVE
+    taskmanager.numberOfTaskSlots: "2"
+  serviceAccount: flink
+  jobManager:
+    resources:
+      requests:
+        memory: "2048m"
+        cpu: "0.5"
+  taskManager:
+    replicas: 1
+    resources:
+      requests:
+        memory: "2048m"
+        cpu: "0.5"
+  job:
+    jarURI: local:///opt/flink/examples/streaming/StateMachineExample.jar
+    upgradeMode: stateless
+
+---
 apiVersion: autoscaling/v2
 kind: HorizontalPodAutoscaler
 metadata:
@@ -34,4 +62,4 @@ spec:
   scaleTargetRef:
     apiVersion: flink.apache.org/v1beta1
     kind: FlinkDeployment
-    name: basic
+    name: basic-hpa-example
diff --git a/examples/snapshot/savepoint-job-defaults.yaml 
b/examples/snapshot/savepoint-job-defaults.yaml
index 9cd26e37..68fd8e2f 100644
--- a/examples/snapshot/savepoint-job-defaults.yaml
+++ b/examples/snapshot/savepoint-job-defaults.yaml
@@ -25,4 +25,5 @@ spec:
   jobReference:
     kind: FlinkDeployment
     name: example-deployment
-  savepoint: {}  # This will use the savepoint path configured in the job 
config.
+  savepoint:
+    formatType: NATIVE
diff --git a/examples/snapshot/savepoint-job-full-spec.yaml 
b/examples/snapshot/savepoint-job-full-spec.yaml
index 5a0356a4..d322a9e4 100644
--- a/examples/snapshot/savepoint-job-full-spec.yaml
+++ b/examples/snapshot/savepoint-job-full-spec.yaml
@@ -28,5 +28,5 @@ spec:
   savepoint:
     alreadyExists: false
     disposeOnDelete: true
-    formatType: CANONICAL
+    formatType: NATIVE
     path: /flink-data/savepoints-custom

Reply via email to