Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routegroup: update CRD #7144

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 69 additions & 59 deletions cluster/manifests/01-routegroup/routegroup-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.14.0
name: routegroups.zalando.org
spec:
group: zalando.org
Expand Down Expand Up @@ -35,14 +34,19 @@ spec:
openAPIV3Schema:
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand All @@ -56,19 +60,12 @@ spec:
description: Address is required for type `network`
type: string
algorithm:
description: Algorithm is required for type `lb`. `roundRobin`
- backend is chosen by the round robin algorithm, starting
with a random selected backend to spread across all backends
from the beginning. `random` - backend is chosen at random.
`consistentHash` - backend is chosen by [consistent hashing](https://en.wikipedia.org/wiki/Consistent_hashing)
algorithm based on the request key. The request key is derived
from `X-Forwarded-For` header or request remote IP address
as the fallback. Use [`consistentHashKey`](filters.md#consistenthashkey)
filter to set the request key. Use [`consistentHashBalanceFactor`](filters.md#consistenthashbalancefactor)
to prevent popular keys from overloading a single backend
endpoint. `powerOfRandomNChoices` - backend is chosen by selecting
N random endpoints and picking the one with least outstanding
requests from them (see http://www.eecs.harvard.edu/~michaelm/postscripts/handbook2001.pdf).
description: |-
Algorithm is required for type `lb`.
`roundRobin` - backend is chosen by the round robin algorithm, starting with a random selected backend to spread across all backends from the beginning.
`random` - backend is chosen at random.
`consistentHash` - backend is chosen by [consistent hashing](https://en.wikipedia.org/wiki/Consistent_hashing) algorithm based on the request key. The request key is derived from `X-Forwarded-For` header or request remote IP address as the fallback. Use [`consistentHashKey`](filters.md#consistenthashkey) filter to set the request key. Use [`consistentHashBalanceFactor`](filters.md#consistenthashbalancefactor) to prevent popular keys from overloading a single backend endpoint.
`powerOfRandomNChoices` - backend is chosen by selecting N random endpoints and picking the one with least outstanding requests from them (see http://www.eecs.harvard.edu/~michaelm/postscripts/handbook2001.pdf).
enum:
- roundRobin
- random
Expand All @@ -92,23 +89,14 @@ spec:
description: ServicePort is required for type `service`
type: integer
type:
description: Type of the backend. `service`- resolve Kubernetes
service to the available Endpoints belonging to the Service,
and generate load balanced routes using them. `shunt` - reply
directly from the proxy itself. This can be used to shortcut,
for example have a default that replies with 404 or use skipper
as a backend serving static content in demos. `loopback` -
lookup again the routing table to a better matching route
after processing the current route. Like this you can add
some headers or change the request path for some specific
matching requests. `dynamic` - use the backend provided by
filters. This allows skipper as library users to do proxy
calls to a certain target from their own implementation dynamically
looked up by their filters. `lb` - balance the load across
multiple network endpoints using specified algorithm. If algorithm
is not specified it will use the default algorithm set by
Skipper at start. `network` - use arbitrary HTTP or HTTPS
URL.
description: |-
Type of the backend.
`service`- resolve Kubernetes service to the available Endpoints belonging to the Service, and generate load balanced routes using them.
`shunt` - reply directly from the proxy itself. This can be used to shortcut, for example have a default that replies with 404 or use skipper as a backend serving static content in demos.
`loopback` - lookup again the routing table to a better matching route after processing the current route. Like this you can add some headers or change the request path for some specific matching requests.
`dynamic` - use the backend provided by filters. This allows skipper as library users to do proxy calls to a certain target from their own implementation dynamically looked up by their filters.
`lb` - balance the load across multiple network endpoints using specified algorithm. If algorithm is not specified it will use the default algorithm set by Skipper at start.
`network` - use arbitrary HTTP or HTTPS URL.
enum:
- service
- shunt
Expand All @@ -123,18 +111,19 @@ spec:
type: object
type: array
defaultBackends:
description: DefaultBackends is a list of default backends defined
if no explicit backend is defined for a route
description: |-
DefaultBackends is a list of default backends defined if no explicit
backend is defined for a route
items:
properties:
backendName:
description: BackendName references backend by name
type: string
weight:
description: Weight defines a portion of traffic for the referenced
backend. It equals to weight divided by the sum of all backend
weights. When all references have zero (or unspecified) weight
then traffic is split equally between them.
description: |-
Weight defines a portion of traffic for the referenced backend.
It equals to weight divided by the sum of all backend weights.
When all references have zero (or unspecified) weight then traffic is split equally between them.
minimum: 0
type: integer
required:
Expand All @@ -146,27 +135,27 @@ spec:
items:
pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?([.][a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
type: string
type: array
minItems: 1
type: array
routes:
description: Routes describe how a matching HTTP request is handled
and where it is forwarded to
items:
properties:
backends:
description: RouteGroupBackendReference specifies the list of
backendReference that should be applied to override the defaultBackends
description: |-
RouteGroupBackendReference specifies the list of backendReference that should
be applied to override the defaultBackends
items:
properties:
backendName:
description: BackendName references backend by name
type: string
weight:
description: Weight defines a portion of traffic for the
referenced backend. It equals to weight divided by the
sum of all backend weights. When all references have
zero (or unspecified) weight then traffic is split equally
between them.
description: |-
Weight defines a portion of traffic for the referenced backend.
It equals to weight divided by the sum of all backend weights.
When all references have zero (or unspecified) weight then traffic is split equally between them.
minimum: 0
type: integer
required:
Expand Down Expand Up @@ -216,6 +205,32 @@ spec:
type: object
minItems: 1
type: array
tls:
description: |-
TLS defines which Kubernetes secret will be used to terminate the connection
based on the matching hostnames
items:
properties:
hosts:
description: |-
TLS hosts specify the list of hosts included in the TLS secret.
The values in this list must match the host name(s) used for
the RouteGroup in order to terminate TLS for the host(s).
items:
pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?([.][a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
type: string
minItems: 1
type: array
secretName:
description: |-
SecretName is the name of the secret used to terminate TLS traffic.
Secret should reside in the same namespace as the RouteGroup.
type: string
required:
- hosts
- secretName
type: object
type: array
required:
- backends
# {{ if eq .Cluster.ConfigItems.skipper_ingress_routegroup_crd_require_hosts "true" }}
Expand All @@ -225,7 +240,8 @@ spec:
status:
properties:
loadBalancer:
description: LoadBalancer is similar to ingress status, such that
description: |-
LoadBalancer is similar to ingress status, such that
external-dns has the same style as in ingress
properties:
routegroup:
Expand Down Expand Up @@ -255,9 +271,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []