Skip to content

Commit 29a4aa5

Browse files
committed
[FLINK-35116] Bump operator sdk version to 4.8.3
1 parent 75eb206 commit 29a4aa5

File tree

11 files changed

+23
-25
lines changed

11 files changed

+23
-25
lines changed

docs/layouts/shortcodes/generated/kubernetes_operator_config_configuration.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@
304304
</tr>
305305
<tr>
306306
<td><h5>kubernetes.operator.reconcile.parallelism</h5></td>
307-
<td style="word-wrap: break-word;">200</td>
307+
<td style="word-wrap: break-word;">50</td>
308308
<td>Integer</td>
309309
<td>The maximum number of threads running the reconciliation loop. Use -1 for infinite.</td>
310310
</tr>

docs/layouts/shortcodes/generated/system_section.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
</tr>
101101
<tr>
102102
<td><h5>kubernetes.operator.reconcile.parallelism</h5></td>
103-
<td style="word-wrap: break-word;">200</td>
103+
<td style="word-wrap: break-word;">50</td>
104104
<td>Integer</td>
105105
<td>The maximum number of threads running the reconciliation loop. Use -1 for infinite.</td>
106106
</tr>

flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/validation/CrdCompatibilityChecker.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ protected static void checkObjectCompatibility(
9393
// This field was removed from Kubernetes ObjectMeta v1 in 1.25 as it was unused
9494
// for a long time. If set for any reason (very unlikely as it does nothing),
9595
// the property will be dropped / ignored by the api server.
96-
if (!fieldPath.endsWith(".metadata.clusterName")) {
96+
if (!fieldPath.endsWith(".metadata.clusterName")
97+
// This claims field was removed in Kubernetes 1.28 as it was mistakenly
98+
// added in the first place. For more context please refer to
99+
// https://github.com/kubernetes/api/commit/8b14183
100+
&& !fieldPath.contains(".volumeClaimTemplate.spec.resources.claims")) {
97101
err(fieldPath + " has been removed");
98102
}
99103
} else {

flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/FlinkOperator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private void overrideOperatorConfigs(ConfigurationServiceOverrider overrider) {
137137
overrider.withExecutorService(Executors.newCachedThreadPool());
138138
} else {
139139
LOG.info("Configuring operator with {} reconciliation threads.", parallelism);
140-
overrider.withExecutorService(Executors.newFixedThreadPool(parallelism));
140+
overrider.withConcurrentReconciliationThreads(parallelism);
141141
}
142142

143143
if (operatorConf.isJosdkMetricsEnabled()) {

flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/FlinkOperatorConfiguration.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,7 @@ private static LeaderElectionConfiguration getLeaderElectionConfig(Configuration
266266
null,
267267
conf.get(KubernetesOperatorConfigOptions.OPERATOR_LEADER_ELECTION_LEASE_DURATION),
268268
conf.get(KubernetesOperatorConfigOptions.OPERATOR_LEADER_ELECTION_RENEW_DEADLINE),
269-
conf.get(KubernetesOperatorConfigOptions.OPERATOR_LEADER_ELECTION_RETRY_PERIOD),
270-
null);
269+
conf.get(KubernetesOperatorConfigOptions.OPERATOR_LEADER_ELECTION_RETRY_PERIOD));
271270
}
272271

273272
private static Optional<String> getEnv(String key) {

flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/metrics/OperatorJosdkMetrics.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ private KubernetesResourceNamespaceMetricGroup getResourceNsMg(
205205

206206
Class<? extends AbstractFlinkResource<?, ?>> resourceClass;
207207

208-
if (resourceGvk.kind.equals(FlinkDeployment.class.getSimpleName())) {
208+
if (resourceGvk.getKind().equals(FlinkDeployment.class.getSimpleName())) {
209209
resourceClass = FlinkDeployment.class;
210-
} else if (resourceGvk.kind.equals(FlinkSessionJob.class.getSimpleName())) {
210+
} else if (resourceGvk.getKind().equals(FlinkSessionJob.class.getSimpleName())) {
211211
resourceClass = FlinkSessionJob.class;
212212
} else {
213213
return Optional.empty();

flink-kubernetes-operator/src/main/resources/META-INF/NOTICE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ This project bundles the following dependencies under the Apache Software Licens
4747
- io.fabric8:kubernetes-model-scheduling:jar:6.8.1
4848
- io.fabric8:kubernetes-model-storageclass:jar:6.8.1
4949
- io.fabric8:zjsonpatch:jar:0.3.0
50-
- io.javaoperatorsdk:operator-framework-core:jar:4.4.4
51-
- io.javaoperatorsdk:operator-framework:jar:4.4.4
50+
- io.javaoperatorsdk:operator-framework-core:jar:4.8.3
51+
- io.javaoperatorsdk:operator-framework:jar:4.8.3
5252
- org.apache.commons:commons-compress:1.21
53-
- org.apache.commons:commons-lang3:3.13.0
53+
- org.apache.commons:commons-lang3:3.14.0
5454
- org.apache.commons:commons-math3:3.6.1
5555
- org.apache.commons:commons-text:jar:1.10.0
5656
- org.apache.logging.log4j:log4j-1.2-api:2.17.1

flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/FlinkOperatorTest.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,10 @@ public void testConfigurationPassedToJOSDK() {
7070

7171
var configService = testOperator.getOperator().getConfigurationService();
7272

73-
// Test parallelism being passed expectedly
73+
// Test parallelism being passed
7474
var executorService = configService.getExecutorService();
7575
Assertions.assertInstanceOf(ThreadPoolExecutor.class, executorService);
7676
ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) executorService;
77-
for (int i = 0; i < testParallelism * 2; i++) {
78-
threadPoolExecutor.execute(
79-
() -> {
80-
try {
81-
Thread.sleep(1000);
82-
} catch (InterruptedException e) {
83-
e.printStackTrace();
84-
}
85-
});
86-
}
87-
Assertions.assertEquals(threadPoolExecutor.getPoolSize(), testParallelism);
8877
Assertions.assertEquals(threadPoolExecutor.getMaximumPoolSize(), testParallelism);
8978

9079
// Test label selector being passed

flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/TestUtils.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import io.fabric8.mockwebserver.utils.ResponseProvider;
5252
import io.javaoperatorsdk.operator.api.config.ControllerConfiguration;
5353
import io.javaoperatorsdk.operator.api.reconciler.Context;
54+
import io.javaoperatorsdk.operator.api.reconciler.IndexedResourceCache;
5455
import io.javaoperatorsdk.operator.api.reconciler.ResourceDiscriminator;
5556
import io.javaoperatorsdk.operator.api.reconciler.RetryInfo;
5657
import io.javaoperatorsdk.operator.api.reconciler.dependent.managed.ManagedDependentResourceContext;
@@ -497,5 +498,10 @@ public KubernetesClient getClient() {
497498
public ExecutorService getWorkflowExecutorService() {
498499
throw new UnsupportedOperationException("Not implemented");
499500
}
501+
502+
@Override
503+
public IndexedResourceCache<T> getPrimaryCache() {
504+
return null;
505+
}
500506
}
501507
}

flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/service/AbstractFlinkServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ public void testBlockingDeploymentDeletion() {
10131013
namespace, deploymentName);
10141014
String watchUrl =
10151015
String.format(
1016-
"/apis/apps/v1/namespaces/%s/deployments?fieldSelector=metadata.name%%3D%s&timeoutSeconds=600&allowWatchBookmarks=true&watch=true",
1016+
"/apis/apps/v1/namespaces/%s/deployments?allowWatchBookmarks=true&fieldSelector=metadata.name%%3D%s&timeoutSeconds=600&watch=true",
10171017
namespace, deploymentName);
10181018

10191019
var flinkService = new TestingService(null);

0 commit comments

Comments
 (0)