Use consistent method names.

This commit is contained in:
Michael Lipp 2025-01-25 13:39:22 +01:00
parent 5d722abd2e
commit 2a70c74234
3 changed files with 12 additions and 12 deletions

View file

@ -86,14 +86,14 @@ import org.yaml.snakeyaml.constructor.SafeConstructor;
// Maybe override logging.properties from reconciler configuration.
DataPath.<String> get(model, "reconciler", "loggingProperties")
.ifPresent(props -> {
GsonPtr.to(mapDef.getRaw()).get(JsonObject.class, "data")
GsonPtr.to(mapDef.getRaw()).getAs(JsonObject.class, "data")
.get().addProperty("logging.properties", props);
});
// Maybe override logging.properties from VM definition.
DataPath.<String> get(model, "cr", "spec", "loggingProperties")
.ifPresent(props -> {
GsonPtr.to(mapDef.getRaw()).get(JsonObject.class, "data")
GsonPtr.to(mapDef.getRaw()).getAs(JsonObject.class, "data")
.get().addProperty("logging.properties", props);
});

View file

@ -204,7 +204,7 @@ import org.yaml.snakeyaml.constructor.SafeConstructor;
// If bound, use json merge, omitting immutable fields
var spec = GsonPtr.to(pvcDef.getRaw()).to("spec");
spec.removeExcept("volumeAttributesClassName", "resources");
spec.access("resources").ifPresent(p -> p.removeExcept("requests"));
spec.get("resources").ifPresent(p -> p.removeExcept("requests"));
PatchOptions opts = new PatchOptions();
opts.setFieldManager("kubernetes-java-kubectl-apply");
if (pvcStub.patch(V1Patch.PATCH_FORMAT_JSON_MERGE_PATCH,