Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow hostname to use subdomain with single label/character #4803

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nothinux
Copy link

Fixes #4793

Release Notes:

@nothinux nothinux requested a review from a team as a code owner November 28, 2024 03:33
@zhaohuabing
Copy link
Member

zhaohuabing commented Nov 28, 2024

@nothinux Thanks for fixing this! Could you please add a test to test/cel-validation/backend_test.go?

Signed-off-by: Taufik Mulyana <[email protected]>
@nothinux
Copy link
Author

added

@nothinux
Copy link
Author

nothinux commented Nov 28, 2024

@zhaohuabing the coverage test failed because only 4 items are allowed. can we double this limit?

// +kubebuilder:validation:MaxItems=4
// +kubebuilder:validation:XValidation:rule="self.all(f, has(f.fqdn)) || !self.exists(f, has(f.fqdn))",message="fqdn addresses cannot be mixed with other address types"
Endpoints []BackendEndpoint `json:"endpoints,omitempty"`

@zhaohuabing
Copy link
Member

@zhaohuabing the coverage test failed because only 4 items are allowed. can we double this limit?

// +kubebuilder:validation:MaxItems=4
// +kubebuilder:validation:XValidation:rule="self.all(f, has(f.fqdn)) || !self.exists(f, has(f.fqdn))",message="fqdn addresses cannot be mixed with other address types"
Endpoints []BackendEndpoint `json:"endpoints,omitempty"`

I think it's fine to make it 8 cc @guydc

@arkodg
Copy link
Contributor

arkodg commented Nov 30, 2024

@zhaohuabing the coverage test failed because only 4 items are allowed. can we double this limit?

// +kubebuilder:validation:MaxItems=4
// +kubebuilder:validation:XValidation:rule="self.all(f, has(f.fqdn)) || !self.exists(f, has(f.fqdn))",message="fqdn addresses cannot be mixed with other address types"
Endpoints []BackendEndpoint `json:"endpoints,omitempty"`

I think it's fine to make it 8 cc @guydc

64, so it account for cases where users are auto generating Backend resources to route to custom backends ? Can we do that in a separate PR @nothinux ?

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.

Hostname doesn't support subdomain with single character in Backend Object
3 participants