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

Add CEL for BackendTLSPolicy targetRefs #3496

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

Conversation

snorwin
Copy link
Contributor

@snorwin snorwin commented Dec 11, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:
This PR introduces validation to ensure that targetRefs on BackendTLSPolicy are unique. Without this validation, implementations may face challenges in properly resolving these references. A CEL is introduced, similar to the one used in the HTTPRoute, to facilitate this validation.

Which issue(s) this PR fixes:

None

Does this PR introduce a user-facing change?:

CEL validation for target references in BackendTLSPolicy

@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/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 11, 2024
@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 Dec 11, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @snorwin. 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.

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.

This is a great addition, thanks for the work on this @snorwin!

/cc @candita

pkg/test/cel/backendtlspolicy_test.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot requested a review from candita December 12, 2024 07:08
@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 Dec 12, 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 @snorwin! Will defer final LGTM to @candita

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 12, 2024
@candita
Copy link
Contributor

candita commented Dec 12, 2024

@snorwin It would be great if you could attend the next community meeting and do a small presentation on the background and solution, for the awareness of other implementers. Also, a godoc update would be super helpful to all.

@snorwin
Copy link
Contributor Author

snorwin commented Dec 13, 2024

@snorwin It would be great if you could attend the next community meeting and do a small presentation on the background and solution, for the awareness of other implementers. Also, a godoc update would be super helpful to all.

@candita I added a description similar to the one for the parentRefs in HTTPRoute, but I've simplified it a bit for clarity.

I'll do my best to attend the community meeting, but the pre-xmas season is quite busy for me.

Copy link
Member

@mlavacca mlavacca left a comment

Choose a reason for hiding this comment

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

Thanks, @snorwin!

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mlavacca, robscott, snorwin

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

@candita
Copy link
Contributor

candita commented Dec 17, 2024

@snorwin It would be great if you could attend the next community meeting and do a small presentation on the background and solution, for the awareness of other implementers. Also, a godoc update would be super helpful to all.

@candita I added a description similar to the one for the parentRefs in HTTPRoute, but I've simplified it a bit for clarity.

I'll do my best to attend the community meeting, but the pre-xmas season is quite busy for me.

@snorwin I asked in the Slack channel. I would prefer to make this more well-known now that we have 5 implementations and are aiming to move BackendTLSPolicy to standard.

@candita
Copy link
Contributor

candita commented Dec 17, 2024

/lgtm

Hold until this is more widely known and accepted.
/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 17, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 17, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 18, 2024
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

Co-authored-by: Candace Holman <[email protected]>
@robscott
Copy link
Member

Thanks for the work on this @snorwin! I've added this to the agenda for our next meeting (Jan 6), and one of us can summarize the changes then (no worries if you can't make it).

I think this is a strict improvement and unlikely to be problematic to implementations, but agree with @candita that we should make sure this is widely known in advance of the v1.3 release. Since this is on the agenda now for the next meeting, I'm fine with merging this at any point, but will defer to @candita on the timing.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. 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.

5 participants