Skip to content

Commit 1ca96ef

Browse files
committed
update based on reviews
1 parent 67125be commit 1ca96ef

File tree

4 files changed

+163
-141
lines changed

4 files changed

+163
-141
lines changed

apis/v1alpha1/snippetsfilter_types.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ type Snippet struct {
4141
Value string `json:"value"`
4242
}
4343

44+
// SnippetsFilterList contains a list of Snippets.
45+
type SnippetsFilterList struct {
46+
metav1.TypeMeta `json:",inline"`
47+
metav1.ListMeta `json:"metadata,omitempty"`
48+
Items []Snippet `json:"items"`
49+
}
50+
4451
// SnippetsFilterStatus defines the state of SnippetsFilter.
4552
type SnippetsFilterStatus struct {
4653
// Conditions describes the state of the SnippetsFilter.
@@ -80,7 +87,7 @@ const (
8087

8188
// NginxContext represents the NGINX configuration context.
8289
//
83-
// +kubebuilder:validation:Enum=http;http;server;http.server;location;
90+
// +kubebuilder:validation:Enum=http;http.server;http.server.location;
8491
type NginxContext string
8592

8693
const (

apis/v1alpha1/zz_generated.deepcopy.go

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/gateway.nginx.org_snippetsfilters.yaml

+133-137
Original file line numberDiff line numberDiff line change
@@ -3,152 +3,148 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.16.2
77
name: snippetsfilters.gateway.nginx.org
88
spec:
99
group: gateway.nginx.org
1010
names:
1111
categories:
12-
- nginx-gateway-fabric
12+
- nginx-gateway-fabric
1313
kind: SnippetsFilter
1414
listKind: SnippetsFilterList
1515
plural: snippetsfilters
1616
shortNames:
17-
- snippetsfilter
17+
- snippetsfilter
1818
singular: snippetsfilter
1919
scope: Namespaced
2020
versions:
21-
- additionalPrinterColumns:
22-
- jsonPath: .metadata.creationTimestamp
23-
name: Age
24-
type: date
25-
name: v1alpha1
26-
schema:
27-
openAPIV3Schema:
28-
description: |-
29-
SnippetsFilter is a filter that allows inserting NGINX configuration into the
30-
generated NGINX config for HTTPRoute and GRPCRoute resources.
31-
properties:
32-
apiVersion:
33-
description: |-
34-
APIVersion defines the versioned schema of this representation of an object.
35-
Servers should convert recognized schemas to the latest internal value, and
36-
may reject unrecognized values.
37-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
38-
type: string
39-
kind:
40-
description: |-
41-
Kind is a string value representing the REST resource this object represents.
42-
Servers may infer this from the endpoint the client submits requests to.
43-
Cannot be updated.
44-
In CamelCase.
45-
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
46-
type: string
47-
metadata:
48-
type: object
49-
spec:
50-
description: Spec defines the desired state of the SnippetsFilter.
51-
properties:
52-
snippets:
53-
description: |-
54-
Snippets is a list of NGINX configuration snippets.
55-
There can only be one snippet per context.
56-
Allowed contexts: http, http.server, http.server.location.
57-
items:
58-
description: Snippet represents an NGINX configuration snippet.
59-
properties:
60-
context:
61-
description:
62-
Context is the NGINX context to insert the snippet
63-
into.
64-
enum:
65-
- http
66-
- http
67-
- server
68-
- http.server
69-
- location
70-
type: string
71-
value:
72-
description: Value is the NGINX configuration snippet.
73-
type: string
74-
required:
75-
- context
76-
- value
77-
type: object
78-
type: array
79-
required:
80-
- snippets
81-
type: object
82-
status:
83-
description: Status defines the state of the SnippetsFilter.
84-
properties:
85-
conditions:
86-
description: Conditions describes the state of the SnippetsFilter.
87-
items:
88-
description:
89-
Condition contains details for one aspect of the current
90-
state of this API Resource.
91-
properties:
92-
lastTransitionTime:
93-
description: |-
94-
lastTransitionTime is the last time the condition transitioned from one status to another.
95-
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
96-
format: date-time
97-
type: string
98-
message:
99-
description: |-
100-
message is a human readable message indicating details about the transition.
101-
This may be an empty string.
102-
maxLength: 32768
103-
type: string
104-
observedGeneration:
105-
description: |-
106-
observedGeneration represents the .metadata.generation that the condition was set based upon.
107-
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
108-
with respect to the current state of the instance.
109-
format: int64
110-
minimum: 0
111-
type: integer
112-
reason:
113-
description: |-
114-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
115-
Producers of specific condition types may define expected values and meanings for this field,
116-
and whether the values are considered a guaranteed API.
117-
The value should be a CamelCase string.
118-
This field may not be empty.
119-
maxLength: 1024
120-
minLength: 1
121-
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
122-
type: string
123-
status:
124-
description: status of the condition, one of True, False, Unknown.
125-
enum:
126-
- "True"
127-
- "False"
128-
- Unknown
129-
type: string
130-
type:
131-
description: type of condition in CamelCase or in foo.example.com/CamelCase.
132-
maxLength: 316
133-
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
134-
type: string
135-
required:
136-
- lastTransitionTime
137-
- message
138-
- reason
139-
- status
140-
- type
141-
type: object
142-
maxItems: 8
143-
type: array
144-
x-kubernetes-list-map-keys:
145-
- type
146-
x-kubernetes-list-type: map
147-
type: object
148-
required:
149-
- spec
150-
type: object
151-
served: true
152-
storage: true
153-
subresources:
154-
status: {}
21+
- additionalPrinterColumns:
22+
- jsonPath: .metadata.creationTimestamp
23+
name: Age
24+
type: date
25+
name: v1alpha1
26+
schema:
27+
openAPIV3Schema:
28+
description: |-
29+
SnippetsFilter is a filter that allows inserting NGINX configuration into the
30+
generated NGINX config for HTTPRoute and GRPCRoute resources.
31+
properties:
32+
apiVersion:
33+
description: |-
34+
APIVersion defines the versioned schema of this representation of an object.
35+
Servers should convert recognized schemas to the latest internal value, and
36+
may reject unrecognized values.
37+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
38+
type: string
39+
kind:
40+
description: |-
41+
Kind is a string value representing the REST resource this object represents.
42+
Servers may infer this from the endpoint the client submits requests to.
43+
Cannot be updated.
44+
In CamelCase.
45+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
46+
type: string
47+
metadata:
48+
type: object
49+
spec:
50+
description: Spec defines the desired state of the SnippetsFilter.
51+
properties:
52+
snippets:
53+
description: |-
54+
Snippets is a list of NGINX configuration snippets.
55+
There can only be one snippet per context.
56+
Allowed contexts: http, http.server, http.server.location.
57+
items:
58+
description: Snippet represents an NGINX configuration snippet.
59+
properties:
60+
context:
61+
description: Context is the NGINX context to insert the snippet
62+
into.
63+
enum:
64+
- http
65+
- http.server
66+
- http.server.location
67+
type: string
68+
value:
69+
description: Value is the NGINX configuration snippet.
70+
type: string
71+
required:
72+
- context
73+
- value
74+
type: object
75+
type: array
76+
required:
77+
- snippets
78+
type: object
79+
status:
80+
description: Status defines the state of the SnippetsFilter.
81+
properties:
82+
conditions:
83+
description: Conditions describes the state of the SnippetsFilter.
84+
items:
85+
description: Condition contains details for one aspect of the current
86+
state of this API Resource.
87+
properties:
88+
lastTransitionTime:
89+
description: |-
90+
lastTransitionTime is the last time the condition transitioned from one status to another.
91+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
92+
format: date-time
93+
type: string
94+
message:
95+
description: |-
96+
message is a human readable message indicating details about the transition.
97+
This may be an empty string.
98+
maxLength: 32768
99+
type: string
100+
observedGeneration:
101+
description: |-
102+
observedGeneration represents the .metadata.generation that the condition was set based upon.
103+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
104+
with respect to the current state of the instance.
105+
format: int64
106+
minimum: 0
107+
type: integer
108+
reason:
109+
description: |-
110+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
111+
Producers of specific condition types may define expected values and meanings for this field,
112+
and whether the values are considered a guaranteed API.
113+
The value should be a CamelCase string.
114+
This field may not be empty.
115+
maxLength: 1024
116+
minLength: 1
117+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
118+
type: string
119+
status:
120+
description: status of the condition, one of True, False, Unknown.
121+
enum:
122+
- "True"
123+
- "False"
124+
- Unknown
125+
type: string
126+
type:
127+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
128+
maxLength: 316
129+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
130+
type: string
131+
required:
132+
- lastTransitionTime
133+
- message
134+
- reason
135+
- status
136+
- type
137+
type: object
138+
maxItems: 8
139+
type: array
140+
x-kubernetes-list-map-keys:
141+
- type
142+
x-kubernetes-list-type: map
143+
type: object
144+
required:
145+
- spec
146+
type: object
147+
served: true
148+
storage: true
149+
subresources:
150+
status: {}

site/content/reference/api.md

-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,8 @@ title: "API reference"
33
weight: 100
44
toc: false
55
---
6-
76
## Overview
8-
97
NGINX Gateway API Reference
10-
118
<p>Packages:</p>
129
<ul>
1310
<li>

0 commit comments

Comments
 (0)