Search in sources :

Example 1 with StrimziOperatorManager

use of org.bf2.systemtest.operator.StrimziOperatorManager in project kas-fleetshard by bf2fc6cc711aee1a0c2a.

the class UpgradeST method deploy.

@BeforeAll
void deploy() throws Exception {
    strimziOperatorManagerOld = new StrimziOperatorManager(StrimziOperatorManager.getPreviousUpstreamStrimziVersion(SystemTestEnvironment.STRIMZI_VERSION));
    strimziOperatorManagerNew = new StrimziOperatorManager(SystemTestEnvironment.STRIMZI_VERSION);
    CompletableFuture.allOf(KeycloakOperatorManager.installKeycloak(kube), strimziOperatorManagerNew.installStrimzi(kube), strimziOperatorManagerOld.installStrimzi(kube), FleetShardOperatorManager.deployFleetShardOperator(kube), FleetShardOperatorManager.deployFleetShardSync(kube)).join();
    keycloak = SystemTestEnvironment.INSTALL_KEYCLOAK ? new KeycloakInstance(KeycloakOperatorManager.OPERATOR_NS) : null;
    syncEndpoint = FleetShardOperatorManager.createEndpoint(kube);
    latestStrimziVersion = SyncApiClient.getLatestStrimziVersion(syncEndpoint);
    LOGGER.info("Endpoint address {}", syncEndpoint);
}
Also used : KeycloakInstance(org.bf2.systemtest.framework.KeycloakInstance) StrimziOperatorManager(org.bf2.systemtest.operator.StrimziOperatorManager) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 2 with StrimziOperatorManager

use of org.bf2.systemtest.operator.StrimziOperatorManager in project kas-fleetshard by bf2fc6cc711aee1a0c2a.

the class OperatorST method deploy.

@BeforeAll
void deploy() throws Exception {
    strimziOperatorManager = new OlmBasedStrimziOperatorManager(kube, StrimziOperatorManager.OPERATOR_NS);
    CompletableFuture.allOf(strimziOperatorManager.deployStrimziOperator(), FleetShardOperatorManager.deployFleetShardOperator(kube)).join();
    // since sync is not installed, manually create the agent resource
    var agentResource = kube.client().resource(new ManagedKafkaAgentBuilder().withNewMetadata().withName(ManagedKafkaAgentResourceClient.RESOURCE_NAME).withNamespace(FleetShardOperatorManager.OPERATOR_NS).endMetadata().withSpec(new ManagedKafkaAgentSpecBuilder().withNewObservability().withAccessToken("").withChannel("").withRepository("").withTag("").endObservability().build()).build());
    agentResource.createOrReplace();
    // the operator will update the status after a while
    strimziVersions = SyncApiClient.getSortedAvailableStrimziVersions(() -> agentResource.fromServer().get().getStatus()).collect(Collectors.toList());
    assertTrue(strimziVersions.size() > 1);
    latestStrimziVersion = strimziVersions.get(strimziVersions.size() - 1);
    latestKafkaVersion = SyncApiClient.getLatestAvailableKafkaVersion(() -> agentResource.fromServer().get().getStatus(), latestStrimziVersion);
}
Also used : ManagedKafkaAgentSpecBuilder(org.bf2.operator.resources.v1alpha1.ManagedKafkaAgentSpecBuilder) ManagedKafkaAgentBuilder(org.bf2.operator.resources.v1alpha1.ManagedKafkaAgentBuilder) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

BeforeAll (org.junit.jupiter.api.BeforeAll)2 ManagedKafkaAgentBuilder (org.bf2.operator.resources.v1alpha1.ManagedKafkaAgentBuilder)1 ManagedKafkaAgentSpecBuilder (org.bf2.operator.resources.v1alpha1.ManagedKafkaAgentSpecBuilder)1 KeycloakInstance (org.bf2.systemtest.framework.KeycloakInstance)1 StrimziOperatorManager (org.bf2.systemtest.operator.StrimziOperatorManager)1