Skip to content

docs(connect): clarifies image/version config for kafka connect#11779

Merged
PaulRMellor merged 3 commits intostrimzi:mainfrom
PaulRMellor:docs_kc-version-custom-images
Sep 1, 2025
Merged

docs(connect): clarifies image/version config for kafka connect#11779
PaulRMellor merged 3 commits intostrimzi:mainfrom
PaulRMellor:docs_kc-version-custom-images

Conversation

@PaulRMellor
Copy link
Copy Markdown
Contributor

@PaulRMellor PaulRMellor commented Aug 27, 2025

Documentation

Updates docs on using custom image for Kafka Connect to explain that a Kafka version should be specified.
Also refreshes content on image config for Kafka components to make it easier to scan

Checklist

Please go through this checklist and make sure all applicable tasks have been done

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Check RBAC rights for Kubernetes / OpenShift roles
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Reference relevant issue(s) and close them after merging
  • Update CHANGELOG.md
  • Supply screenshots for visual changes, such as Grafana dashboards

Signed-off-by: prmellor <pmellor@redhat.com>
Copy link
Copy Markdown
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some nits. I also wonder, if we have the upgrades covered here, because they are pretty tricky with the custom images. Beause you basically need to update the imahge field at the same point when the upgrade is happpening which is not possible. So the user likely needs to:

  • Pause the reconciliation
  • Upgrade the operator
  • Upgrade the .spec.image
  • Unpause the reconciliation

Comment on lines +349 to +356
|===
| `image` | `version` | Result

| ✗ | ✗ | Uses Cluster Operator's default image and corresponding Kafka version
| ✓ | ✗ | Uses specified image and default Kafka version
| ✗ | ✓ | Uses image from environment variable for specified Kafka version
| ✓ | ✓ | Uses specified image and assumes specified Kafka version matches
|===
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This table is fine, but I'm not sure it captures the main issue which is What is the right configuration. The version field specifies two things:

  • What image will be used if not set in the custom resoruce directly
  • What is the expected Kafka version, which defines how the operator will manage the operand

As a result, some of these settings are possibly both valid and invalid.


Maybe we need to add some second table showing some valid and invalid configurations as examples? E.g.

  • Imagine operator which supports Kafka 4.0.0, 4.0.1 and 4.1.0
  • The configuration without custom image and verison is valid
  • The configuration with custom image based on Kafka 4.0.0 with version set to 4.0.0 is valid
  • The configuration with custom image based on Kafka 4.0.0 without version set is invalid because version defaults to 4.1.0 in this case
  • etc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I've added a table with some examples where the config mismatches produce invalid results.

This approach is useful for individual cluster configurations.
+
If set, this property overrides the `STRIMZI_KAFKA_CONNECT_IMAGES` environment variable in the Cluster Operator.
If set, this property overrides the values for the `STRIMZI_KAFKA_CONNECT_IMAGES` environment variable in the Cluster Operator.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IF we want to include this, we should have a warning that this would possibly impact other Connect clusters as well. In general, I do not expect STRIMZI_KAFKA_CONNECT_IMAGES to be used for manually build custom images as it does not make much sense

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. I've changed so the spec.image is shown in the step. The intro mentions this but also mentions what happens if the env var is updated instead.

Signed-off-by: prmellor <pmellor@redhat.com>
@PaulRMellor
Copy link
Copy Markdown
Contributor Author

I left some nits. I also wonder, if we have the upgrades covered here, because they are pretty tricky with the custom images. Beause you basically need to update the imahge field at the same point when the upgrade is happpening which is not possible. So the user likely needs to:

  • Pause the reconciliation
  • Upgrade the operator
  • Upgrade the .spec.image
  • Unpause the reconciliation

Great feedback, thanks.
I've added a section on upgrade.
I've assumed we're concerned with changes to Kafka versions here, rather than guidance on refreshing the image without the Kafka version changing.

Copy link
Copy Markdown
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more comment. But LGTM otherwise. Thanks for incorporating the changes.

Comment thread documentation/modules/con-common-configuration-properties.adoc Outdated
Signed-off-by: prmellor <pmellor@redhat.com>
Copy link
Copy Markdown
Member

@im-konge im-konge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Paul :)

@PaulRMellor PaulRMellor merged commit ecb872d into strimzi:main Sep 1, 2025
13 checks passed
@PaulRMellor PaulRMellor deleted the docs_kc-version-custom-images branch September 1, 2025 10:18
see-quick pushed a commit to see-quick/strimzi-kafka-operator that referenced this pull request Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: Add note about using version in KafkaConnect's spec in case that custom images are used

4 participants