Skip to content

Commit

Permalink
[FLINK-23961][kubernetes] Hint user about missing 'kubernetes.cluster…
Browse files Browse the repository at this point in the history
…-id' config option
  • Loading branch information
dmvk authored Sep 8, 2021
1 parent 37a0e91 commit 7e91e82
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,15 @@ public Fabric8FlinkKubeClient(
Configuration flinkConfig,
NamespacedKubernetesClient client,
ExecutorService executorService) {
this.clusterId = checkNotNull(flinkConfig.getString(KubernetesConfigOptions.CLUSTER_ID));
this.clusterId =
flinkConfig
.getOptional(KubernetesConfigOptions.CLUSTER_ID)
.orElseThrow(
() ->
new IllegalArgumentException(
String.format(
"Configuration option '%s' is not set.",
KubernetesConfigOptions.CLUSTER_ID.key())));
this.namespace = flinkConfig.getString(KubernetesConfigOptions.NAMESPACE);
this.maxRetryAttempts =
flinkConfig.getInteger(
Expand Down

0 comments on commit 7e91e82

Please sign in to comment.