This PR adds a task that validates that the kafka_version set is supported by the installed Strimzi operator.
It will store the `https://strimzi.io/downloads/ website content (which contains the mapping between operator version vs supported kafka versions) into a variable and parse it to a dict, then we can extract the supported kafka version list based upon the current installed csv.
Note: This only works for Strimzi as long as the above page remains in this html structure
Could not find the corresponding information for Red Hat AMQ Streams, but if we ever do, hopefully this can be reused.
This task will determine if the existing kafka_version is included in the kafka_supported_versions list, and if not, it will set kafka_version to the latest result from the kafka_supported_versions, that way we'll never get failures whenever there's a newer strimzi operator version supporting newer kafka versions.
Test example:
If kafka_version is initially set to 3.5.0, but operator only supports ['3.6.0', '3.6.1', '3.7.0'], then it will automatically set kafka_version: 3.7.0
TASK [ibm.mas_devops.kafka : Debug Kafka supported versions] *********************************************************************************************************
ok: [localhost] => {
"msg": [
"Supported kafka versions ................... ['3.6.0', '3.6.1', '3.7.0']",
"Current kafka version defined .............. 3.5.0"
]
}
TASK [ibm.mas_devops.kafka : Set latest supported kafka version if current kafka version is unsupported] *************************************************************
ok: [localhost]
TASK [ibm.mas_devops.kafka : Kafka version defined] ******************************************************************************************************************
ok: [localhost] => {
"msg": "3.7.0"
}
This PR adds a task that validates that the
kafka_version
set is supported by the installed Strimzi operator. It will store the `https://strimzi.io/downloads/ website content (which contains the mapping between operator version vs supported kafka versions) into a variable and parse it to a dict, then we can extract the supported kafka version list based upon the current installed csv.Note: This only works for Strimzi as long as the above page remains in this html structure
Could not find the corresponding information for Red Hat AMQ Streams, but if we ever do, hopefully this can be reused.
This task will determine if the existing
kafka_version
is included in thekafka_supported_versions
list, and if not, it will setkafka_version
to the latest result from thekafka_supported_versions
, that way we'll never get failures whenever there's a newer strimzi operator version supporting newer kafka versions.Test example:
If
kafka_version
is initially set to3.5.0
, but operator only supports['3.6.0', '3.6.1', '3.7.0']
, then it will automatically setkafka_version: 3.7.0