Skip to content

Commit 015448e

Browse files
committed
docs
Signed-off-by: Attila Mészáros <[email protected]>
1 parent a9292ed commit 015448e

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
This sample demonstrates the workaround for problem when a namespace
2+
is being deleted with a running controller, that watches resources
3+
in its own namespace. If the pod or other underlying resources (role,
4+
role binding, service account) are deleted before the cleanup of
5+
the custom resource the namespace deletion is stuck.
6+
7+
see also: https://github.com/operator-framework/java-operator-sdk/pull/2528
8+

Diff for: sample-operators/controller-namespace-deletion/src/test/java/io/javaoperatorsdk/operator/sample/ControllerNamespaceDeletionE2E.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import org.junit.jupiter.api.BeforeEach;
1212
import org.junit.jupiter.api.Test;
13+
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
1314
import org.slf4j.Logger;
1415
import org.slf4j.LoggerFactory;
1516

@@ -39,7 +40,7 @@ class ControllerNamespaceDeletionE2E {
3940
KubernetesClient client;
4041

4142
// not for local mode by design
42-
// @EnabledIfSystemProperty(named = "test.deployment", matches = "remote")
43+
@EnabledIfSystemProperty(named = "test.deployment", matches = "remote")
4344
@Test
4445
void customResourceCleanedUpOnNamespaceDeletion() {
4546
deployController();
@@ -60,7 +61,7 @@ void customResourceCleanedUpOnNamespaceDeletion() {
6061
assertThat(ns).isNull();
6162
});
6263

63-
log.info("Removing finalizers from role and role bing");
64+
log.info("Removing finalizers from role and role bing and service account");
6465
removeRoleAndRoleBindingFinalizers();
6566

6667
await().timeout(Duration.ofSeconds(20)).untilAsserted(() -> {

0 commit comments

Comments
 (0)