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 TargetREf in Policy GEP #2147

Closed
candita opened this issue Jun 26, 2023 · 6 comments
Closed

Update TargetREf in Policy GEP #2147

candita opened this issue Jun 26, 2023 · 6 comments
Assignees
Labels
blocked priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@candita
Copy link
Contributor

candita commented Jun 26, 2023

Discussion generated from GEP-1897 points out that TargetRef could use some updates.

  1. All policy resources must include TargetRef with the fields specified here:
    type PolicyTargetReference struct {
    // Group is the group of the target resource.
    Group Group `json:"group"`
    // Kind is kind of the target resource.
    Kind Kind `json:"kind"`
    // Name is the name of the target resource.
    Name ObjectName `json:"name"`
    // Namespace is the namespace of the referent. When unspecified, the local
    // namespace is inferred. Even when policy targets a resource in a different
    // namespace, it MUST only apply to traffic originating from the same
    // namespace as the policy.
    //
    // +optional
    Namespace *Namespace `json:"namespace,omitempty"`
    }
  2. Policy resources may also choose to include SectionName and/or Port in TargetRef following the same mechanics of ParentRef

Then we can provide additional TargetRef types that extend the base TargetRef with the different possible combinations of these fields. That feels like it could be handled in a separate smaller update to the policy GEP.

Originally posted by @robscott in #2113 (comment)

@arkodg
Copy link
Contributor

arkodg commented Aug 10, 2023

happy to pick this one up, @robscott does this warrant a discussion first, or can I start with a new GEP or edit the existing GEP-713 ?

@youngnick
Copy link
Contributor

I think that #2128 needs to merge before we make any more Policy changes. After that, yes, this should update GEP-713.

@shaneutt
Copy link
Member

I think that #2128 needs to merge before we make any more Policy changes. After that, yes, this should update GEP-713.

+1, let's get #2128 done and then update the existing doc.

@shaneutt
Copy link
Member

/triage accepted
/assign @arkodg

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Aug 10, 2023
@shaneutt shaneutt added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 10, 2023
@shaneutt shaneutt added this to the v1.0.0 milestone Aug 10, 2023
@arkodg
Copy link
Contributor

arkodg commented Aug 11, 2023

looks like @zhaohuabing is driving this, thanks !

@arkodg
Copy link
Contributor

arkodg commented Sep 15, 2023

completed with #2283
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
No open projects
Development

No branches or pull requests

5 participants