Skip to content

Commit

Permalink
Changes Route type to ObjectReference
Browse files Browse the repository at this point in the history
  • Loading branch information
danehans committed Jan 24, 2020
1 parent a08e991 commit ebbc0a2
Show file tree
Hide file tree
Showing 5 changed files with 166 additions and 39 deletions.
4 changes: 3 additions & 1 deletion api/v1alpha1/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ type GatewaySpec struct {
//
// If undefined, this Gateway will be associated to all routes.
//
// Support: Core
//
// +optional
RouteSelector *RouteSelector `json:"routeSelector,omitempty"`
}
Expand Down Expand Up @@ -191,7 +193,7 @@ type RouteSelector struct {
// LabelSelector are associated with this Gateway.
//
// +optional
Routes []core.TypedLocalObjectReference `json:"routes"`
Routes []core.ObjectReference `json:"routes"`
// NamespaceSelector specifies a set of namespace labels used for selecting
// routes to associate with this Gateway.
//
Expand Down
6 changes: 2 additions & 4 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

177 changes: 152 additions & 25 deletions config/crd/bases/networking.x.k8s.io_gateways.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,34 +153,161 @@ spec:
type: object
type: object
type: array
routes:
description: Routes associated with this Gateway. Routes define protocol-specific
routing to backends (e.g. Services).
items:
description: TypedLocalObjectReference contains enough information
to let you locate the typed referenced object inside the same namespace.
properties:
apiGroup:
description: APIGroup is the group for the resource being referenced.
If APIGroup is not specified, the specified Kind must be in
the core API group. For any other third-party types, APIGroup
is required.
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
type: string
required:
- kind
- name
type: object
type: array
routeSelector:
description: "RouteSelector specifies routes to associate with this
Gateway. Routes define protocol-specific routing to back-ends (e.g.
Services). \n If undefined, this Gateway will be associated to all
routes."
properties:
labelSelector:
description: "LabelSelector specifies route labels for associating
routes to this Gateway. \n If undefined, the default is all routes
are associated to this Gateway. If undefined and NamespaceSelector
is defined, all routes within the NamespaceSelector namespaces
are associated to this Gateway. If LabelSelector and NamespaceSelector
are defined, only routes matching the LabelSelector labels from
NamespaceSelector namespaces are associated to this Gateway."
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the
key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a
strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
type: object
type: object
namespaceSelector:
description: "NamespaceSelector specifies a set of namespace labels
used for selecting routes to associate with this Gateway. \n If
undefined, routes from all namespaces will be associated to this
Gateway. If undefined and LabelSelector is defined, routes containing
LabelSelector labels across all namespaces are associated to this
Gateway. If NamespaceSelector and LabelSelector are defined, only
routes matching the LabelSelector labels from NamespaceSelector
namespaces are associated to this Gateway."
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the
key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a
strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
type: object
type: object
routes:
description: "Routes specifies what routes to associate with this
Gateway. If defined, NamespaceSelector and LabelSelector are ignored
and only the specified routes are associated with this Gateway.
\n If undefined, all routes or routes matching NamespaceSelector
and/or LabelSelector are associated with this Gateway."
items:
description: ObjectReference contains enough information to let
you inspect or modify the referred object.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead
of an entire object, this string should contain a valid
JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part
of an object. TODO: this design is not final and this field
is subject to change in the future.'
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
type: string
type: object
type: array
type: object
required:
- class
- listeners
- routes
type: object
status:
description: GatewayStatus defines the observed state of Gateway
Expand Down
18 changes: 9 additions & 9 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,47 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>None</loc>
<lastmod>2020-01-22</lastmod>
<lastmod>2020-01-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2020-01-22</lastmod>
<lastmod>2020-01-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2020-01-22</lastmod>
<lastmod>2020-01-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2020-01-22</lastmod>
<lastmod>2020-01-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2020-01-22</lastmod>
<lastmod>2020-01-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2020-01-22</lastmod>
<lastmod>2020-01-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2020-01-22</lastmod>
<lastmod>2020-01-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2020-01-22</lastmod>
<lastmod>2020-01-24</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2020-01-22</lastmod>
<lastmod>2020-01-24</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified docs/sitemap.xml.gz
Binary file not shown.

0 comments on commit ebbc0a2

Please sign in to comment.