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 ReferenceGrant docs to include Gateway -> Secret use case #1181

Merged
merged 6 commits into from
Jun 30, 2022

Conversation

nathancoleman
Copy link
Contributor

@nathancoleman nathancoleman commented Jun 3, 2022

What type of PR is this?

/kind documentation

What this PR does / why we need it:
The docs for ReferenceGrant in some cases only cover the route -> backend use case where they should also include the gateway -> secret use case for certificate references.

Which issue(s) this PR fixes:

Fixes #

Does this PR introduce a user-facing change?:

Update ReferenceGrant docs to include Gateways that reference a Secret in a different namespace

@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. kind/documentation Categorizes issue or PR as related to documentation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 3, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @nathancoleman. 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/test-infra 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 3, 2022
@k8s-ci-robot k8s-ci-robot requested review from hbagdi and youngnick June 3, 2022 20:12
@nathancoleman nathancoleman marked this pull request as ready for review June 3, 2022 21:19
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 3, 2022
@k8s-ci-robot k8s-ci-robot requested review from bowei and jpeach June 3, 2022 21:19
@youngnick
Copy link
Contributor

Nice catch @nathancoleman!

/approved
I'll leave the LGTM for a second review.

Copy link
Member

@shaneutt shaneutt 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 Jun 6, 2022
@nathancoleman
Copy link
Contributor Author

/assign @bowei

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 for the work on this @nathancoleman! I agree with the goal here, but I think it may require a bit more restructuring.

@@ -95,6 +95,7 @@ type ReferencePolicyFrom struct {
// additional resources, the following Route types are part of the "Core"
// support level for this field:
//
// * Gateway
Copy link
Member

Choose a reason for hiding this comment

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

I think we need some more nuance here. I'm not really sure how this will scale since we really need to document each valid pair, ie HTTPRoute -> Secret doesn't make sense, and there's not currently any way to do Gateway -> Service. I think the best option here is to add a note here that ReferencePolicy is only supported as explicitly documented on object reference fields. Then we can add a comment on the cert ref namespace field in Gateways that references to Secrets in other namespaces can be allowed by ReferenceGrant. Similarly, we can update the BackendRef namespace field to state that references to Services in other namespaces can be allowed by ReferenceGrant.

Copy link
Contributor

Choose a reason for hiding this comment

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

The status Condition -> Reason mappings (see example in #1114) may provide a pattern for clarifying these relationships a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@robscott @mikemorris thoughts on the most recent commit?

I'm having trouble regenerating the CRDs on my machine, so those aren't updated in this PR yet.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 7, 2022
@nathancoleman nathancoleman force-pushed the ref-policy-spec-update branch from 0aed112 to 1330641 Compare June 7, 2022 14:46
@k8s-ci-robot k8s-ci-robot removed lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 7, 2022
@nathancoleman nathancoleman changed the title Update ReferencePolicy docs to include Gateway -> Secret use case Update ReferenceGrant docs to include Gateway -> Secret use case Jun 7, 2022
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 8, 2022
@shaneutt shaneutt removed their assignment Jun 29, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 29, 2022
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 29, 2022
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 29, 2022
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 29, 2022
@robscott
Copy link
Member

/retest

@robscott
Copy link
Member

Thanks @nathancoleman!

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nathancoleman, robscott, shaneutt

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 541e9fc into kubernetes-sigs:main Jun 30, 2022
@nathancoleman nathancoleman deleted the ref-policy-spec-update branch June 30, 2022 04:55
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/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants