Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
http-client: [ "okhttp" ]
java-version: [ "11", "17"]
flink-version:
- "v2_0"
- "v1_20"
- "v1_19"
- "v1_18"
Expand All @@ -107,11 +108,11 @@ jobs:
strategy:
matrix:
flink-version:
- "v2_0"
- "v1_20"
- "v1_19"
- "v1_18"
- "v1_17"
- "v1_16"
mode:
- "native"
- "standalone"
Expand Down Expand Up @@ -143,11 +144,11 @@ jobs:
strategy:
matrix:
flink-version:
- "v2_0"
- "v1_20"
- "v1_18"
- "v1_19"
- "v1_17"
- "v1_16"
mode:
- "native"
- "standalone"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,19 @@ jobs:
if [[ "${{ inputs.append-java-version }}" == "true" ]]; then
FLINK_IMAGE=${FLINK_IMAGE}-java${{ inputs.java-version }}
fi

EXAMPLES_JAR="https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.14.4/flink-examples-streaming_2.12-1.14.4.jar"
if [[ ${{ inputs.flink-version }} == v2* ]]; then
EXAMPLES_JAR="https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming/2.0-preview1/flink-examples-streaming-2.0-preview1.jar"
fi
ESCAPED_EXAMPLES_JAR=$(printf '%s\n' "$EXAMPLES_JAR" | sed -e 's/[\/&]/\\&/g')

echo FLINK_IMAGE=${FLINK_IMAGE}
echo EXAMPLES_JAR=${EXAMPLES_JAR}
sed -i "s/image: flink:.*/image: ${FLINK_IMAGE}/" e2e-tests/data/*.yaml
sed -i "s/flinkVersion: .*/flinkVersion: ${{ inputs.flink-version }}/" e2e-tests/data/*.yaml
sed -i "s/mode: .*/mode: ${{ inputs.mode }}/" e2e-tests/data/*.yaml
sed -i "s/STREAMING_EXAMPLES_JAR_URL/${ESCAPED_EXAMPLES_JAR}/" e2e-tests/data/*.yaml
git diff HEAD
echo "Running e2e-tests/$test"
bash e2e-tests/${{ inputs.test }} || exit 1
Expand Down
2 changes: 1 addition & 1 deletion docs/content.zh/docs/custom-resource/autoscaler.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ We suggest setting this based on your actual objective, such us 10,30,60 minutes
### Basic configuration example
```yaml
...
flinkVersion: v1_17
flinkVersion: v1_20
flinkConfiguration:
job.autoscaler.enabled: "true"
job.autoscaler.stabilization.interval: 1m
Expand Down
4 changes: 2 additions & 2 deletions docs/content.zh/docs/custom-resource/job-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ kind: FlinkDeployment
metadata:
name: basic-checkpoint-ha-example
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
state.savepoints.dir: file:///flink-data/savepoints
Expand Down
4 changes: 2 additions & 2 deletions docs/content.zh/docs/custom-resource/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ metadata:
namespace: default
name: basic-example
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
serviceAccount: flink
Expand Down
4 changes: 2 additions & 2 deletions docs/content.zh/docs/custom-resource/pod-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ metadata:
namespace: default
name: pod-template-example
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
serviceAccount: flink
Expand Down
4 changes: 2 additions & 2 deletions docs/content.zh/docs/operations/ingress.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ metadata:
namespace: default
name: advanced-ingress
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
ingress:
template: "flink.k8s.io/{{namespace}}/{{name}}(/|$)(.*)"
className: "nginx"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/custom-resource/autoscaler.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ We suggest setting this based on your actual objective, such us 10,30,60 minutes
### Basic configuration example
```yaml
...
flinkVersion: v1_17
flinkVersion: v1_20
flinkConfiguration:
job.autoscaler.enabled: "true"
job.autoscaler.stabilization.interval: 1m
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/custom-resource/job-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ kind: FlinkDeployment
metadata:
name: basic-checkpoint-ha-example
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
state.savepoints.dir: file:///flink-data/savepoints
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/custom-resource/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ metadata:
namespace: default
name: basic-example
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
serviceAccount: flink
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/custom-resource/pod-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ metadata:
namespace: default
name: pod-template-example
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
serviceAccount: flink
Expand Down
3 changes: 2 additions & 1 deletion docs/content/docs/custom-resource/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ This serves as a full reference for FlinkDeployment and FlinkSessionJob custom r
| v1_13 | No longer supported since 1.7 operator release. |
| v1_14 | No longer supported since 1.7 operator release. |
| v1_15 | Deprecated since 1.10 operator release. |
| v1_16 | |
| v1_16 | Deprecated since 1.11 operator release. |
| v1_17 | |
| v1_18 | |
| v1_19 | |
| v1_20 | |
| v2_0 | |
| majorVersion | int | The major integer from the Flink semver. For example for Flink 1.18.1 this would be 1. |
| minorVersion | int | The minor integer from the Flink semver. For example for Flink 1.18.1 this would be 18. |

Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/operations/ingress.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ metadata:
namespace: default
name: advanced-ingress
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
ingress:
template: "flink.k8s.io/{{namespace}}/{{name}}(/|$)(.*)"
className: "nginx"
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/data/autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ metadata:
namespace: default
name: flink-autoscaler-e2e
spec:
image: flink:1.18
flinkVersion: v1_18
image: flink:1.20
flinkVersion: v1_20
ingress:
template: "/{{namespace}}/{{name}}(/|$)(.*)"
className: "nginx"
Expand Down
8 changes: 4 additions & 4 deletions e2e-tests/data/flinkdep-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ metadata:
namespace: default
name: flink-example-statemachine
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
ingress:
template: "/{{namespace}}/{{name}}(/|$)(.*)"
className: "nginx"
annotations:
nginx.ingress.kubernetes.io/rewrite-target: "/$2"
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
high-availability: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory
high-availability.type: kubernetes
high-availability.storageDir: file:///opt/flink/volume/flink-ha
state.checkpoints.dir: file:///opt/flink/volume/flink-cp
state.savepoints.dir: file:///opt/flink/volume/flink-sp
Expand All @@ -44,7 +44,7 @@ spec:
image: busybox:1.35.0
imagePullPolicy: IfNotPresent
# Use wget or other tools to get user jars from remote storage
command: [ 'wget', 'https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.14.4/flink-examples-streaming_2.12-1.14.4.jar', '-O', '/flink-artifact/myjob.jar' ]
command: [ 'wget', 'STREAMING_EXAMPLES_JAR_URL', '-O', '/flink-artifact/myjob.jar' ]
volumeMounts:
- mountPath: /flink-artifact
name: flink-artifact
Expand Down
16 changes: 8 additions & 8 deletions e2e-tests/data/multi-sessionjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ metadata:
namespace: default
name: session-cluster-1
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
ingress:
template: "/{{namespace}}/{{name}}(/|$)(.*)"
className: "nginx"
annotations:
nginx.ingress.kubernetes.io/rewrite-target: "/$2"
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
high-availability: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory
high-availability.type: kubernetes
high-availability.storageDir: file:///opt/flink/volume/flink-ha
state.checkpoints.dir: file:///opt/flink/volume/flink-cp
state.savepoints.dir: file:///opt/flink/volume/flink-sp
Expand Down Expand Up @@ -70,16 +70,16 @@ metadata:
namespace: flink
name: session-cluster-1
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
ingress:
template: "/{{namespace}}/{{name}}(/|$)(.*)"
className: "nginx"
annotations:
nginx.ingress.kubernetes.io/rewrite-target: "/$2"
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
high-availability: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory
high-availability.type: kubernetes
high-availability.storageDir: file:///opt/flink/volume/flink-ha
state.checkpoints.dir: file:///opt/flink/volume/flink-cp
state.savepoints.dir: file:///opt/flink/volume/flink-sp
Expand Down Expand Up @@ -120,7 +120,7 @@ metadata:
spec:
deploymentName: session-cluster-1
job:
jarURI: https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.14.4/flink-examples-streaming_2.12-1.14.4.jar
jarURI: STREAMING_EXAMPLES_JAR_URL
parallelism: 2
upgradeMode: savepoint
entryClass: org.apache.flink.streaming.examples.statemachine.StateMachineExample
Expand All @@ -134,7 +134,7 @@ metadata:
spec:
deploymentName: session-cluster-1
job:
jarURI: https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.14.4/flink-examples-streaming_2.12-1.14.4.jar
jarURI: STREAMING_EXAMPLES_JAR_URL
parallelism: 2
upgradeMode: savepoint
entryClass: org.apache.flink.streaming.examples.statemachine.StateMachineExample
Expand Down
8 changes: 4 additions & 4 deletions e2e-tests/data/sessionjob-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ metadata:
namespace: default
name: session-cluster-1
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
ingress:
template: "/{{namespace}}/{{name}}(/|$)(.*)"
className: "nginx"
annotations:
nginx.ingress.kubernetes.io/rewrite-target: "/$2"
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
high-availability: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory
high-availability.type: kubernetes
high-availability.storageDir: file:///opt/flink/volume/flink-ha
state.checkpoints.dir: file:///opt/flink/volume/flink-cp
state.savepoints.dir: file:///opt/flink/volume/flink-sp
Expand Down Expand Up @@ -73,7 +73,7 @@ metadata:
spec:
deploymentName: session-cluster-1
job:
jarURI: https://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.12/1.14.4/flink-examples-streaming_2.12-1.14.4.jar
jarURI: STREAMING_EXAMPLES_JAR_URL
parallelism: 2
upgradeMode: savepoint
entryClass: org.apache.flink.streaming.examples.statemachine.StateMachineExample
Expand Down
6 changes: 6 additions & 0 deletions e2e-tests/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,14 @@ function delete_operator_pod_with_leadership() {
function debug_and_show_logs {
echo "Debugging failed e2e test:"
echo "Currently existing Kubernetes resources"
kubectl get flinkdeployments
kubectl get flinksessionjobs
kubectl get all
kubectl get configmaps
kubectl describe flinkdeployments
kubectl describe flinksessionjobs
kubectl describe all
kubectl describe configmaps

operator_pod_namespace=$(get_operator_pod_namespace)
operator_pod_names=$(get_operator_pod_name)
Expand Down
4 changes: 2 additions & 2 deletions examples/advanced-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ kind: FlinkDeployment
metadata:
name: advanced-ingress
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
ingress:
template: "/{{namespace}}/{{name}}(/|$)(.*)"
className: "nginx"
Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaling/autoscaling-dynamic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ metadata:
name: autoscaling-dynamic
spec:
image: autoscaling-example
flinkVersion: v1_18
flinkVersion: v1_20
flinkConfiguration:
job.autoscaler.enabled: "true"
job.autoscaler.stabilization.interval: "1m"
Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaling/autoscaling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ metadata:
name: autoscaling-example
spec:
image: autoscaling-example
flinkVersion: v1_18
flinkVersion: v1_20
flinkConfiguration:
job.autoscaler.enabled: "true"
job.autoscaler.stabilization.interval: "1m"
Expand Down
4 changes: 2 additions & 2 deletions examples/basic-checkpoint-ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ kind: FlinkDeployment
metadata:
name: basic-checkpoint-ha-example
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
state.savepoints.dir: file:///flink-data/savepoints
Expand Down
4 changes: 2 additions & 2 deletions examples/basic-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ kind: FlinkDeployment
metadata:
name: basic-ingress
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
ingress:
template: "{{name}}.{{namespace}}.flink.k8s.io"
flinkConfiguration:
Expand Down
4 changes: 2 additions & 2 deletions examples/basic-reactive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ kind: FlinkDeployment
metadata:
name: basic-reactive-example
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
scheduler-mode: REACTIVE
taskmanager.numberOfTaskSlots: "2"
Expand Down
4 changes: 2 additions & 2 deletions examples/basic-session-deployment-and-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ kind: FlinkDeployment
metadata:
name: basic-session-deployment-example
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
jobManager:
resource:
memory: "2048m"
Expand Down
4 changes: 2 additions & 2 deletions examples/basic-session-deployment-only.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ kind: FlinkDeployment
metadata:
name: basic-session-deployment-only-example
spec:
image: flink:1.17
flinkVersion: v1_17
image: flink:1.20
flinkVersion: v1_20
flinkConfiguration:
taskmanager.numberOfTaskSlots: "2"
serviceAccount: flink
Expand Down
Loading