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

Update CRDs as per GEP-3155 #3291

Closed
wants to merge 2 commits into from

Conversation

mkosieradzki
Copy link
Contributor

/kind gep
What this PR does / why we need it:
Updates CRDs as per GEP-3155

Does this PR introduce a user-facing change?:

Updated CRDs as per GEP-3155

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/gep PRs related to Gateway Enhancement Proposal(GEP) labels Aug 23, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mkosieradzki
Once this PR has been reviewed and has the lgtm label, please assign robscott for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 23, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @mkosieradzki. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 23, 2024
@robscott
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 24, 2024
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @mkosieradzki!

@@ -126,11 +141,50 @@ type BackendTLSPolicyValidation struct {
// backends:
//
// 1. Hostname MUST be used as the SNI to connect to the backend (RFC 6066).
// 2. Hostname MUST be used for authentication and MUST match the certificate
// served by the matching backend.
// 2. Only if SubjectAltNames is not specified, Hostname MUST be used for
Copy link
Member

Choose a reason for hiding this comment

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

Tiny nit:

Suggested change
// 2. Only if SubjectAltNames is not specified, Hostname MUST be used for
// 2. If SubjectAltNames is not specified, Hostname MUST be used for

// Support: Core
//
// +optional
Hostname v1.PreciseHostname `json:"hostname,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Not an expert here, but it seems like a wildcard hostname is at least theoretically possible (https://stackoverflow.com/a/21496451). That would mean using the more generic type that also allows wildcards:

type Hostname string

Copy link
Member

Choose a reason for hiding this comment

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

Not an expert as well but I think I agree here. That means that in the SANs we will be able to specify wildcards but we are keeping the Hostname under BackendTLSPolicySpec precise (we have to cause if SubjectAltNames is empty Hostname MUST be used as the SNI to connect to the backend.

Just clarifying my understanding

// Support: Core
//
// +optional
URI string `json:"uri,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Seems like we need some kind of regex validation here, similar in concept to what we've added for the hostname types.

Comment on lines +163 to +166
// +kubebuilder:validation:XValidation:message="must contain Hostname, if Type is set to Hostname",rule="!(self.Type == "Hostname" && has(self.Hostname) && self.Hostname != \"\")"
// +kubebuilder:validation:XValidation:message="must not contain Hostname, if Type is not set to Hostname",rule="self.Type != "Hostname" && has(self.Hostname) && self.Hostname != \"\""
// +kubebuilder:validation:XValidation:message="must contain URI, if Type is set to URI",rule="!(self.Type == "URI" && has(self.URI) && self.HostName != \"\")"
// +kubebuilder:validation:XValidation:message="must not contain URI, if Type is not set to URI",rule="self.Type != "URI" && has(self.URI) && self.URI != \"\""
Copy link
Member

Choose a reason for hiding this comment

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

Recommend adding some basic CEL test coverage, similar to #3283

@k8s-ci-robot
Copy link
Contributor

@mkosieradzki: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gateway-api-verify a78a3e8 link true /test pull-gateway-api-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@LiorLieberman
Copy link
Member

/assign

@LiorLieberman
Copy link
Member

this moved to #3304

@robscott robscott closed this Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/gep PRs related to Gateway Enhancement Proposal(GEP) ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants