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

Document that ParentRefs require ReferencePolicy. #974

Closed

Conversation

jpeach
Copy link
Contributor

@jpeach jpeach commented Dec 23, 2021

What type of PR is this?

/kind bug
/kind api-change

What this PR does / why we need it:

Consistent use of ReferencePolicy across the API makes it more
predictable and easier to reason about. Document that ParentRef
references that cross namespaces are required to obey ReferencePolicy
restrictions. I believe that this was always the intention, though
the documentation text was overlooked.

Which issue(s) this PR fixes:

Fixes #973.

Does this PR introduce a user-facing change?:

Controller implementations must enforce ReferencePolicy polocies when
attaching routes to gateways in different namespaces.

Consistent use of ReferencePolicy across the API makes it more
predictable and easier to reason about. Document that ParentRef
references that cross namespaces are required to obey ReferencePolicy
restrictions. I believe that this was always the intention, though
the documentation text was overlooked.

Signed-off-by: James Peach <jpeach@apache.org>
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 23, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jpeach

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 23, 2021
Comment on lines +55 to +58
// Note that when a namespace is specified, a ReferencePolicy object
// is required in the referent namespace to allow that namespace's
// owner to accept the reference. See the ReferencePolicy documentation
// for details.
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 this is a bit more nuanced, maybe something like this would work?

Suggested change
// Note that when a namespace is specified, a ReferencePolicy object
// is required in the referent namespace to allow that namespace's
// owner to accept the reference. See the ReferencePolicy documentation
// for details.
// Note that when a different namespace is specified, something in the
// target namespace needs to allow that reference. When referring to a
// Gateway in a different namespace, that Gateway needs to explicitly
// allow for Routes to be attached from this namespace. For other kinds
// of parent resources that don't include this configuration, a
// ReferencePolicy must be present to accept the reference. See the
// ReferencePolicy documentation for details.

@jpeach
Copy link
Contributor Author

jpeach commented Dec 23, 2021

Closing this out. Talking about ReferencePolicy would just add to the confusion that I'm suffering from. I'll think about some different language.

@jpeach jpeach closed this Dec 23, 2021
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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Route ParentRef field does not mention ReferencePolicy
3 participants