diff --git a/api/v1alpha1/backendtrafficpolicy_types.go b/api/v1alpha1/backendtrafficpolicy_types.go index 3507a0c5742..261756a81f2 100644 --- a/api/v1alpha1/backendtrafficpolicy_types.go +++ b/api/v1alpha1/backendtrafficpolicy_types.go @@ -19,7 +19,7 @@ const ( // +kubebuilder:resource:categories=envoy-gateway,shortName=btp // +kubebuilder:subresource:status // +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 { @@ -33,7 +33,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" @@ -99,6 +99,7 @@ type BackendTrafficPolicySpec struct { } // +kubebuilder:object:root=true + // BackendTrafficPolicyList contains a list of BackendTrafficPolicy resources. type BackendTrafficPolicyList struct { metav1.TypeMeta `json:",inline"` diff --git a/api/v1alpha1/clienttrafficpolicy_types.go b/api/v1alpha1/clienttrafficpolicy_types.go index 5028ba712a4..b722a33655d 100644 --- a/api/v1alpha1/clienttrafficpolicy_types.go +++ b/api/v1alpha1/clienttrafficpolicy_types.go @@ -92,7 +92,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. @@ -150,7 +150,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. diff --git a/api/v1alpha1/securitypolicy_types.go b/api/v1alpha1/securitypolicy_types.go index 69e1d77fa47..85c0b21892d 100644 --- a/api/v1alpha1/securitypolicy_types.go +++ b/api/v1alpha1/securitypolicy_types.go @@ -71,17 +71,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. diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 1c4973aebe6..6d3564d19be 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -3836,28 +3836,6 @@ func (in *SecurityPolicySpec) DeepCopy() *SecurityPolicySpec { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityPolicyStatus) DeepCopyInto(out *SecurityPolicyStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityPolicyStatus. -func (in *SecurityPolicyStatus) DeepCopy() *SecurityPolicyStatus { - if in == nil { - return nil - } - out := new(SecurityPolicyStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ShutdownConfig) DeepCopyInto(out *ShutdownConfig) { *out = *in diff --git a/site/content/en/latest/api/extension_types.md b/site/content/en/latest/api/extension_types.md index 9ff620e4e1f..fd41e84c1bb 100644 --- a/site/content/en/latest/api/extension_types.md +++ b/site/content/en/latest/api/extension_types.md @@ -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) @@ -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. @@ -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) @@ -2878,8 +2878,6 @@ _Appears in:_ | `extAuth` | _[ExtAuth](#extauth)_ | false | ExtAuth defines the configuration for External Authorization. | - - #### ServiceExternalTrafficPolicy _Underlying type:_ _string_