Skip to content

Commit

Permalink
crds: cleanup and fix comment (envoyproxy#3228)
Browse files Browse the repository at this point in the history
Signed-off-by: zirain <zirain2009@gmail.com>
Co-authored-by: Guy Daich <guy.daich@sap.com>
  • Loading branch information
zirain and guydc authored Apr 22, 2024
1 parent c2441af commit cffa3c4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 42 deletions.
5 changes: 3 additions & 2 deletions api/v1alpha1/backendtrafficpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const (
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[?(@.type=="Accepted")].reason`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
//

// BackendTrafficPolicy allows the user to configure the behavior of the connection
// between the Envoy Proxy listener and the backend service.
type BackendTrafficPolicy struct {
Expand All @@ -34,7 +34,7 @@ type BackendTrafficPolicy struct {
Status gwapiv1a2.PolicyStatus `json:"status,omitempty"`
}

// spec defines the desired state of BackendTrafficPolicy.
// BackendTrafficPolicySpec defines the desired state of BackendTrafficPolicy.
type BackendTrafficPolicySpec struct {
// +kubebuilder:validation:XValidation:rule="self.group == 'gateway.networking.k8s.io'", message="this policy can only have a targetRef.group of gateway.networking.k8s.io"
// +kubebuilder:validation:XValidation:rule="self.kind in ['Gateway', 'HTTPRoute', 'GRPCRoute', 'UDPRoute', 'TCPRoute', 'TLSRoute']", message="this policy can only have a targetRef.kind of Gateway/HTTPRoute/GRPCRoute/TCPRoute/UDPRoute/TLSRoute"
Expand Down Expand Up @@ -100,6 +100,7 @@ type BackendTrafficPolicySpec struct {
}

// +kubebuilder:object:root=true

// BackendTrafficPolicyList contains a list of BackendTrafficPolicy resources.
type BackendTrafficPolicyList struct {
metav1.TypeMeta `json:",inline"`
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/clienttrafficpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ type ClientTrafficPolicySpec struct {
Connection *Connection `json:"connection,omitempty"`
}

// HeaderSettings providess configuration options for headers on the listener.
// HeaderSettings provides configuration options for headers on the listener.
type HeaderSettings struct {
// EnableEnvoyHeaders configures Envoy Proxy to add the "X-Envoy-" headers to requests
// and responses.
Expand Down Expand Up @@ -151,7 +151,7 @@ type XForwardedForSettings struct {
NumTrustedHops *uint32 `json:"numTrustedHops,omitempty"`
}

// CustomHeader provides configuration for determining the client IP address for a request based on
// CustomHeaderExtensionSettings provides configuration for determining the client IP address for a request based on
// a trusted custom HTTP header. This uses the the custom_header original IP detection extension.
// Refer to https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto
// for more details.
Expand Down
11 changes: 0 additions & 11 deletions api/v1alpha1/securitypolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,6 @@ type SecurityPolicySpec struct {
ExtAuth *ExtAuth `json:"extAuth,omitempty"`
}

// SecurityPolicyStatus defines the state of SecurityPolicy
type SecurityPolicyStatus struct {
// Conditions describe the current conditions of the SecurityPolicy.
//
// +optional
// +listType=map
// +listMapKey=type
// +kubebuilder:validation:MaxItems=8
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

//+kubebuilder:object:root=true

// SecurityPolicyList contains a list of SecurityPolicy resources.
Expand Down
22 changes: 0 additions & 22 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ BackendTrafficPolicyList contains a list of BackendTrafficPolicy resources.



spec defines the desired state of BackendTrafficPolicy.
BackendTrafficPolicySpec defines the desired state of BackendTrafficPolicy.

_Appears in:_
- [BackendTrafficPolicy](#backendtrafficpolicy)
Expand Down Expand Up @@ -539,7 +539,7 @@ _Appears in:_



CustomHeader provides configuration for determining the client IP address for a request based on
CustomHeaderExtensionSettings provides configuration for determining the client IP address for a request based on
a trusted custom HTTP header. This uses the the custom_header original IP detection extension.
Refer to https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/http/original_ip_detection/custom_header/v3/custom_header.proto
for more details.
Expand Down Expand Up @@ -1606,7 +1606,7 @@ _Appears in:_



HeaderSettings providess configuration options for headers on the listener.
HeaderSettings provides configuration options for headers on the listener.

_Appears in:_
- [ClientTrafficPolicySpec](#clienttrafficpolicyspec)
Expand Down Expand Up @@ -2878,8 +2878,6 @@ _Appears in:_
| `extAuth` | _[ExtAuth](#extauth)_ | false | ExtAuth defines the configuration for External Authorization. |




#### ServiceExternalTrafficPolicy

_Underlying type:_ _string_
Expand Down

0 comments on commit cffa3c4

Please sign in to comment.