Enable publishNotReadyAddresses for discovery service (#21511)

Closes #21493
This commit is contained in:
Pedro Ruivo 2023-07-10 16:02:55 +01:00 committed by GitHub
parent a25df4afea
commit 165c36f9ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -45,6 +45,7 @@ public class KeycloakDiscoveryService extends OperatorManagedResource implements
.endPort()
.withSelector(getInstanceLabels())
.withClusterIP("None")
.withPublishNotReadyAddresses(Boolean.TRUE)
.build();
}

View file

@ -100,6 +100,8 @@ public class KeycloakServicesTest extends BaseOperatorTest {
Log.info("Trying to modify the service");
var currentDiscoveryService = discoveryServiceSelector.get();
// check publishNotReadyAddresses is set
assertThat(currentDiscoveryService.getSpec().getPublishNotReadyAddresses()).isTrue();
var labels = Map.of("address", "EvergreenTerrace742");
// ignoring current IP/s
currentDiscoveryService.getSpec().setClusterIP(null);