You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "csviri (via GitHub)" <gi...@apache.org> on 2025/08/18 14:47:23 UTC
[PR] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
csviri opened a new pull request, #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013
## What is the purpose of the change
Allow to set `flinkConfiguration` as `yaml`, not just key/value pairs.
TODO: Flip
## Brief change log
- changes CRD to allow set `flinkConfiguration` as `yaml` not just key/value pairs
## Verifying this change
TODO describe tests
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changes to the `CustomResourceDescriptors`: yes
- Core observer or reconciler logic that is regularly executed: yes
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? docs and JavaDocs (TODO)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2286993298
##########
flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/controller/FlinkDeploymentControllerTest.java:
##########
@@ -197,6 +197,7 @@ public void verifyReconcileLoopForInitialSuspendedDeploymentWithSavepoint(
TestUtils.buildApplicationCluster(flinkVersion, JobState.SUSPENDED);
appCluster.getSpec().getJob().setUpgradeMode(UpgradeMode.SAVEPOINT);
appCluster.getSpec().getJob().setInitialSavepointPath("s0");
+
Review Comment:
There are a bunch of files that only have these newline changes, can you please remove those from the PR?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "csviri (via GitHub)" <gi...@apache.org>.
csviri commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2287403591
##########
flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/spec/ConfigObjectNode.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.operator.api.spec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/** */
+public class ConfigObjectNode extends ObjectNode {
+
+ public ConfigObjectNode() {
+ this(JsonNodeFactory.instance);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc, Map<String, JsonNode> kids) {
+ super(nc, kids);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc) {
+ super(nc);
+ }
+
+ public void removeAll(String... names) {
+ for (String name : names) {
+ remove(name);
+ }
+ }
+
+ public void putAllFrom(Map<String, String> value) {
Review Comment:
Unfortunatelly there is not a deprecated `putAll` in `ObjectNode` so that would be a bit confusing, but if you have suggestion for better name we can change it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "csviri (via GitHub)" <gi...@apache.org>.
csviri commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2287881779
##########
flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/spec/ConfigObjectNode.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.operator.api.spec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/** */
+public class ConfigObjectNode extends ObjectNode {
+
+ public ConfigObjectNode() {
+ this(JsonNodeFactory.instance);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc, Map<String, JsonNode> kids) {
+ super(nc, kids);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc) {
+ super(nc);
+ }
+
+ public void removeAll(String... names) {
+ for (String name : names) {
+ remove(name);
+ }
+ }
+
+ public void putAllFrom(Map<String, String> value) {
+ value.forEach(this::put);
+ }
+
+ public void set(Map<String, String> value) {
+ removeAll();
Review Comment:
changed it to `public void setAllFrom(Map<String, String> value)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "csviri (via GitHub)" <gi...@apache.org>.
csviri commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2287397503
##########
flink-kubernetes-operator/src/test/java/org/apache/flink/kubernetes/operator/controller/FlinkDeploymentControllerTest.java:
##########
@@ -197,6 +197,7 @@ public void verifyReconcileLoopForInitialSuspendedDeploymentWithSavepoint(
TestUtils.buildApplicationCluster(flinkVersion, JobState.SUSPENDED);
appCluster.getSpec().getJob().setUpgradeMode(UpgradeMode.SAVEPOINT);
appCluster.getSpec().getJob().setInitialSavepointPath("s0");
+
Review Comment:
yes, sure will clean it up, thx
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora merged PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2286997069
##########
flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/spec/ConfigObjectNode.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.operator.api.spec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/** */
+public class ConfigObjectNode extends ObjectNode {
+
+ public ConfigObjectNode() {
+ this(JsonNodeFactory.instance);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc, Map<String, JsonNode> kids) {
+ super(nc, kids);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc) {
+ super(nc);
+ }
+
+ public void removeAll(String... names) {
+ for (String name : names) {
+ remove(name);
+ }
+ }
+
+ public void putAllFrom(Map<String, String> value) {
+ value.forEach(this::put);
+ }
+
+ public void set(Map<String, String> value) {
+ removeAll();
+ putAllFrom(value);
+ }
+
+ public Map<String, String> asFlatMap() {
Review Comment:
I suggest adding a helper method:
```
public Configuration asConfiguration() {
return Configuration.fromMap(asFlatMap());
}
```
This is used in a lot of places.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "csviri (via GitHub)" <gi...@apache.org>.
csviri commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2287415790
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/KubernetesScalingRealizer.java:
##########
@@ -63,15 +62,16 @@ public void realizeConfigOverrides(
}
FlinkDeployment flinkDeployment = ((FlinkDeployment) context.getResource());
// Apply config overrides
- Map<String, String> flinkConf = flinkDeployment.getSpec().getFlinkConfiguration();
- for (String keyToRemove : configChanges.getRemovals()) {
- flinkConf.remove(keyToRemove);
- }
- flinkConf.putAll(configChanges.getOverrides());
+
+ flinkDeployment.getSpec().getFlinkConfiguration().remove(configChanges.getRemovals());
Review Comment:
actually this uses this method from jackson
```java
public ObjectNode remove(Collection<String> propertyNames) {
this._children.keySet().removeAll(propertyNames);
return this;
}
```
would rather rename our `removeAll` to `remove` so we follow this convention/style
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "csviri (via GitHub)" <gi...@apache.org>.
csviri commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2284670989
##########
examples/kubernetes-client-examples/src/main/java/org/apache/flink/examples/Basic.java:
##########
@@ -49,7 +50,7 @@ public static void main(String[] args) {
flinkDeploymentSpec.setImage("flink:1.19");
Map<String, String> flinkConfiguration =
Map.ofEntries(entry("taskmanager.numberOfTaskSlots", "2"));
- flinkDeploymentSpec.setFlinkConfiguration(flinkConfiguration);
+ flinkDeploymentSpec.setFlinkConfiguration(toJsonNode(flinkConfiguration));
Review Comment:
If remember correctly jackson had some issues with that, but will take a look how to improve this API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "csviri (via GitHub)" <gi...@apache.org>.
csviri commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2290376460
##########
flink-kubernetes-operator-api/pom.xml:
##########
@@ -126,6 +126,13 @@ under the License.
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
Review Comment:
good catch fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2284581243
##########
examples/kubernetes-client-examples/src/main/java/org/apache/flink/examples/Basic.java:
##########
@@ -49,7 +50,7 @@ public static void main(String[] args) {
flinkDeploymentSpec.setImage("flink:1.19");
Map<String, String> flinkConfiguration =
Map.ofEntries(entry("taskmanager.numberOfTaskSlots", "2"));
- flinkDeploymentSpec.setFlinkConfiguration(flinkConfiguration);
+ flinkDeploymentSpec.setFlinkConfiguration(toJsonNode(flinkConfiguration));
Review Comment:
Can we provide a `setFlinkConfiguration(Map<String, String> map)` method like before to avoid the code changes everywhere? We can mark it deprecated but seems useful?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "csviri (via GitHub)" <gi...@apache.org>.
csviri commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2287422635
##########
flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/spec/ConfigObjectNode.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.operator.api.spec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/** */
+public class ConfigObjectNode extends ObjectNode {
+
+ public ConfigObjectNode() {
+ this(JsonNodeFactory.instance);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc, Map<String, JsonNode> kids) {
+ super(nc, kids);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc) {
+ super(nc);
+ }
+
+ public void removeAll(String... names) {
+ for (String name : names) {
+ remove(name);
+ }
+ }
+
+ public void putAllFrom(Map<String, String> value) {
+ value.forEach(this::put);
+ }
+
+ public void set(Map<String, String> value) {
+ removeAll();
+ putAllFrom(value);
+ }
+
+ public Map<String, String> asFlatMap() {
Review Comment:
will do thx!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2286985235
##########
flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/spec/ConfigObjectNode.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.operator.api.spec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/** */
+public class ConfigObjectNode extends ObjectNode {
+
+ public ConfigObjectNode() {
+ this(JsonNodeFactory.instance);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc, Map<String, JsonNode> kids) {
+ super(nc, kids);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc) {
+ super(nc);
+ }
+
+ public void removeAll(String... names) {
+ for (String name : names) {
+ remove(name);
+ }
+ }
+
+ public void putAllFrom(Map<String, String> value) {
+ value.forEach(this::put);
+ }
+
+ public void set(Map<String, String> value) {
+ removeAll();
Review Comment:
This looks a bit confusing, we probably shouldn't introduce a varargs variant of the same method that does something completely different :)
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/autoscaler/KubernetesScalingRealizer.java:
##########
@@ -63,15 +62,16 @@ public void realizeConfigOverrides(
}
FlinkDeployment flinkDeployment = ((FlinkDeployment) context.getResource());
// Apply config overrides
- Map<String, String> flinkConf = flinkDeployment.getSpec().getFlinkConfiguration();
- for (String keyToRemove : configChanges.getRemovals()) {
- flinkConf.remove(keyToRemove);
- }
- flinkConf.putAll(configChanges.getOverrides());
+
+ flinkDeployment.getSpec().getFlinkConfiguration().remove(configChanges.getRemovals());
Review Comment:
Should this be removeAll? Seems like we are removing a single key here which will do nothing
##########
flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/spec/ConfigObjectNode.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.operator.api.spec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/** */
+public class ConfigObjectNode extends ObjectNode {
+
+ public ConfigObjectNode() {
+ this(JsonNodeFactory.instance);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc, Map<String, JsonNode> kids) {
+ super(nc, kids);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc) {
+ super(nc);
+ }
+
+ public void removeAll(String... names) {
+ for (String name : names) {
+ remove(name);
+ }
+ }
+
+ public void putAllFrom(Map<String, String> value) {
Review Comment:
Should we call it simply putAll?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2290342848
##########
flink-kubernetes-operator-api/pom.xml:
##########
@@ -126,6 +126,13 @@ under the License.
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
Review Comment:
This dependency is now added twice if I see correctly
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [WIP][FLINK-37406] Add support for structured YAML config in FlinkDeployment CRD [flink-kubernetes-operator]
Posted by "csviri (via GitHub)" <gi...@apache.org>.
csviri commented on code in PR #1013:
URL: https://github.com/apache/flink-kubernetes-operator/pull/1013#discussion_r2287748241
##########
flink-kubernetes-operator-api/src/main/java/org/apache/flink/kubernetes/operator/api/spec/ConfigObjectNode.java:
##########
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.kubernetes.operator.api.spec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/** */
+public class ConfigObjectNode extends ObjectNode {
+
+ public ConfigObjectNode() {
+ this(JsonNodeFactory.instance);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc, Map<String, JsonNode> kids) {
+ super(nc, kids);
+ }
+
+ public ConfigObjectNode(JsonNodeFactory nc) {
+ super(nc);
+ }
+
+ public void removeAll(String... names) {
+ for (String name : names) {
+ remove(name);
+ }
+ }
+
+ public void putAllFrom(Map<String, String> value) {
+ value.forEach(this::put);
+ }
+
+ public void set(Map<String, String> value) {
+ removeAll();
+ putAllFrom(value);
+ }
+
+ public Map<String, String> asFlatMap() {
Review Comment:
added
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org