Skip to content

Validate K8s resource references against the RFC 1123 hostname JSON Schema format#37

Merged
ThoSap merged 6 commits intomainfrom
validate-k8s-resource-references-against-rfc1123
Feb 26, 2026
Merged

Validate K8s resource references against the RFC 1123 hostname JSON Schema format#37
ThoSap merged 6 commits intomainfrom
validate-k8s-resource-references-against-rfc1123

Conversation

@ThoSap
Copy link
Contributor

@ThoSap ThoSap commented Feb 26, 2026

Related to base PR #36

As Quarkus now uses Fabric8 Kubernetes Client v7.5.X, we can use the new CRD Generator v2 API io.fabric8.crdv2.generator.v1.SchemaCustomizer to tell Kubernetes resource reference fields namespace and name, and the host field in the ClusterConnectionSpec to use JSON Schema format: hostname.

Kubernetes uses RFC 1123 to validate resource names, so our CRD should also validate that before a malformed resource ref is used in a CRD Spec and applied to the cluster, which then fails in the reconciler.
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names

Related to comment #2 (comment)
image

@ThoSap ThoSap self-assigned this Feb 26, 2026
@ThoSap ThoSap changed the title validate K8s resource references against the RFC 1123 hostname format… Validate K8s resource references against the RFC 1123 hostname JSON Schema format Feb 26, 2026
@ThoSap ThoSap requested a review from alexlanz February 26, 2026 09:45
Base automatically changed from update-quarkus-and-dependencies to main February 26, 2026 13:47
@ThoSap ThoSap merged commit 3381f8c into main Feb 26, 2026
4 checks passed
@ThoSap ThoSap deleted the validate-k8s-resource-references-against-rfc1123 branch February 26, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants