diff --git a/.ci/openshift-ci/build-root/e2e-test-periodic.sh b/.ci/openshift-ci/build-root/e2e-test-periodic.sh index 0c8ebc5c..1376a739 100644 --- a/.ci/openshift-ci/build-root/e2e-test-periodic.sh +++ b/.ci/openshift-ci/build-root/e2e-test-periodic.sh @@ -115,6 +115,11 @@ mvn test -Dmaven.repo.local=./local-repo-prod -pl testsuite/integration-tests -P -Dintersmash.activemq.operators.package_manifest=amq-broker-rhel8 \ -Dintersmash.activemq.operators.channel=7.11.x \ -Dintersmash.activemq.operators.index_image='' \ + -Dintersmash.keycloak.image=registry.redhat.io/rhbk/keycloak-rhel9:latest \ + -Dintersmash.keycloak.operators.catalog_source=redhat-operators \ + -Dintersmash.keycloak.operators.channel=stable-v22 \ + -Dintersmash.keycloak.operators.package_manifest=rhbk-operator \ + -Dintersmash.keycloak.operators.index_image='' \ -Dintersmash.rhsso.image=registry.redhat.io/rh-sso-7/sso76-openshift-rhel8:latest \ -Dintersmash.rhsso.operators.catalog_source=redhat-operators \ -Dintersmash.rhsso.operators.package_manifest=rhsso-operator \ diff --git a/.ci/openshift-ci/build-root/e2e-test-prod.sh b/.ci/openshift-ci/build-root/e2e-test-prod.sh index 9464e053..ddf03b14 100644 --- a/.ci/openshift-ci/build-root/e2e-test-prod.sh +++ b/.ci/openshift-ci/build-root/e2e-test-prod.sh @@ -126,6 +126,11 @@ mvn test -Dmaven.repo.local=./local-repo-prod -pl testsuite/integration-tests -P -Dintersmash.activemq.operators.package_manifest=amq-broker-rhel8 \ -Dintersmash.activemq.operators.channel=7.11.x \ -Dintersmash.activemq.operators.index_image='' \ + -Dintersmash.keycloak.image=registry.redhat.io/rhbk/keycloak-rhel9:latest \ + -Dintersmash.keycloak.operators.catalog_source=redhat-operators \ + -Dintersmash.keycloak.operators.channel=stable-v22 \ + -Dintersmash.keycloak.operators.package_manifest=rhbk-operator \ + -Dintersmash.keycloak.operators.index_image='' \ -Dintersmash.rhsso.image=registry.redhat.io/rh-sso-7/sso76-openshift-rhel8:latest \ -Dintersmash.rhsso.operators.catalog_source=redhat-operators \ -Dintersmash.rhsso.operators.package_manifest=rhsso-operator \ diff --git a/provisioners/README.md b/provisioners/README.md index 2d5d14e1..bb8a0c9f 100644 --- a/provisioners/README.md +++ b/provisioners/README.md @@ -52,7 +52,7 @@ public class PostgresqlProvisionTest { | HyperFoil | :heavy_check_mark: | :x: | HyperfoilOperatorApplication | HyperfoilOperatorProvisioner | Operator based provisioner, see details [below](#operator-based-provisioning) | | Infinispan & Red Hat DataGrid | :heavy_check_mark: | :heavy_check_mark: | InfinispanOperatorApplication | InfinispanOperatorProvisioner | Operator based provisioner, see details [below](#operator-based-provisioning) | | Kafka & Red Hat AMQ Streams | :heavy_check_mark: | :heavy_check_mark: | KafkaOperatorApplication | KafkaOperatorProvisioner | Operator based provisioner, see details [below](#operator-based-provisioning) | -| Keycloak | :heavy_check_mark: | :x: | KeycloakOperatorApplication | KeycloakOperatorProvisioner | Based on the latest Quarkus based Keycloak Operator, doesn't provide stable CRDs yet (see https://www.keycloak.org/2022/09/operator-crs); this operator offers a solution which supports the `Keycloak` and `KeycloakRealmImport` Custom Resources: these are the only supported CRs at the time of writing. See details [below](#operator-based-provisioning) | +| Keycloak | :heavy_check_mark: | :heavy_check_mark: | KeycloakOperatorApplication | KeycloakOperatorProvisioner | Based on the latest Quarkus based Keycloak Operator, doesn't provide stable CRDs yet (see https://www.keycloak.org/2022/09/operator-crs); this operator offers a solution which supports the `Keycloak` and `KeycloakRealmImport` Custom Resources: these are the only supported CRs at the time of writing. See details [below](#operator-based-provisioning) | | MySQL | :heavy_check_mark: | :x: | MysqlImageOpenShiftApplication | MysqlImageOpenShiftProvisioner | Deploys a MySQL image and sets environment variables to configure the service (ports, credentials etc.) | | PostgreSQL | :heavy_check_mark: | :x: | PostgreSQLImageOpenShiftApplication | PostgreSQLImageOpenShiftProvisioner | Deploys a PostgreSQL image and sets environment variables to configure the service (ports, credentials etc.) | | Wildfly & Red Hat JBoss EAP XP | :heavy_check_mark: | :heavy_check_mark: | BootableJarOpenShiftApplication | WildflyBootableJarImageOpenShiftProvisioner | Deploys a WildFly Bootable JAR, i.e. a runnable WildFly application | diff --git a/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/KeycloakOperatorProvisionerTest.java b/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/KeycloakOperatorProvisionerTest.java index f3a54472..1a08399d 100644 --- a/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/KeycloakOperatorProvisionerTest.java +++ b/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/KeycloakOperatorProvisionerTest.java @@ -72,7 +72,6 @@ */ @Slf4j @CleanBeforeAll -@NotForProductizedExecutionProfile public class KeycloakOperatorProvisionerTest { private static KeycloakOperatorProvisioner KEYCLOAK_OPERATOR_PROVISIONER; diff --git a/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/OpenShiftProvisionerTestBase.java b/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/OpenShiftProvisionerTestBase.java index 0860dd54..74e66a6f 100644 --- a/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/OpenShiftProvisionerTestBase.java +++ b/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/OpenShiftProvisionerTestBase.java @@ -34,6 +34,7 @@ import org.jboss.intersmash.application.openshift.Eap7LegacyS2iBuildTemplateApplication; import org.jboss.intersmash.application.openshift.Eap7TemplateOpenShiftApplication; import org.jboss.intersmash.application.openshift.KafkaOperatorApplication; +import org.jboss.intersmash.application.openshift.KeycloakOperatorApplication; import org.jboss.intersmash.application.openshift.MysqlImageOpenShiftApplication; import org.jboss.intersmash.application.openshift.PostgreSQLImageOpenShiftApplication; import org.jboss.intersmash.application.openshift.PostgreSQLTemplateOpenShiftApplication; @@ -709,4 +710,28 @@ public String getPingServiceName() { } }; } + + static KeycloakOperatorApplication getKeycloakOperatorApplication() { + + final String DEFAULT_KEYCLOAK_APP_NAME = "example-sso"; + return new KeycloakOperatorApplication() { + @Override + public org.keycloak.k8s.v2alpha1.Keycloak getKeycloak() { + return new org.keycloak.k8s.v2alpha1.KeycloakBuilder() + .withNewMetadata() + .withName(DEFAULT_KEYCLOAK_APP_NAME) + .withLabels(Map.of("app", getName())) + .endMetadata() + .withNewSpec() + .withInstances(1L) + .endSpec() + .build(); + } + + @Override + public String getName() { + return DEFAULT_KEYCLOAK_APP_NAME; + } + }; + } } diff --git a/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/ProvisionerCleanupTestCase.java b/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/ProvisionerCleanupTestCase.java index fa9b91b4..324e219a 100644 --- a/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/ProvisionerCleanupTestCase.java +++ b/testsuite/integration-tests/src/test/java/org/jboss/intersmash/testsuite/provision/openshift/ProvisionerCleanupTestCase.java @@ -19,6 +19,7 @@ import org.jboss.intersmash.provision.openshift.Eap7ImageOpenShiftProvisioner; import org.jboss.intersmash.provision.openshift.Eap7LegacyS2iBuildTemplateProvisioner; +import org.jboss.intersmash.provision.openshift.KeycloakOperatorProvisioner; import org.jboss.intersmash.provision.openshift.MysqlImageOpenShiftProvisioner; import org.jboss.intersmash.provision.openshift.OpenShiftProvisioner; import org.jboss.intersmash.provision.openshift.PostgreSQLImageOpenShiftProvisioner; @@ -53,7 +54,10 @@ private static Stream provisionerProvider() { new PostgreSQLImageOpenShiftProvisioner( OpenShiftProvisionerTestBase.getPostgreSQLImageOpenShiftApplication()), new PostgreSQLTemplateOpenShiftProvisioner( - OpenShiftProvisionerTestBase.getPostgreSQLTemplateOpenShiftApplication())); + OpenShiftProvisionerTestBase.getPostgreSQLTemplateOpenShiftApplication()), + new KeycloakOperatorProvisioner( + OpenShiftProvisionerTestBase.getKeycloakOperatorApplication() + )); } else if (IntersmashTestsuiteProperties.isProductizedTestExecutionProfileEnabled()) { return Stream.of( // EAP latest GA @@ -61,8 +65,12 @@ private static Stream provisionerProvider() { OpenShiftProvisionerTestBase.getWildflyOpenShiftLocalBinaryTargetServerApplication()), // EAP 7 new Eap7ImageOpenShiftProvisioner(OpenShiftProvisionerTestBase.getEap7OpenShiftImageApplication()), - // RHSSO - new RhSsoTemplateOpenShiftProvisioner(OpenShiftProvisionerTestBase.getHttpsRhSso())); + // RHSSO 7.6.x + new RhSsoTemplateOpenShiftProvisioner(OpenShiftProvisionerTestBase.getHttpsRhSso()), + // RHBK + new KeycloakOperatorProvisioner( + OpenShiftProvisionerTestBase.getKeycloakOperatorApplication() + )); } else { throw new IllegalStateException( String.format("Unknown Intersmash test suite execution profile: %s",