Skip to content

Commit 8e52314

Browse files
authored
docs(v1): instructions for api conversion tool (#12072)
Signed-off-by: prmellor <pmellor@redhat.com>
1 parent 27662d7 commit 8e52314

26 files changed

Lines changed: 774 additions & 17 deletions
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
3+
[id='assembly-api-conversion-{context}']
4+
= Converting Strimzi custom resources to the v1 API
5+
6+
[role="_abstract"]
7+
This section describes how to prepare Strimzi custom resources and CRDs for the `v1` API before performing an upgrade.
8+
9+
Prepare Strimzi custom resources and CRDs for the `v1` API by using the Strimzi API conversion tool or by applying the required changes manually.
10+
The tool is provided with the release artifacts.
11+
To use the tool, extract it and run the conversion script from the `bin` directory.
12+
13+
The migration to the `v1` API has two stages.
14+
15+
* Version 0.49 introduces the `v1` API and deprecates the older `v1alpha1`, `v1beta1`, and `v1beta2` versions. (`v1alpha1` and `v1beta1` versions are used only for `KafkaUser` and `KafkaTopic` resources).
16+
* A later release (planned for 0.52.0 or 1.0.0) removes the `v1alpha1`, `v1beta1`, and `v1beta2` APIs and updates all components to use `v1`.
17+
18+
Complete the conversion of custom resources and CRDs after upgrading to version 0.49 or later, and before upgrading to the later release that removes the `v1beta2` API (Strimzi 0.52.0 / 1.0.0).
19+
Resources converted to `v1` are compatible with Strimzi versions 0.49 and later.
20+
21+
//tool commands
22+
include::../../modules/upgrading/con-conversion-tool-commands.adoc[leveloffset=+1]
23+
//prep for conversion
24+
include::../../modules/upgrading/ref-preparing-for-conversion.adoc[leveloffset=+1]
25+
//converting resources locally
26+
include::../../modules/upgrading/proc-convert-custom-resource-yaml.adoc[leveloffset=+1]
27+
//converting resources in a cluster
28+
include::../../modules/upgrading/proc-convert-custom-resources-cluster.adoc[leveloffset=+1]
29+
//converting resources as a job
30+
include::../../modules/upgrading/proc-run-conversion-tool-job.adoc[leveloffset=+1]
31+
//upgrading CRDs
32+
include::../../modules/upgrading/proc-upgrade-crds.adoc[leveloffset=+1]
33+
//resource updates
34+
include::../../assemblies/upgrading/assembly-update-resources.adoc[leveloffset=+1]
35+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
3+
[id='assembly-update-resources-v1-{context}']
4+
= Updating custom resources for the v1 API
5+
6+
[role="_abstract"]
7+
Use this section to review the configuration changes introduced in the Strimzi `v1` API and determine which updates are required for your deployment.
8+
9+
The reference information describes updates for each Strimzi custom resource type.
10+
Some updates are applied automatically by the API conversion tool, while others require manual editing of custom resources.
11+
12+
The following sections describe the manual and automatic updates required for each Strimzi custom resource type.
13+
14+
include::../../modules/upgrading/con-understanding-v1-api-changes.adoc[leveloffset=+1]
15+
include::../../modules/upgrading/ref-kafka-v1-changes.adoc[leveloffset=+1]
16+
include::../../modules/upgrading/ref-kafkaconnect-v1-changes.adoc[leveloffset=+1]
17+
include::../../modules/upgrading/ref-kafkamirrormaker2-v1-changes.adoc[leveloffset=+1]
18+
include::../../modules/upgrading/ref-kafkabridge-v1-changes.adoc[leveloffset=+1]
19+
include::../../modules/upgrading/ref-kafkaconnector-v1-changes.adoc[leveloffset=+1]
20+
include::../../modules/upgrading/ref-kafkarebalance-v1-changes.adoc[leveloffset=+1]
21+
include::../../modules/upgrading/ref-kafkanodepool-v1-changes.adoc[leveloffset=+1]
22+
include::../../modules/upgrading/ref-kafkatopic-v1-changes.adoc[leveloffset=+1]
23+
include::../../modules/upgrading/ref-kafkauser-v1-changes.adoc[leveloffset=+1]
24+
include::../../modules/upgrading/ref-strimzipodset-v1-changes.adoc[leveloffset=+1]

documentation/assemblies/upgrading/assembly-upgrade.adoc

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ Kafka upgrades are performed by the Cluster Operator through rolling updates of
1818

1919
If you encounter any issues with the new version, Strimzi can be xref:assembly-downgrade-{context}[downgraded] to the previous version.
2020

21-
.Upgrade without downtime
22-
2321
For topics configured with high availability (replication factor of at least 3 and evenly distributed partitions), the upgrade process should not cause any downtime for consumers and producers.
2422

2523
The upgrade triggers rolling updates, where brokers are restarted one by one at different stages of the process.
@@ -28,16 +26,15 @@ During this time, overall cluster availability is temporarily reduced, which may
2826
//sequence
2927
include::../../modules/upgrading/con-upgrade-sequence.adoc[leveloffset=+1]
3028

31-
//kafka upgrade concepts
32-
include::../../modules/upgrading/con-upgrade-paths.adoc[leveloffset=+1]
33-
include::../../modules/upgrading/con-upgrade-versions-and-images.adoc[leveloffset=+2]
34-
35-
//client upgrade concepts
36-
include::../../modules/upgrading/con-upgrade-strategies-for-upgrading-clients.adoc[leveloffset=+1]
37-
3829
//upgrading kubernetes
3930
include::../../modules/upgrading/con-upgrade-cluster.adoc[leveloffset=+1]
4031

32+
//upgrade considerations for pre-0.39 upgrades (non-KRaft)
33+
include::../../modules/upgrading/con-migrate-kraft-pre-0.39.adoc[leveloffset=+1]
34+
35+
//upgrade considerations for v1 conversion
36+
include::../../modules/upgrading/con-api-conversion-v1.adoc[leveloffset=+1]
37+
4138
//upgrading cluster operator
4239
include::assembly-upgrade-cluster-operator.adoc[leveloffset=+1]
4340

@@ -46,3 +43,10 @@ include::../../modules/upgrading/proc-upgrade-kafka-kraft.adoc[leveloffset=+1]
4643

4744
//checking the status of an upgrade
4845
include::../../modules/upgrading/con-upgrade-status.adoc[leveloffset=+1]
46+
47+
//kafka upgrade concepts
48+
include::../../modules/upgrading/con-upgrade-paths.adoc[leveloffset=+1]
49+
include::../../modules/upgrading/con-upgrade-versions-and-images.adoc[leveloffset=+2]
50+
51+
//client upgrade concepts
52+
include::../../modules/upgrading/con-upgrade-strategies-for-upgrading-clients.adoc[leveloffset=+1]

documentation/deploying/deploying.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ include::assemblies/deploying/assembly-drain-cleaner.adoc[leveloffset=+1]
6666
include::assemblies/deploying/assembly-rolling-updates.adoc[leveloffset=+1]
6767
//How to monitor restart events
6868
include::assemblies/deploying/assembly-deploy-restart-events.adoc[leveloffset=+1]
69+
//Using the API conversion tool
70+
include::assemblies/upgrading/assembly-api-conversion.adoc[leveloffset=+1]
6971
//Upgrading the deployment
7072
include::assemblies/upgrading/assembly-upgrade.adoc[leveloffset=+1]
7173
//Downgrading the deployment
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
// This module is included in the following assemblies:
4+
//
5+
// assembly-upgrade.adoc
6+
7+
[id='con-api-conversion-v1-{context}']
8+
= Converting to v1 API from versions earlier than 0.49
9+
10+
[role="_abstract"]
11+
When upgrading from a version prior to Strimzi 0.49.0, you **must** convert your custom resources and CRDs to the `v1` API.
12+
The `v1beta2` API is deprecated and will be removed in a future release (planned for 0.52.0 or 1.0.0).
13+
14+
IMPORTANT: This conversion applies to KRaft-based clusters.
15+
If you are upgrading from a version earlier than 0.39, you must first xref:con-migrate-kraft-pre-0.39-{context}[migrate to KRaft] before proceeding with this conversion and the upgrade.
16+
17+
Follow this specific sequence for the `v1` API conversion:
18+
19+
. **Before upgrading the Cluster Operator to 0.49.0 or later:**
20+
* If you have `KafkaUser` resources using the `.spec.authorization.acls[].operation` field (singular), you **must** update them to use `.spec.authorization.acls[].operations` (plural).
21+
22+
. **After upgrading the Cluster Operator to 0.49.0 or later:**
23+
* You can now convert all other custom resources and CRDs to the `v1` API.
24+
* This step **must** be done *after* the Cluster Operator is upgraded, as the new operator version is required to interpret the `v1` format.
25+
* This conversion can be done any time after the 0.49.0 upgrade but **must** be completed before the future release that removes the `v1beta2` API.
26+
27+
For complete conversion instructions, see xref:assembly-api-conversion-{context}[Converting Strimzi custom resources to the `v1` API].
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
[id='con-conversion-tool-commands-{context}']
4+
= Conversion tool commands
5+
6+
[role="_abstract"]
7+
The Strimzi API conversion tool provides commands to convert Strimzi custom resources and upgrade Custom Resource Definitions (CRDs) to the `v1` API.
8+
9+
Each command runs through a shell script located in the `bin` directory.
10+
11+
Run the tool using the following command format:
12+
13+
[source,shell]
14+
----
15+
bin/v1-api-conversion.sh <command>
16+
----
17+
18+
If you are using Windows, run `bin/v1-api-conversion.cmd` instead.
19+
20+
The following commands are available for converting custom resources and upgrading CRDs:
21+
22+
`convert-file`::
23+
Converts Strimzi custom resources from local YAML files.
24+
Use this command when applying configuration through GitOps or when direct cluster access is restricted.
25+
26+
`convert-resource`::
27+
Converts existing Strimzi custom resources directly in Kubernetes.
28+
Use this command when updating live environments managed by the Cluster Operator.
29+
30+
`crd-upgrade`::
31+
Upgrades Strimzi CRDs to use the `v1` API as the storage version.
32+
Run this command only after all custom resources have been converted.
33+
34+
`help`::
35+
Use the `help` command to list available commands and options or to display detailed help for a specific command.
36+
+
37+
[source,shell]
38+
----
39+
bin/v1-api-conversion.sh help
40+
bin/v1-api-conversion.sh help <command>
41+
----
42+
+
43+
For example, run `bin/v1-api-conversion.sh help convert-file` to see the supported options for converting YAML files.
44+
45+
NOTE: As an alternative to running the tool locally from your computer, you can also run it as a Kubernetes `Job`.
46+
For more information, see the `README.md` file in the conversion tool.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
// This module is included in the following assemblies:
4+
//
5+
// assembly-upgrade.adoc
6+
7+
[id='con-migrate-kraft-pre-0.39-{context}']
8+
= Migrating to KRaft from versions earlier than 0.39
9+
10+
Direct upgrades to Strimzi {ProductVersion} from versions earlier than 0.39 are **not supported**.
11+
12+
Before you can upgrade to {ProductVersion}, you **must** follow this required path:
13+
14+
. Upgrade your cluster to a Strimzi version between 0.39 and 0.45.
15+
. Migrate your cluster from ZooKeeper to KRaft.
16+
17+
For more information, see xref:assembly-kraft-mode-{context}[Using Kafka in KRaft mode].
18+
19+
After your cluster is running on KRaft, you can proceed with the upgrade to Strimzi {ProductVersion}.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
= Manual and automatic v1 API changes
4+
5+
[role="_abstract"]
6+
The Strimzi `v1` API introduces structural and configuration changes to custom resources.
7+
Some properties and sections from earlier API versions have been removed or replaced.
8+
9+
Custom resources can be updated for the `v1` API in two ways:
10+
11+
* By using the Strimzi API conversion tool to apply supported automatic changes.
12+
* By editing and reapplying resources manually without using the tool.
13+
14+
Even when the conversion tool is used, some changes must still be applied manually because the tool cannot modify or remove the unsupported configuration.
15+
The reference information in this section lists which changes the tool can perform automatically and which require manual updates.
16+
17+
.Manual changes
18+
19+
Manual changes are updates that the conversion tool does not apply automatically.
20+
21+
To apply a manual change:
22+
23+
. Edit the affected custom resource.
24+
. Update or remove the required properties.
25+
. Reapply the resource using `kubectl apply -f` or `kubectl replace -f`.
26+
27+
.Automatic changes
28+
29+
Automatic changes are updates that the conversion tool applies during conversion.
30+
Even when the conversion tool is used, some manual changes are still required for the custom resources.

documentation/modules/upgrading/con-upgrade-paths.adoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,3 @@ Review supported Kafka versions in the link:https://strimzi.io/downloads/[Suppor
3434
* The *Operators* column lists all released Strimzi versions (the Strimzi version is often called the "Operator version").
3535
* The *Kafka versions* column lists the supported Kafka versions for each Strimzi version.
3636
endif::Section[]
37-
38-
== Upgrading from a Strimzi version earlier than 0.39
39-
40-
Strimzi {ProductVersion} supports upgrades only for KRaft-based Apache Kafka clusters managed by Strimzi 0.39 and newer.
41-
When upgrading from older Strimzi versions, please make sure to first upgrade to a Strimzi version from 0.39 to 0.45 and migrate to KRaft before upgrading to Strimzi {ProductVersion}.

documentation/modules/upgrading/con-upgrade-sequence.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ Strimzi {ProductVersion} requires Kubernetes {KubernetesVersion}.
1616
+
1717
You can xref:con-upgrade-cluster-{context}[upgrade Kubernetes with minimal downtime].
1818

19-
. Make sure you use Strimzi 0.39 or newer and all your Apache Kafka clusters are Kraft-based.
19+
. xref:con-migrate-kraft-pre-0.39-{context}[Ensure Kafka clusters are KRaft-based].
2020
+
21-
ZooKeeper-based Apache Kafka clusters are not supported anymore and need to be migrated to KRaft before upgrading the Cluster Operator or Apache Kafka.
21+
If upgrading from a version earlier than 0.39, you **must** migrate from ZooKeeper to KRaft *before* upgrading the Cluster Operator. Upgrades from ZooKeeper-based clusters are not supported.
22+
23+
. xref:con-api-conversion-v1-{context}[Prepare for v1 API conversion].
24+
+
25+
If upgrading from a version prior to 0.49, this requirement includes a `KafkaUser` update that **must** be done *before* upgrading the Cluster Operator.
2226

2327
. xref:assembly-upgrade-{context}[Upgrade the Cluster Operator].
2428

0 commit comments

Comments
 (0)