Skip to content

Commit

Permalink
Run AZP in KRaft mode and create ZK regression pipeline (#10532)
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Kral <[email protected]>
  • Loading branch information
im-konge authored Sep 6, 2024
1 parent e548ae7 commit 8243ea4
Show file tree
Hide file tree
Showing 11 changed files with 117 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ jobs:
profile: 'azp_kafka_oauth'
cluster_operator_install_type: 'bundle'
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'
Expand All @@ -18,7 +17,6 @@ jobs:
profile: 'azp_security'
cluster_operator_install_type: 'bundle'
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'
Expand All @@ -30,7 +28,6 @@ jobs:
profile: 'azp_dynconfig_listeners_tracing_watcher'
cluster_operator_install_type: 'bundle'
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'
Expand All @@ -42,7 +39,6 @@ jobs:
profile: 'azp_operators'
cluster_operator_install_type: 'bundle'
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'
Expand All @@ -54,7 +50,6 @@ jobs:
profile: 'azp_rolling_update_bridge'
cluster_operator_install_type: 'bundle'
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'
Expand All @@ -66,7 +61,6 @@ jobs:
profile: 'azp_connect_mirrormaker'
cluster_operator_install_type: 'bundle'
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'
Expand All @@ -78,7 +72,6 @@ jobs:
profile: 'azp_remaining'
cluster_operator_install_type: 'bundle'
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
timeout: 360
strimzi_rbac_scope: NAMESPACE
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

Expand All @@ -23,7 +22,6 @@ jobs:
timeout: 360
strimzi_rbac_scope: NAMESPACE
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

Expand All @@ -37,7 +35,6 @@ jobs:
timeout: 360
strimzi_rbac_scope: NAMESPACE
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

Expand All @@ -51,7 +48,6 @@ jobs:
timeout: 360
strimzi_rbac_scope: NAMESPACE
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

Expand All @@ -65,7 +61,6 @@ jobs:
timeout: 360
strimzi_rbac_scope: NAMESPACE
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

Expand All @@ -79,7 +74,6 @@ jobs:
timeout: 360
strimzi_rbac_scope: NAMESPACE
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

Expand All @@ -93,6 +87,5 @@ jobs:
timeout: 360
strimzi_rbac_scope: NAMESPACE
strimzi_feature_gates: '-ContinueReconciliationOnManualRollingUpdateFailure'
strimzi_use_node_pools_in_tests: "false"
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'
84 changes: 84 additions & 0 deletions .azure/templates/jobs/system-tests/zookeeper_regression_jobs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
jobs:
- template: '../../steps/system_test_general.yaml'
parameters:
name: 'zookeeper_regression_kafka_oauth'
display_name: 'zookeeper-regression-bundle I. - kafka + oauth'
profile: 'azp_kafka_oauth'
cluster_operator_install_type: 'bundle'
strimzi_use_node_pools_in_tests: "false"
strimzi_use_kraft_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

- template: '../../steps/system_test_general.yaml'
parameters:
name: 'zookeeper_regression_security'
display_name: 'zookeeper-regression-bundle II. - security'
profile: 'azp_security'
cluster_operator_install_type: 'bundle'
strimzi_use_node_pools_in_tests: "false"
strimzi_use_kraft_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

- template: '../../steps/system_test_general.yaml'
parameters:
name: 'zookeeper_regression_dynconfig_listeners_tracing_watcher'
display_name: 'zookeeper-regression-bundle III. - dynconfig + tracing + watcher'
profile: 'azp_dynconfig_listeners_tracing_watcher'
cluster_operator_install_type: 'bundle'
strimzi_use_node_pools_in_tests: "false"
strimzi_use_kraft_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

- template: '../../steps/system_test_general.yaml'
parameters:
name: 'zookeeper_regression_operators'
display_name: 'zookeeper-regression-bundle IV. - operators'
profile: 'azp_operators'
cluster_operator_install_type: 'bundle'
strimzi_use_node_pools_in_tests: "false"
strimzi_use_kraft_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

- template: '../../steps/system_test_general.yaml'
parameters:
name: 'zookeeper_regression_rollingupdate_bridge'
display_name: 'zookeeper-regression-bundle V. - rollingupdate'
profile: 'azp_rolling_update_bridge'
cluster_operator_install_type: 'bundle'
strimzi_use_node_pools_in_tests: "false"
strimzi_use_kraft_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

- template: '../../steps/system_test_general.yaml'
parameters:
name: 'zookeeper_regression_connect_mirrormaker'
display_name: 'zookeeper-regression-bundle VI. - connect + mirrormaker'
profile: 'azp_connect_mirrormaker'
cluster_operator_install_type: 'bundle'
strimzi_use_node_pools_in_tests: "false"
strimzi_use_kraft_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'

- template: '../../steps/system_test_general.yaml'
parameters:
name: 'zookeeper_regression_all_remaining'
display_name: 'zookeeper-regression-bundle VII. - remaining system tests'
profile: 'azp_remaining'
cluster_operator_install_type: 'bundle'
strimzi_use_node_pools_in_tests: "false"
strimzi_use_kraft_in_tests: "false"
timeout: 360
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'
2 changes: 1 addition & 1 deletion .azure/templates/steps/system_test_general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ parameters:
parallel: '1'
run_parallel: false
releaseVersion: "latest"
strimzi_use_kraft_in_tests: "false"
strimzi_use_kraft_in_tests: "true"
strimzi_use_node_pools_in_tests: "true"

jobs:
Expand Down
28 changes: 28 additions & 0 deletions .azure/zookeeper-regression-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Triggers
# This pipeline will be triggered manually for a release or by github comment
trigger: none
pr:
autoCancel: false
branches:
include:
- '*'

parameters:
- name: releaseVersion
displayName: Release Version
type: string
# If releaseVersion == latest then images will be built as part of the pipeline
default: "latest"
- name: kafkaVersion
displayName: Kafka Version
type: string
# If kafkaVersion == latest, the latest supported version of Kafka is used
default: "latest"

# Regression tests are split into 6 jobs because of timeout set to 360 minutes for each job
jobs:
- template: 'templates/jobs/system-tests/zookeeper_regression_jobs.yaml'
# This is needed to propagate releaseVersion parameter down to system_test_general.yaml
parameters:
releaseVersion: '${{ parameters.releaseVersion }}'
kafkaVersion: '${{ parameters.kafkaVersion }}'
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public class Environment {
public static final boolean SKIP_TEARDOWN = getOrDefault(SKIP_TEARDOWN_ENV, Boolean::parseBoolean, false);
public static final String STRIMZI_RBAC_SCOPE = getOrDefault(STRIMZI_RBAC_SCOPE_ENV, STRIMZI_RBAC_SCOPE_DEFAULT);
public static final String STRIMZI_FEATURE_GATES = getOrDefault(STRIMZI_FEATURE_GATES_ENV, STRIMZI_FEATURE_GATES_DEFAULT);
public static final boolean STRIMZI_USE_KRAFT_IN_TESTS = getOrDefault(STRIMZI_USE_KRAFT_IN_TESTS_ENV, Boolean::parseBoolean, false);
public static final boolean STRIMZI_USE_KRAFT_IN_TESTS = getOrDefault(STRIMZI_USE_KRAFT_IN_TESTS_ENV, Boolean::parseBoolean, true);
public static final boolean STRIMZI_USE_NODE_POOLS_IN_TESTS = getOrDefault(STRIMZI_USE_NODE_POOLS_IN_TESTS_ENV, Boolean::parseBoolean, true);
public static final NodePoolsRoleMode STRIMZI_NODE_POOLS_ROLE_MODE = getOrDefault(STRIMZI_NODE_POOLS_ROLE_MODE_ENV, value -> NodePoolsRoleMode.valueOf(value.toUpperCase(Locale.ENGLISH)), NodePoolsRoleMode.SEPARATE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ protected void deployKafkaClusterWithWaitForReadiness(final String componentsNam
// Deploy a Kafka cluster
if (upgradeData.getFromExamples().equals("HEAD")) {
resourceManager.createResourceWithWait(KafkaNodePoolTemplates.brokerPoolPersistentStorage(componentsNamespaceName, poolName, clusterName, 3).build());
resourceManager.createResourceWithWait(KafkaTemplates.kafkaPersistent(componentsNamespaceName, clusterName, 3, 3)
resourceManager.createResourceWithWait(KafkaTemplates.kafkaPersistentNodePools(componentsNamespaceName, clusterName, 3, 3)
.editSpec()
.editKafka()
.withVersion(upgradeKafkaVersion.getVersion())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import io.strimzi.api.kafka.model.kafka.KafkaBuilder;
import io.strimzi.api.kafka.model.kafka.KafkaResources;
import io.strimzi.systemtest.annotations.IsolatedTest;
import io.strimzi.systemtest.annotations.KRaftNotSupported;
import io.strimzi.systemtest.kafkaclients.internalClients.KafkaClients;
import io.strimzi.systemtest.resources.ResourceManager;
import io.strimzi.systemtest.resources.crd.KafkaResource;
Expand Down Expand Up @@ -42,7 +41,6 @@
* Metadata for upgrade/downgrade procedure are loaded from kafka-versions.yaml in root dir of this repository.
*/
@Tag(UPGRADE)
@KRaftNotSupported("Strimzi and Kafka downgrade is not supported with KRaft mode")
public class KafkaUpgradeDowngradeST extends AbstractUpgradeST {

private static final Logger LOGGER = LogManager.getLogger(KafkaUpgradeDowngradeST.class);
Expand Down Expand Up @@ -168,7 +166,7 @@ void runVersionChange(TestStorage testStorage, TestKafkaVersion initialVersion,

if (KafkaResource.kafkaClient().inNamespace(testStorage.getNamespaceName()).withName(clusterName).get() == null) {
LOGGER.info("Deploying initial Kafka version {} with logMessageFormat={} and interBrokerProtocol={}", initialVersion.version(), initLogMsgFormat, initInterBrokerProtocol);
KafkaBuilder kafka = KafkaTemplates.kafkaPersistent(testStorage.getNamespaceName(), clusterName, kafkaReplicas, zkReplicas)
KafkaBuilder kafka = KafkaTemplates.kafkaPersistentNodePools(testStorage.getNamespaceName(), clusterName, kafkaReplicas, zkReplicas)
.editSpec()
.editKafka()
.withVersion(initialVersion.version())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import io.strimzi.api.kafka.model.topic.KafkaTopicBuilder;
import io.strimzi.systemtest.Environment;
import io.strimzi.systemtest.annotations.IsolatedTest;
import io.strimzi.systemtest.annotations.KRaftNotSupported;
import io.strimzi.systemtest.kafkaclients.internalClients.KafkaClients;
import io.strimzi.systemtest.kafkaclients.internalClients.KafkaClientsBuilder;
import io.strimzi.systemtest.resources.ResourceManager;
Expand Down Expand Up @@ -49,11 +48,11 @@
* Tests in this class use OLM for install cluster operator.
*/
@Tag(OLM_UPGRADE)
@KRaftNotSupported("Strimzi and Kafka downgrade is not supported with KRaft mode")
public class OlmUpgradeST extends AbstractUpgradeST {

private static final Logger LOGGER = LogManager.getLogger(OlmUpgradeST.class);
private final OlmVersionModificationData olmUpgradeData = new VersionModificationDataLoader(ModificationType.OLM_UPGRADE).getOlmUpgradeData();

@IsolatedTest
void testStrimziUpgrade() throws IOException {
final TestStorage testStorage = new TestStorage(ResourceManager.getTestContext(), CO_NAMESPACE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package io.strimzi.systemtest.upgrade.regular;

import io.strimzi.systemtest.annotations.IsolatedTest;
import io.strimzi.systemtest.annotations.KRaftNotSupported;
import io.strimzi.systemtest.annotations.KindIPv6NotSupported;
import io.strimzi.systemtest.annotations.MicroShiftNotSupported;
import io.strimzi.systemtest.resources.NamespaceManager;
Expand Down Expand Up @@ -39,7 +38,6 @@
* Kafka upgrade is done as part of those tests as well, but the tests for Kafka upgrade/downgrade are in {@link KafkaUpgradeDowngradeST}.
*/
@Tag(UPGRADE)
@KRaftNotSupported("Strimzi and Kafka downgrade is not supported with KRaft mode")
public class StrimziDowngradeST extends AbstractUpgradeST {

private static final Logger LOGGER = LogManager.getLogger(StrimziDowngradeST.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import io.strimzi.api.kafka.model.kafka.KafkaResources;
import io.strimzi.systemtest.annotations.IsolatedTest;
import io.strimzi.systemtest.annotations.KRaftNotSupported;
import io.strimzi.systemtest.annotations.KindIPv6NotSupported;
import io.strimzi.systemtest.annotations.MicroShiftNotSupported;
import io.strimzi.systemtest.resources.NamespaceManager;
Expand Down Expand Up @@ -47,7 +46,6 @@
* Kafka upgrade is done as part of those tests as well, but the tests for Kafka upgrade/downgrade are in {@link KafkaUpgradeDowngradeST}.
*/
@Tag(UPGRADE)
@KRaftNotSupported("Strimzi and Kafka upgrade is not supported with KRaft mode")
public class StrimziUpgradeST extends AbstractUpgradeST {

private static final Logger LOGGER = LogManager.getLogger(StrimziUpgradeST.class);
Expand Down

0 comments on commit 8243ea4

Please sign in to comment.