Skip to content

Instantly share code, notes, and snippets.

@akutz
Created August 11, 2020 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akutz/00548630504e2cbc610efb71af4a9623 to your computer and use it in GitHub Desktop.
Save akutz/00548630504e2cbc610efb71af4a9623 to your computer and use it in GitHub Desktop.
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.2.4
creationTimestamp: null
name: gatewayclasses.networking.x-k8s.io
spec:
group: networking.x-k8s.io
names:
kind: GatewayClass
listKind: GatewayClassList
plural: gatewayclasses
singular: gatewayclass
scope: Cluster
versions:
- name: v1alpha0
schema:
openAPIV3Schema:
description: "GatewayClass describes a class of Gateways available to the
user for creating Gateway resources. \n GatewayClass is a Cluster level
resource. \n Support: Core."
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'
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'
type: string
metadata:
type: object
spec:
description: Spec for this GatewayClass.
properties:
allowedGatewayNamespaces:
description: "AllowedGatewayNamespaces is a selector of namespaces
that Gateways can use this GatewayClass from. This is a standard
Kubernetes LabelSelector, a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. Controllers
must not support Gateways in namespaces outside this selector. \n
An empty selector (default) indicates that Gateways can use this
GatewayClass from any namespace. This field is intentionally not
a pointer because the nil behavior (no namespaces) is undesirable
here. \n Support: Core"
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
allowedRouteNamespaces:
description: "AllowedRouteNamespaces is a selector of namespaces that
Gateways of this class can reference Routes in. This is a standard
Kubernetes LabelSelector, a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. Controllers
must not support Routes in namespaces outside this selector. \n
A nil selector (default) indicates that Gateways of this class can
reference Routes within the same namespace. An empty selector indicates
that Gateways can reference Routes in any namespace. This field
is intentionally a pointer to support the nil behavior (only local
Routes allowed). \n Support: Core"
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
controller:
description: "Controller is a domain/path string that indicates the
controller that managing Gateways of this class. \n Example: \"acme.io/gateway-controller\".
\n This field is not mutable and cannot be empty. \n The format
of this field is DOMAIN \"/\" PATH, where DOMAIN and PATH are valid
Kubernetes names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
\n Support: Core"
type: string
parametersRef:
description: "ParametersRef is a controller specific resource containing
the configuration parameters corresponding to this class. This is
optional if the controller does not require any additional configuration.
\n Valid resources for reference are up to the Controller. Examples
include \"configmaps\" (omit or specify the empty string for the
group to indicate the core API group) or a custom resource (CRD).
\ Omitting or specifying the empty string for both the resource
and group indicates that the resource is \"configmaps\". If the
referent cannot be found, the GatewayClass's \"InvalidParameters\"
status condition will be true. \n Support: Custom"
properties:
group:
description: "Group is the group of the referent. Omitting the
value or specifying the empty string indicates the core API
group. For example, use the following to specify a service:
\n fooRef: resource: services name: myservice \n Otherwise,
if the core API group is not desired, specify the desired group:
\n fooRef: group: acme.io resource: foos name: myfoo"
type: string
name:
description: Name is the name of the referent.
type: string
resource:
description: Resource is the resource of the referent.
type: string
required:
- name
- resource
type: object
required:
- controller
type: object
status:
default:
conditions:
- status: Unknown
type: InvalidParameters
description: Status of the GatewayClass.
properties:
conditions:
default:
- status: Unknown
type: InvalidParameters
description: Conditions is the current status from the controller
for this GatewayClass.
items:
description: "GatewayClassCondition contains the details for the
current condition of this GatewayClass. \n Support: Core, unless
otherwise specified."
properties:
lastTransitionTime:
description: LastTransitionTime is the time of the last change
to this condition.
format: date-time
type: string
message:
description: Message is a human readable reason for last transition.
type: string
reason:
description: "Reason is a machine consumable string for the
last transition. It should be a one-word, CamelCase string.
Reason will be defined by the controller. \n Support: Custom;
values will be controller-specific."
type: string
status:
description: Status of this condition.
type: string
type:
description: Type of this condition.
type: string
required:
- status
- type
type: object
type: array
type: object
type: object
served: true
storage: false
subresources:
status: {}
- name: v1alpha1pre1
schema:
openAPIV3Schema:
description: "GatewayClass describes a class of Gateways available to the
user for creating Gateway resources. \n GatewayClass is a Cluster level
resource. \n Support: Core."
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'
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'
type: string
metadata:
type: object
spec:
description: Spec for this GatewayClass.
properties:
allowedGatewayNamespaceSelector:
description: "AllowedGatewayNamespaceSelector is a selector of namespaces
that Gateways can use this GatewayClass from. This is a standard
Kubernetes LabelSelector, a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. Controllers
must not support Gateways in namespaces outside this selector. \n
An empty selector (default) indicates that Gateways can use this
GatewayClass from any namespace. \n When a Gateway attempts to use
this class from a namespace that is not allowed by this selector,
the controller implementing the GatewayClass may add a new \"ForbiddenNamespaceForClass\"
condition to the Gateway status. Adding this condition is considered
optional since not all controllers will have access to all namespaces.
\n Support: Core"
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
allowedRouteNamespaces:
default:
onlySameNamespace: true
description: "AllowedRouteNamespaces indicates in which namespaces
Routes can be selected for Gateways of this class. This is restricted
to the namespace of the Gateway by default. \n When any Routes are
selected by a Gateway in a namespace that is not allowed by this
selector, the controller implementing the GatewayClass may add a
new \"ForbiddenRoutesForClass\" condition to the Gateway status.
Adding this condition is considered optional since not all controllers
will have access to all namespaces. \n Support: Core"
properties:
namespaceSelector:
description: "NamespaceSelector is a selector of namespaces that
Routes should be selected from. This is a standard Kubernetes
LabelSelector, a label query over a set of resources. The result
of matchLabels and matchExpressions are ANDed. Controllers must
not support Routes in namespaces outside this selector. \n An
empty selector (default) indicates that Routes in any namespace
can be selected. \n The OnlySameNamespace field takes precedence
over this field. This selector will only take effect when OnlySameNamespace
is false. \n Support: Core"
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
onlySameNamespace:
default: true
description: "OnlySameNamespace is a boolean used to indicate
if Route references are limited to the same Namespace as the
Gateway. When true, only Routes within the same Namespace as
the Gateway should be selected. \n This field takes precedence
over the NamespaceSelector field. That selector should only
take effect when this field is set to false. \n Support: Core"
type: boolean
type: object
controller:
description: "Controller is a domain/path string that indicates the
controller that managing Gateways of this class. \n Example: \"acme.io/gateway-controller\".
\n This field is not mutable and cannot be empty. \n The format
of this field is DOMAIN \"/\" PATH, where DOMAIN and PATH are valid
Kubernetes names (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
\n Support: Core"
type: string
parametersRef:
description: "ParametersRef is a controller specific resource containing
the configuration parameters corresponding to this class. This is
optional if the controller does not require any additional configuration.
\n Valid resources for reference are up to the Controller. Examples
include \"configmaps\" (omit or specify the empty string for the
group to indicate the core API group) or a custom resource (CRD).
\ Omitting or specifying the empty string for both the resource
and group indicates that the resource is \"configmaps\". If the
referent cannot be found, the GatewayClass's \"InvalidParameters\"
status condition will be true. \n Support: Custom"
properties:
group:
default: core
description: "Group is the group of the referent. Omitting the
value or specifying the empty string indicates the core API
group. For example, use the following to specify a configmaps:
\n fooRef: resource: configmaps name: myconfigmap \n Otherwise,
if the core API group is not desired, specify the desired group:
\n fooRef: group: acme.io resource: foos name: myfoo"
type: string
name:
description: Name is the name of the referent.
type: string
resource:
default: configmaps
description: "Resource is the API resource name of the referent.
Omitting the value or specifying the empty string indicates
the configmaps resource. For example, use the following to specify
a configmaps resource: \n fooRef: name: myconfigmap \n Otherwise,
if the configmaps resource is not desired, specify the desired
group: \n fooRef: group: acme.io resource: foos name:
myfoo"
type: string
required:
- name
type: object
required:
- controller
type: object
status:
default:
conditions:
- status: Unknown
type: InvalidParameters
description: Status of the GatewayClass.
properties:
conditions:
default:
- status: Unknown
type: InvalidParameters
description: Conditions is the current status from the controller
for this GatewayClass.
items:
description: "GatewayClassCondition contains the details for the
current condition of this GatewayClass. \n Support: Core, unless
otherwise specified."
properties:
lastTransitionTime:
description: LastTransitionTime is the time of the last change
to this condition. This should be when the underlying condition
changed. If that is not known, then using the time when the
API field changed is acceptable.
format: date-time
type: string
message:
description: Message is a human readable reason for last transition.
This field may be empty.
type: string
observedGeneration:
description: If set, this represents the .metadata.generation
that the condition was set based upon. For instance, if .metadata.generation
is currently 12, but the .status.condition[x].observedGeneration
is 9, the condition is out of date with respect to the current
state of the instance.
format: int64
type: integer
reason:
description: "Reason is a machine consumable string for the
last transition. It should be a one-word, CamelCase string.
Reason will be defined by the controller. \n Support: Custom;
values will be controller-specific. This field must not be
empty."
type: string
status:
description: Status of this condition.
type: string
type:
description: Type of this condition.
type: string
required:
- status
- type
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment