diff --git a/apis/v1alpha1/snippetsfilter_types.go b/apis/v1alpha1/snippetsfilter_types.go index 24e38100da..50202a638b 100644 --- a/apis/v1alpha1/snippetsfilter_types.go +++ b/apis/v1alpha1/snippetsfilter_types.go @@ -10,10 +10,9 @@ import ( // +kubebuilder:subresource:status // +kubebuilder:resource:categories=nginx-gateway-fabric,shortName=snippetsfilter // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` -// +kubebuilder:metadata:labels="gateway.networking.k8s.io/policy=direct" -// SnippetsFilter is an Direct Attached Policy. It allows inserting NGINX configuration into the -// generated NGINX config for HTTPRoute, GRPCRoute and TLSRoute resources. +// SnippetsFilter is a filter that allows inserting NGINX configuration into the +// generated NGINX config for HTTPRoute and GRPCRoute resources. type SnippetsFilter struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -29,7 +28,7 @@ type SnippetsFilter struct { type SnippetsFilterSpec struct { // Snippets is a list of NGINX configuration snippets. // There can only be one snippet per context. - // Allowed contexts: http, http.server, http.server.location, stream, stream.server. + // Allowed contexts: http, http.server, http.server.location. Snippets []Snippet `json:"snippets"` } @@ -81,13 +80,10 @@ const ( // NginxContext represents the NGINX configuration context. // -// +kubebuilder:validation:Enum=main;http;http;server;http.server;location;stream;stream.server +// +kubebuilder:validation:Enum=http;http;server;http.server;location; type NginxContext string const ( - // NginxContextMain is the main context of the NGINX configuration. - NginxContextMain NginxContext = "main" - // NginxContextHTTP is the http context of the NGINX configuration. NginxContextHTTP NginxContext = "http" @@ -96,10 +92,4 @@ const ( // NginxContextHTTPServerLocation is the location context of the NGINX configuration. NginxContextHTTPServerLocation NginxContext = "http.server.location" - - // NginxContextStream is the stream context of the NGINX configuration. - NginxContextStream NginxContext = "stream" - - // NginxContextStreamServer is the server context of the NGINX configuration. - NginxContextStreamServer NginxContext = "stream.server" ) diff --git a/config/crd/bases/gateway.nginx.org_snippetsfilters.yaml b/config/crd/bases/gateway.nginx.org_snippetsfilters.yaml index 51150ef8bf..004999cb60 100644 --- a/config/crd/bases/gateway.nginx.org_snippetsfilters.yaml +++ b/config/crd/bases/gateway.nginx.org_snippetsfilters.yaml @@ -4,8 +4,6 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.16.1 - labels: - gateway.networking.k8s.io/policy: direct name: snippetsfilters.gateway.nginx.org spec: group: gateway.nginx.org @@ -28,8 +26,8 @@ spec: schema: openAPIV3Schema: description: |- - SnippetsFilter is an Direct Attached Policy. It allows inserting NGINX configuration into the - generated NGINX config for HTTPRoute, GRPCRoute and TLSRoute resources. + SnippetsFilter is a filter that allows inserting NGINX configuration into the + generated NGINX config for HTTPRoute and GRPCRoute resources. properties: apiVersion: description: |- @@ -55,7 +53,7 @@ spec: description: |- Snippets is a list of NGINX configuration snippets. There can only be one snippet per context. - Allowed contexts: http, http.server, http.server.location, stream, stream.server. + Allowed contexts: http, http.server, http.server.location. items: description: Snippet represents an NGINX configuration snippet. properties: @@ -64,14 +62,11 @@ spec: Context is the NGINX context to insert the snippet into. enum: - - main - http - http - server - http.server - location - - stream - - stream.server type: string value: description: Value is the NGINX configuration snippet. diff --git a/site/content/reference/api.md b/site/content/reference/api.md index 72e1c92e82..5fa8f81f5b 100644 --- a/site/content/reference/api.md +++ b/site/content/reference/api.md @@ -462,8 +462,8 @@ sigs.k8s.io/gateway-api/apis/v1alpha2.PolicyStatus <a class="headerlink" href="#gateway.nginx.org%2fv1alpha1.SnippetsFilter" title="Permanent link">ΒΆ</a> </h3> <p> -<p>SnippetsFilter is an Direct Attached Policy. It allows inserting NGINX configuration into the -generated NGINX config for HTTPRoute, GRPCRoute and TLSRoute resources.</p> +<p>SnippetsFilter is a filter that allows inserting NGINX configuration into the +generated NGINX config for HTTPRoute and GRPCRoute resources.</p> </p> <table class="table table-bordered table-striped"> <thead> @@ -530,7 +530,7 @@ SnippetsFilterSpec <td> <p>Snippets is a list of NGINX configuration snippets. There can only be one snippet per context. -Allowed contexts: http, http.server, http.server.location, stream, stream.server.</p> +Allowed contexts: http, http.server, http.server.location.</p> </td> </tr> </table> @@ -917,15 +917,6 @@ ControllerLogLevel </tr><tr><td><p>"http.server.location"</p></td> <td><p>NginxContextHTTPServerLocation is the location context of the NGINX configuration.</p> </td> -</tr><tr><td><p>"main"</p></td> -<td><p>NginxContextMain is the main context of the NGINX configuration.</p> -</td> -</tr><tr><td><p>"stream"</p></td> -<td><p>NginxContextStream is the stream context of the NGINX configuration.</p> -</td> -</tr><tr><td><p>"stream.server"</p></td> -<td><p>NginxContextStreamServer is the server context of the NGINX configuration.</p> -</td> </tr></tbody> </table> <h3 id="gateway.nginx.org/v1alpha1.NginxGatewayConditionReason">NginxGatewayConditionReason @@ -1283,7 +1274,7 @@ SnippetsFilter is invalid.</p> <td> <p>Snippets is a list of NGINX configuration snippets. There can only be one snippet per context. -Allowed contexts: http, http.server, http.server.location, stream, stream.server.</p> +Allowed contexts: http, http.server, http.server.location.</p> </td> </tr> </tbody>