Skip to content

Commit 423dce0

Browse files
committed
Fix second round of PR comments
Signed-off-by: Nick Young <[email protected]>
1 parent 14b4021 commit 423dce0

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

geps/gep-713.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55

66
## TLDR
77

8-
This GEP aims to standardize terminology and process around using one Kubernetes
8+
This GEP aims to standardize terminology and processes around using one Kubernetes
99
object modify the functions of one or more other objects.
1010

11-
Generally, a Kubernetes object that that _augments_ the behavior of an object
11+
This GEP defines some terms, firstly: _Metaresource_.
12+
13+
A Kubernetes object that that _augments_ the behavior of an object
1214
in a standard way is called a _Metaresource_ are a type of object. ReferenceGrant
1315
is an example of this general type of metaresource, but it is far from the only
1416
one.
@@ -19,8 +21,8 @@ A "Policy Attachment" is a specific type of _metaresource_ that can affect speci
1921
settings across either one object (this is "Direct Policy Attachment"), or objects
2022
in a hierarchy (this is "Hierarchical Policy Attachment").
2123

22-
Individual policy APIs must
23-
- be their own CRDs (e.g. `TimeoutPolicy`, `RetryPolicy` etc),
24+
Individual policy APIs:
25+
- must be their own CRDs (e.g. `TimeoutPolicy`, `RetryPolicy` etc),
2426
- can be included in the Gateway API API group and installation or be defined by
2527
implementations
2628
- and must include a common `TargetRef` struct in their specification to identify how and where to
@@ -139,8 +141,9 @@ Importantly, this would apply to _every_ usage of that Service across any HTTPRo
139141
in that namespace, which could be useful for a Service that is reused in a lot of
140142
HTTPRoutes.
141143

142-
With this two examples in mind, here are some guidelines for when to consider
144+
With these two examples in mind, here are some guidelines for when to consider
143145
using Direct Policy Attachment:
146+
144147
* The number or scope of objects to be modified is limited or singular. Direct
145148
Policy Attachments should target one specific object (preferred), or a tightly-scoped
146149
set of objects (like all Services in a namespace).
@@ -160,7 +163,7 @@ using Direct Policy Attachment:
160163
consumer policies, but in general, Policy objects that modify the behavior of
161164
things outside their own namespace should be avoided unless it uses a handshake
162165
of some sort, where the things outside the namespace can opt–out of the behavior.
163-
(Notably, this is the design that we used for ReferenceGrant).)
166+
(Notably, this is the design that we used for ReferenceGrant).
164167

165168
### Hierarchical Policy Attachment: It's all about the defaults and overrides
166169

site-src/references/policy-attachment.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Metaresources and Policy Attachment
22

3-
Generally, a Kubernetes object that that _augments_ the behavior of an object
4-
in a standard way is called a _Metaresource_ are a type of object. ReferenceGrant
3+
The Gateway API defines a Kubernetes object that that _augments_ the behavior of an object
4+
in a standard way as a _Metaresource_. ReferenceGrant
55
is an example of this general type of metaresource, but it is far from the only
66
one.
77

8+
This document also defines a concept called _Policy Attachment_, which augments
9+
the behavior of an object to add additional settings that can't be described
10+
within the spec of that object.
11+
812
Why have this class of attachment? Well, while features like timeouts, retries,
913
and custom health checks are present in most implementations, their details vary
1014
since there are no standards (RFCs) around them. This makes these features less
@@ -82,9 +86,10 @@ struct included in the Gateway API. Where possible, it is recommended to use
8286
that struct directly instead of duplicating the type.
8387

8488
### Policy Boilerplate
85-
The following structure MUST be used as for any Policy resource using this API
86-
pattern. Within the spec, policy resources may omit `Override` or `Default`
87-
fields, but at least one of them MUST be present.
89+
The following (or something like it) SHOULD be used as for any Policy resource using this API
90+
pattern. Within the spec, policy resources _may_ omit `Override` or `Default`
91+
fields for Direct Policy Attachment, but Hierarchical Policy Attachment must include
92+
one or both.
8893

8994
```go
9095
// ACMEServicePolicy provides a way to apply Service policy configuration with
@@ -133,7 +138,7 @@ type ACMEServicePolicyStatus struct {
133138
```
134139

135140
### Hierarchy
136-
Each policy SHOULD include default and/or override values. Overrides enable admins to
141+
Each Hierarchical policy MUST include default and/or override values. Overrides enable admins to
137142
enforce policy from the top down. Defaults enable app owners to provide default
138143
values from the bottom up for each individual application.
139144

0 commit comments

Comments
 (0)