You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by gy...@apache.org on 2025/08/22 05:59:58 UTC
(flink-kubernetes-operator) branch main updated: [FLINK-37406] Update examples to use yaml based configs
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 d9fa4797 [FLINK-37406] Update examples to use yaml based configs
d9fa4797 is described below
commit d9fa47976f68148dd64c4d3180f0c5a25d3fe609
Author: Attila Mészáros <a_...@apple.com>
AuthorDate: Fri Aug 22 07:59:52 2025 +0200
[FLINK-37406] Update examples to use yaml based configs
---
examples/advanced-ingress.yaml | 2 +-
examples/autoscaling/autoscaling-dynamic.yaml | 15 +++++------
examples/autoscaling/autoscaling.yaml | 25 +++++++++++--------
examples/basic-checkpoint-ha.yaml | 12 +++++----
examples/basic-ingress.yaml | 2 +-
examples/basic-reactive.yaml | 12 +++++----
examples/basic-session-deployment-only.yaml | 2 +-
examples/basic.yaml | 2 +-
examples/custom-logging.yaml | 2 +-
examples/flink-beam-example/beam-example.yaml | 2 +-
examples/flink-python-example/python-example.yaml | 2 +-
examples/flink-sql-runner-example/sql-example.yaml | 2 +-
.../basic-secure-deployment-only.yaml | 29 ++++++++++++----------
.../basic-secure-session-job-only.yaml | 29 ++++++++++++----------
examples/flink-tls-example/basic-secure.yaml | 15 +++++------
examples/pod-template.yaml | 2 +-
examples/snapshot/job-from-savepoint.yaml | 5 ++--
17 files changed, 88 insertions(+), 72 deletions(-)
diff --git a/examples/advanced-ingress.yaml b/examples/advanced-ingress.yaml
index 5b3eb13d..c83b923c 100644
--- a/examples/advanced-ingress.yaml
+++ b/examples/advanced-ingress.yaml
@@ -29,7 +29,7 @@ spec:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: "/$2"
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "2"
+ taskmanager.numberOfTaskSlots: 2
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/autoscaling/autoscaling-dynamic.yaml b/examples/autoscaling/autoscaling-dynamic.yaml
index 0e6466a4..0d95dc7e 100644
--- a/examples/autoscaling/autoscaling-dynamic.yaml
+++ b/examples/autoscaling/autoscaling-dynamic.yaml
@@ -24,13 +24,14 @@ spec:
image: autoscaling-example
flinkVersion: v1_20
flinkConfiguration:
- job.autoscaler.enabled: "true"
- job.autoscaler.stabilization.interval: "1m"
- job.autoscaler.metrics.window: "15m"
- job.autoscaler.utilization.target: "0.5"
- job.autoscaler.target.utilization.boundary: "0.3"
- pipeline.max-parallelism: "32"
- taskmanager.numberOfTaskSlots: "4"
+ job.autoscaler:
+ enabled: true
+ stabilization.interval: 1m
+ metrics.window: 15m
+ utilization.target: 0.5
+ target.utilization.boundary: 0.3
+ pipeline.max-parallelism: 32
+ taskmanager.numberOfTaskSlots: 4
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/autoscaling/autoscaling.yaml b/examples/autoscaling/autoscaling.yaml
index afa30dae..3904b069 100644
--- a/examples/autoscaling/autoscaling.yaml
+++ b/examples/autoscaling/autoscaling.yaml
@@ -24,18 +24,21 @@ spec:
image: autoscaling-example
flinkVersion: v1_20
flinkConfiguration:
- job.autoscaler.enabled: "true"
- job.autoscaler.stabilization.interval: "1m"
- job.autoscaler.metrics.window: "3m"
- pipeline.max-parallelism: "24"
- taskmanager.numberOfTaskSlots: "4"
- state.savepoints.dir: file:///flink-data/savepoints
- state.checkpoints.dir: file:///flink-data/checkpoints
- high-availability.type: kubernetes
- high-availability.storageDir: file:///flink-data/ha
- execution.checkpointing.interval: "1m"
+ job.autoscaler:
+ enabled: true
+ stabilization.interval: 1m
+ metrics.window: 3m
+ target.utilization.boundary: 0.1
+ pipeline.max-parallelism: 24
+ taskmanager.numberOfTaskSlots: 4
+ state:
+ savepoints.dir: file:///flink-data/savepoints
+ checkpoints.dir: file:///flink-data/checkpoints
+ high-availability:
+ type: kubernetes
+ storageDir: file:///flink-data/ha
+ execution.checkpointing.interval: 1m
jobmanager.scheduler: adaptive
- job.autoscaler.target.utilization.boundary: "0.1"
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/basic-checkpoint-ha.yaml b/examples/basic-checkpoint-ha.yaml
index f8f51d68..34d9dc1f 100644
--- a/examples/basic-checkpoint-ha.yaml
+++ b/examples/basic-checkpoint-ha.yaml
@@ -24,11 +24,13 @@ spec:
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "2"
- state.savepoints.dir: file:///flink-data/savepoints
- state.checkpoints.dir: file:///flink-data/checkpoints
- high-availability.type: kubernetes
- high-availability.storageDir: file:///flink-data/ha
+ taskmanager.numberOfTaskSlots: 2
+ state:
+ savepoints.dir: file:///flink-data/savepoints
+ checkpoints.dir: file:///flink-data/checkpoints
+ high-availability:
+ type: kubernetes
+ storageDir: file:///flink-data/ha
kubernetes.operator.savepoint.format.type: NATIVE
serviceAccount: flink
jobManager:
diff --git a/examples/basic-ingress.yaml b/examples/basic-ingress.yaml
index db88b3de..42e5f778 100644
--- a/examples/basic-ingress.yaml
+++ b/examples/basic-ingress.yaml
@@ -26,7 +26,7 @@ spec:
ingress:
template: "{{name}}.{{namespace}}.flink.k8s.io"
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "2"
+ taskmanager.numberOfTaskSlots: 2
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/basic-reactive.yaml b/examples/basic-reactive.yaml
index 9fcd8d33..c51e584e 100644
--- a/examples/basic-reactive.yaml
+++ b/examples/basic-reactive.yaml
@@ -25,11 +25,13 @@ spec:
flinkVersion: v1_20
flinkConfiguration:
scheduler-mode: REACTIVE
- taskmanager.numberOfTaskSlots: "2"
- state.savepoints.dir: file:///flink-data/savepoints
- state.checkpoints.dir: file:///flink-data/checkpoints
- high-availability: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory
- high-availability.storageDir: file:///flink-data/ha
+ taskmanager.numberOfTaskSlots: 2
+ state:
+ savepoints.dir: file:///flink-data/savepoints
+ checkpoints.dir: file:///flink-data/checkpoints
+ high-availability:
+ type: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory
+ storageDir: file:///flink-data/ha
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/basic-session-deployment-only.yaml b/examples/basic-session-deployment-only.yaml
index 786eb414..26f06c03 100644
--- a/examples/basic-session-deployment-only.yaml
+++ b/examples/basic-session-deployment-only.yaml
@@ -24,7 +24,7 @@ spec:
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "2"
+ taskmanager.numberOfTaskSlots: 2
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/basic.yaml b/examples/basic.yaml
index b0761936..b4c94411 100644
--- a/examples/basic.yaml
+++ b/examples/basic.yaml
@@ -24,7 +24,7 @@ spec:
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "2"
+ taskmanager.numberOfTaskSlots: 2
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/custom-logging.yaml b/examples/custom-logging.yaml
index 76a2e691..37821513 100644
--- a/examples/custom-logging.yaml
+++ b/examples/custom-logging.yaml
@@ -24,7 +24,7 @@ spec:
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "2"
+ taskmanager.numberOfTaskSlots: 2
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/flink-beam-example/beam-example.yaml b/examples/flink-beam-example/beam-example.yaml
index ca311b33..3bcab538 100644
--- a/examples/flink-beam-example/beam-example.yaml
+++ b/examples/flink-beam-example/beam-example.yaml
@@ -24,7 +24,7 @@ spec:
image: flink-beam-example:latest
flinkVersion: v1_19
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "1"
+ taskmanager.numberOfTaskSlots: 1
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/flink-python-example/python-example.yaml b/examples/flink-python-example/python-example.yaml
index 8898f269..87fbacaf 100644
--- a/examples/flink-python-example/python-example.yaml
+++ b/examples/flink-python-example/python-example.yaml
@@ -24,7 +24,7 @@ spec:
image: flink-python-example:latest
flinkVersion: v1_20
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "1"
+ taskmanager.numberOfTaskSlots: 1
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/flink-sql-runner-example/sql-example.yaml b/examples/flink-sql-runner-example/sql-example.yaml
index 98a4b236..39c4caec 100644
--- a/examples/flink-sql-runner-example/sql-example.yaml
+++ b/examples/flink-sql-runner-example/sql-example.yaml
@@ -24,7 +24,7 @@ spec:
image: flink-sql-runner-example:latest
flinkVersion: v1_20
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "1"
+ taskmanager.numberOfTaskSlots: 1
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/flink-tls-example/basic-secure-deployment-only.yaml b/examples/flink-tls-example/basic-secure-deployment-only.yaml
index dd7844d7..91d8a458 100644
--- a/examples/flink-tls-example/basic-secure-deployment-only.yaml
+++ b/examples/flink-tls-example/basic-secure-deployment-only.yaml
@@ -25,19 +25,22 @@ spec:
flinkVersion: v1_20
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
- security.ssl.internal.enabled: 'true'
- security.ssl.internal.keystore: /opt/flink/tls-cert/keystore.jks
- security.ssl.internal.keystore-password: password1234
- security.ssl.internal.truststore: /opt/flink/tls-cert/truststore.jks
- security.ssl.internal.key-password: password1234
- security.ssl.internal.truststore-password: password1234
- security.ssl.rest.enabled: 'true'
- security.ssl.rest.keystore: /opt/flink/tls-cert/keystore.jks
- security.ssl.rest.keystore-password: password1234
- security.ssl.rest.truststore: /opt/flink/tls-cert/truststore.jks
- security.ssl.rest.key-password: password1234
- security.ssl.rest.truststore-password: password1234
- kubernetes.secrets: 'basic-secure-cert:/opt/flink/tls-cert'
+ security.ssl:
+ internal:
+ enabled: true
+ keystore: /opt/flink/tls-cert/keystore.jks
+ keystore-password: password1234
+ truststore: /opt/flink/tls-cert/truststore.jks
+ key-password: password1234
+ truststore-password: password1234
+ rest:
+ enabled: 'true'
+ keystore: /opt/flink/tls-cert/keystore.jks
+ keystore-password: password1234
+ truststore: /opt/flink/tls-cert/truststore.jks
+ key-password: password1234
+ truststore-password: password1234
+ kubernetes.secrets: basic-secure-cert:/opt/flink/tls-cert
serviceAccount: flink
jobManager:
resource:
diff --git a/examples/flink-tls-example/basic-secure-session-job-only.yaml b/examples/flink-tls-example/basic-secure-session-job-only.yaml
index 60b85113..2fd48ac8 100644
--- a/examples/flink-tls-example/basic-secure-session-job-only.yaml
+++ b/examples/flink-tls-example/basic-secure-session-job-only.yaml
@@ -21,19 +21,22 @@ metadata:
name: basic-secure-session-job-only
spec:
flinkConfiguration:
- security.ssl.internal.enabled: 'true'
- security.ssl.internal.keystore: /opt/flink/tls-cert/keystore.jks
- security.ssl.internal.keystore-password: password1234
- security.ssl.internal.truststore: /opt/flink/tls-cert/truststore.jks
- security.ssl.internal.key-password: password1234
- security.ssl.internal.truststore-password: password1234
- security.ssl.rest.keystore: /opt/flink/tls-cert/keystore.jks
- security.ssl.rest.truststore: /opt/flink/tls-cert/truststore.jks
- security.ssl.rest.key-password: password1234
- security.ssl.rest.truststore-password: password1234
- security.ssl.rest.enabled: 'true'
- security.ssl.rest.keystore-password: password1234
- kubernetes.secrets: 'basic-secure-cert:/opt/flink/tls-cert'
+ security.ssl:
+ internal:
+ enabled: true
+ keystore: /opt/flink/tls-cert/keystore.jks
+ keystore-password: password1234
+ truststore: /opt/flink/tls-cert/truststore.jks
+ key-password: password1234
+ truststore-password: password1234
+ rest:
+ keystore: /opt/flink/tls-cert/keystore.jks
+ truststore: /opt/flink/tls-cert/truststore.jks
+ key-password: password1234
+ truststore-password: password1234
+ enabled: true
+ keystore-password: password1234
+ kubernetes.secrets: basic-secure-cert:/opt/flink/tls-cert
deploymentName: basic-secure-deployment-only
job:
jarURI: https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.16.1/flink-examples-streaming_2.12-1.16.1-TopSpeedWindowing.jar
diff --git a/examples/flink-tls-example/basic-secure.yaml b/examples/flink-tls-example/basic-secure.yaml
index 5c425a5e..405eabac 100644
--- a/examples/flink-tls-example/basic-secure.yaml
+++ b/examples/flink-tls-example/basic-secure.yaml
@@ -24,13 +24,14 @@ spec:
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "2"
- security.ssl.enabled: 'true'
- security.ssl.truststore: /opt/flink/tls-cert/truststore.jks
- security.ssl.truststore-password: password1234
- security.ssl.keystore: /opt/flink/tls-cert/keystore.jks
- security.ssl.keystore-password: password1234
- security.ssl.key-password: password1234
+ taskmanager.numberOfTaskSlots: 2
+ security.ssl:
+ enabled: 'true'
+ truststore: /opt/flink/tls-cert/truststore.jks
+ truststore-password: password1234
+ keystore: /opt/flink/tls-cert/keystore.jks
+ keystore-password: password1234
+ key-password: password1234
kubernetes.secrets: 'basic-secure-cert:/opt/flink/tls-cert'
serviceAccount: flink
jobManager:
diff --git a/examples/pod-template.yaml b/examples/pod-template.yaml
index f44f8a78..5c77f8c5 100644
--- a/examples/pod-template.yaml
+++ b/examples/pod-template.yaml
@@ -24,7 +24,7 @@ spec:
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
- taskmanager.numberOfTaskSlots: "2"
+ taskmanager.numberOfTaskSlots: 2
serviceAccount: flink
podTemplate:
spec:
diff --git a/examples/snapshot/job-from-savepoint.yaml b/examples/snapshot/job-from-savepoint.yaml
index 8f4eaeaf..4864578a 100644
--- a/examples/snapshot/job-from-savepoint.yaml
+++ b/examples/snapshot/job-from-savepoint.yaml
@@ -37,8 +37,9 @@ spec:
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
- state.checkpoints.dir: file:///flink-data/checkpoints
- state.savepoints.dir: file:///flink-data/savepoints
+ state:
+ checkpoints.dir: file:///flink-data/checkpoints
+ savepoints.dir: file:///flink-data/savepoints
serviceAccount: flink
jobManager:
resource: