Skip to content

Commit 8f77f68

Browse files
Apply the CRD using the SSA method in LocallyRunOperationExtension (#2458)
Signed-off-by: [email protected] <[email protected]> Co-authored-by: [email protected] <[email protected]>
1 parent dcc3283 commit 8f77f68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/LocallyRunOperatorExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public static void applyCrd(String resourceTypeName, KubernetesClient client) {
182182
var crdString = new String(is.readAllBytes(), StandardCharsets.UTF_8);
183183
LOGGER.debug("Applying CRD: {}", crdString);
184184
final var crd = client.load(new ByteArrayInputStream(crdString.getBytes()));
185-
crd.createOrReplace();
185+
crd.serverSideApply();
186186
Thread.sleep(CRD_READY_WAIT); // readiness is not applicable for CRD, just wait a little
187187
LOGGER.debug("Applied CRD with path: {}", path);
188188
} catch (InterruptedException ex) {

0 commit comments

Comments
 (0)