diff --git a/modules/kafka/kafka.go b/modules/kafka/kafka.go index ebbb6b987d..73161c3f71 100644 --- a/modules/kafka/kafka.go +++ b/modules/kafka/kafka.go @@ -219,6 +219,11 @@ func validateKRaftVersion(fqName string) error { version = "v" + version } + // remove the architecture suffix + if strings.HasSuffix(version, ".amd64") || strings.HasSuffix(version, ".arm64") { + version = version[:strings.LastIndex(version, ".")] + } + if semver.Compare(version, "v7.4.0") < 0 { // version < v7.4.0 return fmt.Errorf("version=%s. KRaft mode is only available since version 7.4.0", version) } diff --git a/modules/kafka/kafka_helpers_test.go b/modules/kafka/kafka_helpers_test.go index 5bfff2352f..98cb7e13f3 100644 --- a/modules/kafka/kafka_helpers_test.go +++ b/modules/kafka/kafka_helpers_test.go @@ -94,6 +94,15 @@ func TestValidateKRaftVersion(t *testing.T) { image: "my-kafka:1.0.0", wantErr: false, }, + { + name: "Official: valid, with the amd64 architecture suffix", + image: "confluentinc/confluent-local:7.5.9.amd64", + wantErr: false, + }, + { + name: "Official: valid, with the arm64 architecture suffix", + image: "confluentinc/confluent-local:7.5.9.arm64", + }, { name: "lacks tag", image: "my-kafka",