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

Using "Set" list type for "Remove" in Header Modifier Filters #2306

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

robscott
Copy link
Member

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
This fills one more gap in our CRD validation that we've historically relied on the validating webhook to cover. As documented in #2277, the webhook ensures that header names have case-insensitive uniqueness. The built-in CRD validation uses +listType=map and +listMapKey=name to ensure that names are unique (unfortunately still case-sensitive, but better than nothing). We were missing equivalent CRD validation on the Remove field, this adds that.

As we're moving away from webhook-based validation, adding as much validation we can directly to the CRD will be helpful, so this takes one more step in that direction.

Does this PR introduce a user-facing change?:

HTTPRoute and GRPCRoute CRDs now provide built-in validation that ensures the uniqueness of names in Header Modifier "Remove" lists.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 15, 2023
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 15, 2023
@robscott robscott added this to the v0.8.0 milestone Aug 15, 2023
Copy link
Contributor

@youngnick youngnick left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 15, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: robscott, youngnick

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

The pull request process is described 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 merged commit 5603d11 into kubernetes-sigs:main Aug 15, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants