Skip to content

Commit 9260e31

Browse files
committed
address comments
Signed-off-by: huabing zhao <[email protected]>
1 parent d7beeee commit 9260e31

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

apis/v1alpha2/policy_types.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ limitations under the License.
1616

1717
package v1alpha2
1818

19-
// PolicyTargetReference identifies an API object to apply policy to. This
20-
// should be used as part of Policy resources that can target Gateway API
21-
// resources. For more information on how this policy attachment model works,
22-
// and a sample Policy resource, refer to the policy attachment documentation
23-
// for Gateway API.
19+
// PolicyTargetReference identifies an API object to apply a direct or
20+
// inherited policy to. This should be used as part of Policy resources
21+
// that can target Gateway API resources. For more information on how this
22+
// policy attachment model works, and a sample Policy resource, refer to
23+
// the policy attachment documentation for Gateway API.
2424
type PolicyTargetReference struct {
2525
// Group is the group of the target resource.
2626
Group Group `json:"group"`
@@ -40,19 +40,19 @@ type PolicyTargetReference struct {
4040
Namespace *Namespace `json:"namespace,omitempty"`
4141
}
4242

43-
// DirectPolicyTargetReference identifies an API object to apply direct policy to.
43+
// DirectPolicyTargetReference identifies an API object to apply a direct policy to.
4444
// This should be used as part of Policy resources that can target single resources.
4545
// For more information on how this policy attachment model works, and a sample
4646
// Policy resource, refer to the policy attachment documentation for Gateway API.
4747
//
4848
// Note: This should be used for direct policy attachment only.
49-
// <gateway:experimental>
5049
type DirectPolicyTargetReference struct {
5150
PolicyTargetReference `json:",inline"`
5251

5352
// SectionName is the name of a section within the target resource. When
5453
// unspecified, this targetRef targets the entire resource. In the following
5554
// resources, SectionName is interpreted as the following:
55+
//
5656
// * Gateway: Listener Name
5757
// * Service: Port Name
5858
//

geps/gep-713.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,8 +1316,8 @@ spec:
13161316
sectionName: bar
13171317
```
13181318

1319-
This would require adding a `Name` field to those sub-resources that currently lack a name. For example,
1320-
a `Name` field could be added to the `RouteRule` object:
1319+
This would require adding a `name` field to those sub-resources that currently lack a name. For example,
1320+
a `name` field could be added to the `RouteRule` object:
13211321
```go
13221322
type RouteRule struct {
13231323
// Name is the name of the Route rule. If more than one Route Rule is
@@ -1337,8 +1337,8 @@ type RouteRule struct {
13371337
If a `sectionName` is specified, but does not exist on the targeted object, the Policy must fail to attach,
13381338
and the policy implementation should record a `resolvedRefs` or similar Condition in the Policy's status.
13391339

1340-
When multiple Policies of the same type target the same object, one with a `SectionName` specified, and one without,
1341-
the one with a `SectionName` is more specific, and so will have all its settings apply. The less-specific Policy will
1340+
When multiple Policies of the same type target the same object, one with a `sectionName` specified, and one without,
1341+
the one with a `sectionName` is more specific, and so will have all its settings apply. The less-specific Policy will
13421342
not attach to the target.
13431343

13441344
Note that the `sectionName` is currently intended to be used only for Direct Policy Attachment. Inherited Policies

0 commit comments

Comments
 (0)