Skip to content

[Enhancement]: Improve Kafka Connect CR usability with additional CRD validations #12259

@AkhilaMohan-24

Description

@AkhilaMohan-24

Related problem

No response

Suggested solution

I was creating new Kafka Connect resources, and realised my resource did not contain valid values. I think this experience can be improved by adding validation for a few commonly misconfigured fields, such as bootstrapServers and secretName etc. in fact this can be applied across all Strimzi resources too (incrementally)
I wondered if adding CEL validations at the CRD level to ensure these fields contain valid values would be a good way to do this without adding complexity of webhooks. I understand this feature is more useful for K8s 1.29+, and currently Strimzi supports 1.27+, so it will only be useful for users on newer version for now and in
For example, we could add a pattern validation to verify that bootstrapServers follows the hostname:port format (or a comma-separated list of such entries). Similarly, for secret names, we could add a pattern validation to ensure they follow Kubernetes naming conventions. This would enable users to provide valid values upfront, reducing the need to analyze logs and fix issues later due to invalid input.
I'm happy to contribute, but wanted to know if this would be something the community feels would add value before I create any PRs.

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions