8000 #9730 Clustering support by jonathanvila · Pull Request #10249 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

#9730 Clustering support - #10249

Closed
jonathanvila wants to merge 11 commits into
keycloak:mainfrom
jonathanvila:9730-clustering-support
Closed

jonathanvila wants to merge 11 commits into
keycloak:mainfrom
jonathanvila:9730-clustering-support

Conversation

@jonathanvila
Copy link
Copy Markdown
Contributor

Closes #9730

Jonathan Vila added 10 commits February 16, 2022 10:41
Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
Closes #9730

Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
Closes #9730

Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
Closes #9730

Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
Closes #9730

Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
Closes #9730

Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
Closes #9730

Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
Closes #9730

Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
Closes #9730

Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
Closes #9730

Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
@vmuzikar vmuzikar left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jonathanvila, nice work.

Comment on lines +83 to +84
new KeycloakService(client, kc).createOrUpdateReconciled();
new KeycloakDiscoveryService(client, kc).createOrUpdateReconciled();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably reflect this in the CR's status. I'd probably call addNotReadyMessage if a service is not found, similarly to:

public void updateStatus(KeycloakStatusBuilder status) {
if (existingDeployment == null) {
status.addNotReadyMessage("No existing Deployment found, waiting for creating a new one");
return;
}

import io.quarkus.test.junit.QuarkusTest;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Disabled;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is an unnecessary change.

.inNamespace(namespace)
.list().getItems().get(0);

// when scale it to 10
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also test that KC CR is has not ready status when scaling up.

Comment on lines +58 to +74
Service nodeportTestService = new ServiceBuilder(service).build();
nodeportTestService.getMetadata().setName(keycloak.getMetadata().getName()+ "-servicenodeport");
nodeportTestService.getSpec().getPorts().get(0).setNodePort(31999);
nodeportTestService.getSpec().setType("NodePort");
nodeportTestService.getSpec().setClusterIP(null);
nodeportTestService.getSpec().setClusterIPs(null);
k8sclient.services().inNamespace(namespace).createOrReplace(nodeportTestService);

// check we can reach Keycloak
URI uri = new URI(k8sclient.getConfiguration()
.getMasterUrl()
.replace("8443", "31999")
.replace("https", "http") + "realms/master")
;
Awaitility.await()
.atMost(10, TimeUnit.SECONDS)
.until(() -> given().when().relaxedHTTPSValidation().get(uri).then().extract().statusCode() == 200);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can’t we use similar approach as here? That test should also be updated not to explicitlty create a service.

8000
Closes #9730

Signed-off-by: Jonathan Vila <jvilalop@redhat.com>
@vmuzikar
Copy link
Copy Markdown
Contributor

Replaced by #10387

@vmuzikar vmuzikar closed this Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clustering support in operator

2 participants

0