From 8c8e17b0e7d25748b70c88d26ea61ff30d190545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Tue, 23 Jul 2024 18:09:46 +0200 Subject: [PATCH] chore: regenerate --- api/configuration/v1alpha1/kongroute_types.go | 10 +++++----- .../v1alpha1/zz_generated.deepcopy.go | 10 +++++----- docs/api-reference.md | 20 +++++++++---------- go.mod | 2 +- go.sum | 4 ++-- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/api/configuration/v1alpha1/kongroute_types.go b/api/configuration/v1alpha1/kongroute_types.go index 3d5d1a6..2fcaaef 100644 --- a/api/configuration/v1alpha1/kongroute_types.go +++ b/api/configuration/v1alpha1/kongroute_types.go @@ -88,25 +88,25 @@ type KongRouteSpec struct { // to make the code generation required for Kubernetes CRDs work. type KongRouteAPISpec struct { // A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". - Destinations []sdkkonnectgocomp.CreateRouteDestinations `json:"destinations,omitempty"` + Destinations []sdkkonnectgocomp.Destinations `json:"destinations,omitempty"` // One or more lists of values indexed by header name that will cause this Route to match if present in the request. The `Host` header cannot be used with this attribute: hosts should be specified using the `hosts` attribute. When `headers` contains only one value and that value starts with the special prefix `~*`, the value is interpreted as a regular expression. Headers map[string]string `json:"headers,omitempty"` // A list of domain names that match this Route. Note that the hosts value is case sensitive. Hosts []string `json:"hosts,omitempty"` // The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the `https` protocol. - HTTPSRedirectStatusCode *sdkkonnectgocomp.CreateRouteHTTPSRedirectStatusCode `json:"https_redirect_status_code,omitempty"` + HTTPSRedirectStatusCode *sdkkonnectgocomp.HTTPSRedirectStatusCode `json:"https_redirect_status_code,omitempty"` // A list of HTTP methods that match this Route. Methods []string `json:"methods,omitempty"` // The name of the Route. Route names must be unique, and they are case sensitive. For example, there can be two different Routes named "test" and "Test". Name *string `json:"name,omitempty"` // Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior. - PathHandling *sdkkonnectgocomp.CreateRoutePathHandling `json:"path_handling,omitempty"` + PathHandling *sdkkonnectgocomp.PathHandling `json:"path_handling,omitempty"` // A list of paths that match this Route. Paths []string `json:"paths,omitempty"` // When matching a Route via one of the `hosts` domain names, use the request `Host` header in the upstream request headers. If set to `false`, the upstream `Host` header will be that of the Service's `host`. PreserveHost *bool `json:"preserve_host,omitempty"` // An array of the protocols this Route should allow. See the [Route Object](#route-object) section for a list of accepted protocols. When set to only `"https"`, HTTP requests are answered with an upgrade error. When set to only `"http"`, HTTPS requests are answered with an error. - Protocols []sdkkonnectgocomp.CreateRouteProtocols `json:"protocols,omitempty"` + Protocols []sdkkonnectgocomp.RouteProtocols `json:"protocols,omitempty"` // A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same `regex_priority`, the older one (lowest `created_at`) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones). RegexPriority *int64 `json:"regex_priority,omitempty"` // Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding. @@ -116,7 +116,7 @@ type KongRouteAPISpec struct { // A list of SNIs that match this Route when using stream routing. Snis []string `json:"snis,omitempty"` // A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". - Sources []sdkkonnectgocomp.CreateRouteSources `json:"sources,omitempty"` + Sources []sdkkonnectgocomp.Sources `json:"sources,omitempty"` // When matching a Route via one of the `paths`, strip the matching prefix from the upstream request URL. StripPath *bool `json:"strip_path,omitempty"` // An optional set of strings associated with the Route for grouping and filtering. diff --git a/api/configuration/v1alpha1/zz_generated.deepcopy.go b/api/configuration/v1alpha1/zz_generated.deepcopy.go index e30acba..f399e79 100644 --- a/api/configuration/v1alpha1/zz_generated.deepcopy.go +++ b/api/configuration/v1alpha1/zz_generated.deepcopy.go @@ -415,7 +415,7 @@ func (in *KongRouteAPISpec) DeepCopyInto(out *KongRouteAPISpec) { *out = *in if in.Destinations != nil { in, out := &in.Destinations, &out.Destinations - *out = make([]components.CreateRouteDestinations, len(*in)) + *out = make([]components.Destinations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -434,7 +434,7 @@ func (in *KongRouteAPISpec) DeepCopyInto(out *KongRouteAPISpec) { } if in.HTTPSRedirectStatusCode != nil { in, out := &in.HTTPSRedirectStatusCode, &out.HTTPSRedirectStatusCode - *out = new(components.CreateRouteHTTPSRedirectStatusCode) + *out = new(components.HTTPSRedirectStatusCode) **out = **in } if in.Methods != nil { @@ -449,7 +449,7 @@ func (in *KongRouteAPISpec) DeepCopyInto(out *KongRouteAPISpec) { } if in.PathHandling != nil { in, out := &in.PathHandling, &out.PathHandling - *out = new(components.CreateRoutePathHandling) + *out = new(components.PathHandling) **out = **in } if in.Paths != nil { @@ -464,7 +464,7 @@ func (in *KongRouteAPISpec) DeepCopyInto(out *KongRouteAPISpec) { } if in.Protocols != nil { in, out := &in.Protocols, &out.Protocols - *out = make([]components.CreateRouteProtocols, len(*in)) + *out = make([]components.RouteProtocols, len(*in)) copy(*out, *in) } if in.RegexPriority != nil { @@ -489,7 +489,7 @@ func (in *KongRouteAPISpec) DeepCopyInto(out *KongRouteAPISpec) { } if in.Sources != nil { in, out := &in.Sources, &out.Sources - *out = make([]components.CreateRouteSources, len(*in)) + *out = make([]components.Sources, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/docs/api-reference.md b/docs/api-reference.md index f1112f5..6e399d1 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -600,21 +600,21 @@ to make the code generation required for Kubernetes CRDs work. | Field | Description | | --- | --- | -| `destinations` _CreateRouteDestinations array_ | A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | +| `destinations` _Destinations array_ | A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | | `headers` _object (keys:string, values:string)_ | One or more lists of values indexed by header name that will cause this Route to match if present in the request. The `Host` header cannot be used with this attribute: hosts should be specified using the `hosts` attribute. When `headers` contains only one value and that value starts with the special prefix `~*`, the value is interpreted as a regular expression. | | `hosts` _string array_ | A list of domain names that match this Route. Note that the hosts value is case sensitive. | -| `https_redirect_status_code` _[CreateRouteHTTPSRedirectStatusCode](#createroutehttpsredirectstatuscode)_ | The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the `https` protocol. | +| `https_redirect_status_code` _[HTTPSRedirectStatusCode](#httpsredirectstatuscode)_ | The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the `https` protocol. | | `methods` _string array_ | A list of HTTP methods that match this Route. | | `name` _string_ | The name of the Route. Route names must be unique, and they are case sensitive. For example, there can be two different Routes named "test" and "Test". | -| `path_handling` _[CreateRoutePathHandling](#createroutepathhandling)_ | Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior. | +| `path_handling` _[PathHandling](#pathhandling)_ | Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior. | | `paths` _string array_ | A list of paths that match this Route. | | `preserve_host` _boolean_ | When matching a Route via one of the `hosts` domain names, use the request `Host` header in the upstream request headers. If set to `false`, the upstream `Host` header will be that of the Service's `host`. | -| `protocols` _CreateRouteProtocols array_ | An array of the protocols this Route should allow. See the [Route Object](#route-object) section for a list of accepted protocols. When set to only `"https"`, HTTP requests are answered with an upgrade error. When set to only `"http"`, HTTPS requests are answered with an error. | +| `protocols` _RouteProtocols array_ | An array of the protocols this Route should allow. See the [Route Object](#route-object) section for a list of accepted protocols. When set to only `"https"`, HTTP requests are answered with an upgrade error. When set to only `"http"`, HTTPS requests are answered with an error. | | `regex_priority` _integer_ | A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same `regex_priority`, the older one (lowest `created_at`) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones). | | `request_buffering` _boolean_ | Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding. | | `response_buffering` _boolean_ | Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding. | | `snis` _string array_ | A list of SNIs that match this Route when using stream routing. | -| `sources` _CreateRouteSources array_ | A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | +| `sources` _Sources array_ | A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | | `strip_path` _boolean_ | When matching a Route via one of the `paths`, strip the matching prefix from the upstream request URL. | | `tags` _string array_ | An optional set of strings associated with the Route for grouping and filtering. | @@ -634,21 +634,21 @@ KongRouteSpec defines specification of a Kong Route. | `controlPlaneRef` _[ControlPlaneRef](#controlplaneref)_ | ControlPlaneRef is a reference to a ControlPlane this Route is associated with. | | `serviceRef` _[ServiceRef](#serviceref)_ | ServiceRef is a reference to a Service this Route is associated with. | | `konnect` _[KonnectConfiguration](#konnectconfiguration)_ | KonnectConfiguration holds the Konnect configuration like authentication configuration. | -| `destinations` _CreateRouteDestinations array_ | A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | +| `destinations` _Destinations array_ | A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | | `headers` _object (keys:string, values:string)_ | One or more lists of values indexed by header name that will cause this Route to match if present in the request. The `Host` header cannot be used with this attribute: hosts should be specified using the `hosts` attribute. When `headers` contains only one value and that value starts with the special prefix `~*`, the value is interpreted as a regular expression. | | `hosts` _string array_ | A list of domain names that match this Route. Note that the hosts value is case sensitive. | -| `https_redirect_status_code` _[CreateRouteHTTPSRedirectStatusCode](#createroutehttpsredirectstatuscode)_ | The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the `https` protocol. | +| `https_redirect_status_code` _[HTTPSRedirectStatusCode](#httpsredirectstatuscode)_ | The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if the field is set to 301, 302, 307 or 308. Note: This config applies only if the Route is configured to only accept the `https` protocol. | | `methods` _string array_ | A list of HTTP methods that match this Route. | | `name` _string_ | The name of the Route. Route names must be unique, and they are case sensitive. For example, there can be two different Routes named "test" and "Test". | -| `path_handling` _[CreateRoutePathHandling](#createroutepathhandling)_ | Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior. | +| `path_handling` _[PathHandling](#pathhandling)_ | Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior. | | `paths` _string array_ | A list of paths that match this Route. | | `preserve_host` _boolean_ | When matching a Route via one of the `hosts` domain names, use the request `Host` header in the upstream request headers. If set to `false`, the upstream `Host` header will be that of the Service's `host`. | -| `protocols` _CreateRouteProtocols array_ | An array of the protocols this Route should allow. See the [Route Object](#route-object) section for a list of accepted protocols. When set to only `"https"`, HTTP requests are answered with an upgrade error. When set to only `"http"`, HTTPS requests are answered with an error. | +| `protocols` _RouteProtocols array_ | An array of the protocols this Route should allow. See the [Route Object](#route-object) section for a list of accepted protocols. When set to only `"https"`, HTTP requests are answered with an upgrade error. When set to only `"http"`, HTTPS requests are answered with an error. | | `regex_priority` _integer_ | A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same `regex_priority`, the older one (lowest `created_at`) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones). | | `request_buffering` _boolean_ | Whether to enable request body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that receive data with chunked transfer encoding. | | `response_buffering` _boolean_ | Whether to enable response body buffering or not. With HTTP 1.1, it may make sense to turn this off on services that send data with chunked transfer encoding. | | `snis` _string array_ | A list of SNIs that match this Route when using stream routing. | -| `sources` _CreateRouteSources array_ | A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | +| `sources` _Sources array_ | A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields "ip" (optionally in CIDR range notation) and/or "port". | | `strip_path` _boolean_ | When matching a Route via one of the `paths`, strip the matching prefix from the upstream request URL. | | `tags` _string array_ | An optional set of strings associated with the Route for grouping and filtering. | diff --git a/go.mod b/go.mod index bb0bd7e..adab643 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/kong/kubernetes-configuration go 1.22.4 require ( - github.com/Kong/sdk-konnect-go v0.0.0-20240710152204-959c7a212f74 + github.com/Kong/sdk-konnect-go v0.0.0-20240723160412-999d9a987e1a github.com/kong/go-kong v0.57.0 k8s.io/api v0.30.2 k8s.io/apiextensions-apiserver v0.30.2 diff --git a/go.sum b/go.sum index 582822c..0a6c003 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/Kong/sdk-konnect-go v0.0.0-20240710152204-959c7a212f74 h1:8Q5EOCmKqZIdeaCraMPPUK7rS3YXiJkd1GKrURZfPME= -github.com/Kong/sdk-konnect-go v0.0.0-20240710152204-959c7a212f74/go.mod h1:75YzLhfnYfmCvBJgkafzVuREwBAec2/jihCW2fyn6hY= +github.com/Kong/sdk-konnect-go v0.0.0-20240723160412-999d9a987e1a h1:0mQhPVVA2/+uTVmoKrEIGf+0eTrNyr80Ssv1zGs/1Lk= +github.com/Kong/sdk-konnect-go v0.0.0-20240723160412-999d9a987e1a/go.mod h1:ipu67aQNnwDzu/LXKePG46cVqkkZnAHKWpsbhTEI8xE= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=