Skip to content

Commit 590b7c1

Browse files
committed
chore(build): Clean up excessive warnings from "make generate"
Signed-off-by: Flynn <[email protected]>
1 parent 180e20f commit 590b7c1

File tree

10 files changed

+14
-861
lines changed

10 files changed

+14
-861
lines changed

apis/v1alpha2/object_reference_types.go

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,43 +18,8 @@ package v1alpha2
1818

1919
import v1 "sigs.k8s.io/gateway-api/apis/v1"
2020

21-
// LocalObjectReference identifies an API object within the namespace of the
22-
// referrer.
23-
// The API object must be valid in the cluster; the Group and Kind must
24-
// be registered in the cluster for this reference to be valid.
25-
//
26-
// References to objects with invalid Group and Kind are not valid, and must
27-
// be rejected by the implementation, with appropriate Conditions set
28-
// on the containing object.
29-
// +k8s:deepcopy-gen=false
3021
type LocalObjectReference = v1.LocalObjectReference
3122

32-
// SecretObjectReference identifies an API object including its namespace,
33-
// defaulting to Secret.
34-
//
35-
// The API object must be valid in the cluster; the Group and Kind must
36-
// be registered in the cluster for this reference to be valid.
37-
//
38-
// References to objects with invalid Group and Kind are not valid, and must
39-
// be rejected by the implementation, with appropriate Conditions set
40-
// on the containing object.
41-
// +k8s:deepcopy-gen=false
4223
type SecretObjectReference = v1.SecretObjectReference
4324

44-
// BackendObjectReference defines how an ObjectReference that is
45-
// specific to BackendRef. It includes a few additional fields and features
46-
// than a regular ObjectReference.
47-
//
48-
// Note that when a namespace different than the local namespace is specified, a
49-
// ReferenceGrant object is required in the referent namespace to allow that
50-
// namespace's owner to accept the reference. See the ReferenceGrant
51-
// documentation for details.
52-
//
53-
// The API object must be valid in the cluster; the Group and Kind must
54-
// be registered in the cluster for this reference to be valid.
55-
//
56-
// References to objects with invalid Group and Kind are not valid, and must
57-
// be rejected by the implementation, with appropriate Conditions set
58-
// on the containing object.
59-
// +k8s:deepcopy-gen=false
6025
type BackendObjectReference = v1.BackendObjectReference

apis/v1alpha2/referencegrant_types.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,8 @@ type ReferenceGrantList struct {
5959
Items []ReferenceGrant `json:"items"`
6060
}
6161

62-
// ReferenceGrantSpec identifies a cross namespace relationship that is trusted
63-
// for Gateway API.
64-
// +k8s:deepcopy-gen=false
6562
type ReferenceGrantSpec = v1beta1.ReferenceGrantSpec
6663

67-
// ReferenceGrantFrom describes trusted namespaces and kinds.
68-
// +k8s:deepcopy-gen=false
6964
type ReferenceGrantFrom = v1beta1.ReferenceGrantFrom
7065

71-
// ReferenceGrantTo describes what Kinds are allowed as targets of the
72-
// references.
73-
// +k8s:deepcopy-gen=false
7466
type ReferenceGrantTo = v1beta1.ReferenceGrantTo

apis/v1alpha2/shared_types.go

Lines changed: 0 additions & 231 deletions
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,11 @@ package v1alpha2
1818

1919
import v1 "sigs.k8s.io/gateway-api/apis/v1"
2020

21-
// ParentReference identifies an API object (usually a Gateway) that can be considered
22-
// a parent of this resource (usually a route). The only kind of parent resource
23-
// with "Core" support is Gateway. This API may be extended in the future to
24-
// support additional kinds of parent resources, such as HTTPRoute.
25-
//
26-
// Note that there are specific rules for ParentRefs which cross namespace
27-
// boundaries. Cross-namespace references are only valid if they are explicitly
28-
// allowed by something in the namespace they are referring to. For example:
29-
// Gateway has the AllowedRoutes field, and ReferenceGrant provides a
30-
// generic way to enable any other kind of cross-namespace reference.
31-
//
32-
// The API object must be valid in the cluster; the Group and Kind must
33-
// be registered in the cluster for this reference to be valid.
34-
// +k8s:deepcopy-gen=false
3521
type ParentReference = v1.ParentReference
36-
37-
// CommonRouteSpec defines the common attributes that all Routes MUST include
38-
// within their spec.
39-
// +k8s:deepcopy-gen=false
4022
type CommonRouteSpec = v1.CommonRouteSpec
41-
42-
// PortNumber defines a network port.
4323
type PortNumber = v1.PortNumber
44-
45-
// BackendRef defines how a Route should forward a request to a Kubernetes
46-
// resource.
47-
//
48-
// Note that when a namespace different than the local namespace is specified, a
49-
// ReferenceGrant object is required in the referent namespace to allow that
50-
// namespace's owner to accept the reference. See the ReferenceGrant
51-
// documentation for details.
52-
// +k8s:deepcopy-gen=false
5324
type BackendRef = v1.BackendRef
54-
55-
// RouteConditionType is a type of condition for a route.
5625
type RouteConditionType = v1.RouteConditionType
57-
58-
// RouteConditionReason is a reason for a route condition.
5926
type RouteConditionReason = v1.RouteConditionReason
6027

6128
const (
@@ -140,214 +107,19 @@ const (
140107
RouteReasonBackendNotFound RouteConditionReason = "BackendNotFound"
141108
)
142109

143-
// RouteParentStatus describes the status of a route with respect to an
144-
// associated Parent.
145-
// +k8s:deepcopy-gen=false
146110
type RouteParentStatus = v1.RouteParentStatus
147-
148-
// RouteStatus defines the common attributes that all Routes MUST include within
149-
// their status.
150-
// +k8s:deepcopy-gen=false
151111
type RouteStatus = v1.RouteStatus
152-
153-
// Hostname is the fully qualified domain name of a network host. This matches
154-
// the RFC 1123 definition of a hostname with 2 notable exceptions:
155-
//
156-
// 1. IPs are not allowed.
157-
// 2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
158-
// label must appear by itself as the first label.
159-
//
160-
// Hostname can be "precise" which is a domain name without the terminating
161-
// dot of a network host (e.g. "foo.example.com") or "wildcard", which is a
162-
// domain name prefixed with a single wildcard label (e.g. `*.example.com`).
163-
//
164-
// Note that as per RFC1035 and RFC1123, a *label* must consist of lower case
165-
// alphanumeric characters or '-', and must start and end with an alphanumeric
166-
// character. No other punctuation is allowed.
167-
//
168-
// +kubebuilder:validation:MinLength=1
169-
// +kubebuilder:validation:MaxLength=253
170-
// +kubebuilder:validation:Pattern=`^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
171112
type Hostname = v1.Hostname
172-
173-
// PreciseHostname is the fully qualified domain name of a network host. This
174-
// matches the RFC 1123 definition of a hostname with 1 notable exception that
175-
// numeric IP addresses are not allowed.
176-
//
177-
// Note that as per RFC1035 and RFC1123, a *label* must consist of lower case
178-
// alphanumeric characters or '-', and must start and end with an alphanumeric
179-
// character. No other punctuation is allowed.
180-
//
181-
// +kubebuilder:validation:MinLength=1
182-
// +kubebuilder:validation:MaxLength=253
183-
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
184113
type PreciseHostname = v1.PreciseHostname
185-
186-
// Group refers to a Kubernetes Group. It must either be an empty string or a
187-
// RFC 1123 subdomain.
188-
//
189-
// This validation is based off of the corresponding Kubernetes validation:
190-
// https://github.com/kubernetes/apimachinery/blob/02cfb53916346d085a6c6c7c66f882e3c6b0eca6/pkg/util/validation/validation.go#L208
191-
//
192-
// Valid values include:
193-
//
194-
// * "" - empty string implies core Kubernetes API group
195-
// * "networking.k8s.io"
196-
// * "foo.example.com"
197-
//
198-
// Invalid values include:
199-
//
200-
// * "example.com/bar" - "/" is an invalid character
201-
//
202-
// +kubebuilder:validation:MaxLength=253
203-
// +kubebuilder:validation:Pattern=`^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
204114
type Group = v1.Group
205-
206-
// Kind refers to a Kubernetes Kind.
207-
//
208-
// Valid values include:
209-
//
210-
// * "Service"
211-
// * "HTTPRoute"
212-
//
213-
// Invalid values include:
214-
//
215-
// * "invalid/kind" - "/" is an invalid character
216-
//
217-
// +kubebuilder:validation:MinLength=1
218-
// +kubebuilder:validation:MaxLength=63
219-
// +kubebuilder:validation:Pattern=`^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$`
220115
type Kind = v1.Kind
221-
222-
// ObjectName refers to the name of a Kubernetes object.
223-
// Object names can have a variety of forms, including RFC1123 subdomains,
224-
// RFC 1123 labels, or RFC 1035 labels.
225-
//
226-
// +kubebuilder:validation:MinLength=1
227-
// +kubebuilder:validation:MaxLength=253
228116
type ObjectName = v1.ObjectName
229-
230-
// Namespace refers to a Kubernetes namespace. It must be a RFC 1123 label.
231-
//
232-
// This validation is based off of the corresponding Kubernetes validation:
233-
// https://github.com/kubernetes/apimachinery/blob/02cfb53916346d085a6c6c7c66f882e3c6b0eca6/pkg/util/validation/validation.go#L187
234-
//
235-
// This is used for Namespace name validation here:
236-
// https://github.com/kubernetes/apimachinery/blob/02cfb53916346d085a6c6c7c66f882e3c6b0eca6/pkg/api/validation/generic.go#L63
237-
//
238-
// Valid values include:
239-
//
240-
// * "example"
241-
//
242-
// Invalid values include:
243-
//
244-
// * "example.com" - "." is an invalid character
245-
//
246-
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
247-
// +kubebuilder:validation:MinLength=1
248-
// +kubebuilder:validation:MaxLength=63
249117
type Namespace = v1.Namespace
250-
251-
// SectionName is the name of a section in a Kubernetes resource.
252-
//
253-
// In the following resources, SectionName is interpreted as the following:
254-
//
255-
// * Gateway: Listener name
256-
// * HTTPRoute: HTTPRouteRule name
257-
// * Service: Port name
258-
//
259-
// Section names can have a variety of forms, including RFC 1123 subdomains,
260-
// RFC 1123 labels, or RFC 1035 labels.
261-
//
262-
// This validation is based off of the corresponding Kubernetes validation:
263-
// https://github.com/kubernetes/apimachinery/blob/02cfb53916346d085a6c6c7c66f882e3c6b0eca6/pkg/util/validation/validation.go#L208
264-
//
265-
// Valid values include:
266-
//
267-
// * "example"
268-
// * "foo-example"
269-
// * "example.com"
270-
// * "foo.example.com"
271-
//
272-
// Invalid values include:
273-
//
274-
// * "example.com/bar" - "/" is an invalid character
275-
//
276-
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
277-
// +kubebuilder:validation:MinLength=1
278-
// +kubebuilder:validation:MaxLength=253
279118
type SectionName = v1.SectionName
280-
281-
// GatewayController is the name of a Gateway API controller. It must be a
282-
// domain prefixed path.
283-
//
284-
// Valid values include:
285-
//
286-
// * "example.com/bar"
287-
//
288-
// Invalid values include:
289-
//
290-
// * "example.com" - must include path
291-
// * "foo.example.com" - must include path
292-
//
293-
// +kubebuilder:validation:MinLength=1
294-
// +kubebuilder:validation:MaxLength=253
295-
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$`
296119
type GatewayController = v1.GatewayController
297-
298-
// AnnotationKey is the key of an annotation in Gateway API. This is used for
299-
// validation of maps such as TLS options. This matches the Kubernetes
300-
// "qualified name" validation that is used for annotations and other common
301-
// values.
302-
//
303-
// Valid values include:
304-
//
305-
// * example
306-
// * example.com
307-
// * example.com/path
308-
// * example.com/path.html
309-
//
310-
// Invalid values include:
311-
//
312-
// * example~ - "~" is an invalid character
313-
// * example.com. - cannot start or end with "."
314-
//
315-
// +kubebuilder:validation:MinLength=1
316-
// +kubebuilder:validation:MaxLength=253
317-
// +kubebuilder:validation:Pattern=`^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]/?)*$`
318120
type AnnotationKey = v1.AnnotationKey
319-
320-
// AnnotationValue is the value of an annotation in Gateway API. This is used
321-
// for validation of maps such as TLS options. This roughly matches Kubernetes
322-
// annotation validation, although the length validation in that case is based
323-
// on the entire size of the annotations struct.
324-
//
325-
// +kubebuilder:validation:MinLength=0
326-
// +kubebuilder:validation:MaxLength=4096
327121
type AnnotationValue = v1.AnnotationValue
328-
329-
// AddressType defines how a network address is represented as a text string.
330-
// This may take two possible forms:
331-
//
332-
// * A predefined CamelCase string identifier (currently limited to `IPAddress` or `Hostname`)
333-
// * A domain-prefixed string identifier (like `acme.io/CustomAddressType`)
334-
//
335-
// Values `IPAddress` and `Hostname` have Extended support.
336-
//
337-
// The `NamedAddress` value has been deprecated in favor of implementation
338-
// specific domain-prefixed strings.
339-
//
340-
// All other values, including domain-prefixed values have Implementation-specific support,
341-
// which are used in implementation-specific behaviors. Support for additional
342-
// predefined CamelCase identifiers may be added in future releases.
343-
//
344-
// +kubebuilder:validation:MinLength=1
345-
// +kubebuilder:validation:MaxLength=253
346-
// +kubebuilder:validation:Pattern=`^Hostname|IPAddress|NamedAddress|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$`
347122
type AddressType = v1.AddressType
348-
349-
// Duration is a string value representing a duration in time. The format is as specified
350-
// in GEP-2257, a strict subset of the syntax parsed by Golang time.ParseDuration.
351123
type Duration = v1.Duration
352124

353125
const (
@@ -382,7 +154,4 @@ const (
382154
NamedAddressType AddressType = "NamedAddress"
383155
)
384156

385-
// SessionPersistence defines the desired state of
386-
// SessionPersistence.
387-
// +k8s:deepcopy-gen=false
388157
type SessionPersistence = v1.SessionPersistence

0 commit comments

Comments
 (0)