Skip to content

Commit 474a6f4

Browse files
committed
Adding SectionName to PolicyTargetReference
This allows to attach policies to a specific section within th targeted ojbect. Signed-off-by: huabing zhao <[email protected]>
1 parent 7007d1b commit 474a6f4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

apis/v1alpha2/policy_types.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ type PolicyTargetReference struct {
3838
//
3939
// +optional
4040
Namespace *Namespace `json:"namespace,omitempty"`
41+
42+
// SectionName is the name of a section within the target resource. When
43+
// unspecified, this targets the entire resource. In the following
44+
// resources, SectionName is interpreted as the following:
45+
// * Gateway: Listener Name
46+
// * Route: Rule Name
47+
// * Service: Port Name
48+
//
49+
// +kubebuilder:validation:MinLength=1
50+
// +kubebuilder:validation:MaxLength=253
51+
// +optional
52+
// <gateway:experimental>
53+
SectionName string `json:"sectionName,omitempty"`
4154
}
4255

4356
// PolicyConditionType is a type of condition for a policy. This type should be

0 commit comments

Comments
 (0)