From a3ee6e98d796d1a2f9d8266b0c3b7c8e29f0685d Mon Sep 17 00:00:00 2001 From: "10000ki6472@gmial.com" Date: Wed, 26 Jun 2024 14:24:36 +0900 Subject: [PATCH] Apply the CRD using the SSA method in LocallyRunOperationExtension Signed-off-by: 10000ki6472@gmial.com --- .../operator/junit/LocallyRunOperatorExtension.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/LocallyRunOperatorExtension.java b/operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/LocallyRunOperatorExtension.java index 61916f14bc..a95847905f 100644 --- a/operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/LocallyRunOperatorExtension.java +++ b/operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/LocallyRunOperatorExtension.java @@ -182,7 +182,7 @@ public static void applyCrd(String resourceTypeName, KubernetesClient client) { var crdString = new String(is.readAllBytes(), StandardCharsets.UTF_8); LOGGER.debug("Applying CRD: {}", crdString); final var crd = client.load(new ByteArrayInputStream(crdString.getBytes())); - crd.createOrReplace(); + crd.serverSideApply(); Thread.sleep(CRD_READY_WAIT); // readiness is not applicable for CRD, just wait a little LOGGER.debug("Applied CRD with path: {}", path); } catch (InterruptedException ex) {