Skip to content

Commit

Permalink
Merge pull request #35 from fabiobrz/enable-kafka-operator-provisione…
Browse files Browse the repository at this point in the history
…r-test

[issue 21] - Enable kafka operator provisioner test
  • Loading branch information
simkam authored Apr 27, 2023
2 parents 2dc1d5b + 607c158 commit 4bd87e6
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .ci/openshift-ci/build-root/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ intersmash.wildfly.operators.catalog_source=community-operators-wildfly-operator
intersmash.wildfly.operators.index_image=quay.io/operatorhubio/catalog:latest
intersmash.wildfly.operators.package_manifest=wildfly
intersmash.wildfly.operators.channel=alpha
# Kafka community operator settings
intersmash.kafka.operators.channel=strimzi-0.29.x
EOL

cat test.properties
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,12 @@ a given service on cloud environments via APIs that leverage the
Intersmash makes this feature available for currently supported products (see the table below), but that can be
extended easily, since Intersmash _provisioners_ are pluggable components.

| Product | Supported Operator version | Channel name | Supported product version | Repository | Notes |
|:-----------|:---------------------------|:-------------|:--------------------------|:--------------------------------------------------|:--------------------------------------------------------|
| Infinispan | 2.3.1 | 2.3.x | 14.0.6.Final | https://github.com/infinispan/infinispan-operator | |
| WildFly | 0.5.6 | alpha | 27.0.1.Final | https://github.com/wildfly/wildfly-operator | As available on https://operatorhub.io/operator/wildfly |
| Product | Supported Operator version | Channel name | Supported product version | Repository | Notes |
|:--------------------------|:---------------------------|:---------------|:--------------------------|:--------------------------------------------------|:------------------------------------------------------------------------------------|
| Hyperfoil | 0.21.0 | alpha | 0.23 | https://github.com/Hyperfoil/hyperfoil-operator | |
| Infinispan | 2.3.1 | 2.3.x | 14.0.6.Final | https://github.com/infinispan/infinispan-operator | |
| WildFly | 0.5.6 | alpha | 27.0.1.Final | https://github.com/wildfly/wildfly-operator | As available on https://operatorhub.io/operator/wildfly |
| Kafka provided by Strimzi | 0.29.0 | strimzi-0.29.x | 3.2.0 | https://github.com/strimzi/strimzi-kafka-operator | Latest Kafka provided by Strimzi Operator version seems to require some adjustments |


Intersmash operator-based provisioners implement a common contract and high level behavior which is defined by the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import cz.xtf.core.openshift.OpenShifts;
Expand All @@ -38,7 +37,6 @@
*/
@Slf4j
@CleanBeforeAll
@Disabled("WIP - Disabled until global-test.properties is configured with the required property")
public class KafkaOperatorProvisionerTest {
private static KafkaOperatorApplication application = OpenShiftProvisionerTestBase.getKafkaApplication();
private static final KafkaOperatorProvisioner operatorProvisioner = initializeOperatorProvisioner();
Expand Down Expand Up @@ -85,8 +83,8 @@ public void customResourcesCleanup() {
*/
@Test
public void basicProvisioningTest() {
operatorProvisioner.deploy();
try {
operatorProvisioner.deploy();
verifyDeployed();

int scaledNum = operatorProvisioner.getApplication().getKafka().getSpec().getKafka().getReplicas() + 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ public String getDbName() {
*/
public static KafkaOperatorApplication getKafkaApplication() {
return new KafkaOperatorApplication() {
static final String NAME = "amq-streams-test";
static final String NAME = "kafka-test";
private static final String KAFKA_VERSION = KafkaOperatorApplication.KAFKA_VERSION;
private static final String INTER_BROKER_PROTOCOL_VERSION = KafkaOperatorApplication.INTER_BROKER_PROTOCOL_VERSION;
private static final int KAFKA_INSTANCE_NUM = KafkaOperatorApplication.KAFKA_INSTANCE_NUM;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class IntersmashConfig {
private static final String KAFKA_OPERATOR_INDEX_IMAGE = "intersmash.kafka.operators.index_image";
private static final String KAFKA_OPERATOR_CHANNEL = "intersmash.kafka.operators.channel";
private static final String KAFKA_OPERATOR_PACKAGE_MANIFEST = "intersmash.kafka.operators.package_manifest";
private static final String COMMUNITY_KAFKA_OPERATOR_PACKAGE_MANIFEST = "kafka";
private static final String COMMUNITY_KAFKA_OPERATOR_PACKAGE_MANIFEST = "strimzi-kafka-operator";
private static final String PRODUCT_KAFKA_OPERATOR_PACKAGE_MANIFEST = "amq-streams";
private static final String DEFAULT_KAFKA_OPERATOR_PACKAGE_MANIFEST = COMMUNITY_KAFKA_OPERATOR_PACKAGE_MANIFEST;
private static final String ACTIVEMQ_OPERATOR_CATALOG_SOURCE_NAME = "intersmash.activemq.operators.catalog_source";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
public interface KafkaOperatorApplication extends OperatorApplication {

String KAFKA_VERSION = "3.2.3";
String KAFKA_VERSION = "3.2.0";
String INTER_BROKER_PROTOCOL_VERSION = "3.2";
int KAFKA_INSTANCE_NUM = 3;
int TOPIC_RECONCILIATION_INTERVAL_SECONDS = 90;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public List<Pod> getPods() {
}

public List<Pod> getClusterOperatorPods() {
return OpenShiftProvisioner.openShift.getLabeledPods("name", OPERATOR_ID + "-cluster-operator");
return OpenShiftProvisioner.openShift.getLabeledPods("strimzi.io/kind", "cluster-operator");
}

/**
Expand Down

0 comments on commit 4bd87e6

Please sign in to comment.