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

Gateway API v0.5.0 API Review #1086

Closed
Closed
Show file tree
Hide file tree
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
70 changes: 13 additions & 57 deletions apis/v1alpha2/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ type GatewaySpec struct {
// it assigns to the Gateway and add a corresponding entry in
// GatewayStatus.Addresses.
//
// Support: Core
// Support: Extended
//
// +optional
// +kubebuilder:validation:MaxItems=16
Expand All @@ -145,7 +145,8 @@ type GatewaySpec struct {
// Listener embodies the concept of a logical endpoint where a Gateway accepts
// network connections.
type Listener struct {
// Name is the name of the Listener.
// Name is the name of the Listener. This name MUST be unique within a
// Gateway.
//
// Support: Core
Name SectionName `json:"name"`
Expand All @@ -171,6 +172,10 @@ type Listener struct {
// accepted. For more information, refer to the Route specific Hostnames
// documentation.
//
// Hostnames that are prefixed with a wildcard label (`*.`) are interpreted
// as a suffix match. That means that a match for `*.example.com` would match
// both `test.example.com`, and `foo.test.example.com`, but not `example.com`.
//
// Support: Core
//
// +optional
Expand Down Expand Up @@ -309,8 +314,8 @@ type GatewayTLSConfig struct {
// a Listener, but this behavior is implementation-specific.
//
// References to a resource in different namespace are invalid UNLESS there
// is a ReferencePolicy in the target namespace that allows the certificate
// to be attached. If a ReferencePolicy does not allow this reference, the
// is a ReferenceGrant in the target namespace that allows the certificate
// to be attached. If a ReferenceGrant does not allow this reference, the
// "ResolvedRefs" condition MUST be set to False for this listener with the
// "InvalidCertificateRef" reason.
//
Expand All @@ -320,13 +325,13 @@ type GatewayTLSConfig struct {
// CertificateRefs can reference to standard Kubernetes resources, i.e.
// Secret, or implementation-specific custom resources.
//
// Support: Core - A single reference to a Kubernetes Secret
// Support: Core - A single reference to a Kubernetes Secret of type kubernetes.io/tls
//
// Support: Implementation-specific (More than one reference or other resource types)
//
// +optional
// +kubebuilder:validation:MaxItems=64
CertificateRefs []*SecretObjectReference `json:"certificateRefs,omitempty"`
CertificateRefs []SecretObjectReference `json:"certificateRefs,omitempty"`

// Options are a list of key/value pairs to enable extended TLS
// configuration for each implementation. For example, configuring the
Expand Down Expand Up @@ -381,7 +386,7 @@ type AllowedRoutes struct {
// with the application protocol specified in the Listener's Protocol field.
// If an implementation does not support or recognize this resource type, it
// MUST set the "ResolvedRefs" condition to False for this Listener with the
// "InvalidRoutesRef" reason.
// "InvalidRouteKinds" reason.
//
// Support: Core
//
Expand Down Expand Up @@ -462,40 +467,6 @@ type GatewayAddress struct {
Value string `json:"value"`
}

// AddressType defines how a network address is represented as a text string.
//
// If the requested address is unsupported, the controller
// should raise the "Detached" listener status condition on
// the Gateway with the "UnsupportedAddress" reason.
//
// +kubebuilder:validation:Enum=IPAddress;Hostname;NamedAddress
type AddressType string

const (
// A textual representation of a numeric IP address. IPv4
// addresses must be in dotted-decimal form. IPv6 addresses
// must be in a standard IPv6 text representation
// (see [RFC 5952](https://tools.ietf.org/html/rfc5952)).
//
// Support: Extended
IPAddressType AddressType = "IPAddress"

// A Hostname represents a DNS based ingress point. This is similar to the
// corresponding hostname field in Kubernetes load balancer status. For
// example, this concept may be used for cloud load balancers where a DNS
// name is used to expose a load balancer.
//
// Support: Extended
HostnameAddressType AddressType = "Hostname"

// A NamedAddress provides a way to reference a specific IP address by name.
// For example, this may be a name or other unique identifier that refers
// to a resource on a cloud provider such as a static IP.
//
// Support: Implementation-Specific
NamedAddressType AddressType = "NamedAddress"
)

// GatewayStatus defines the observed state of Gateway.
type GatewayStatus struct {
// Addresses lists the IP addresses that have actually been
Expand Down Expand Up @@ -673,7 +644,6 @@ const (
//
// * "HostnameConflict"
// * "ProtocolConflict"
// * "RouteConflict"
//
// Possible reasons for this condition to be False are:
//
Expand All @@ -695,13 +665,6 @@ const (
// number, but have conflicting protocol specifications.
ListenerReasonProtocolConflict ListenerConditionReason = "ProtocolConflict"

// This reason is used with the "Conflicted" condition when the route
// resources selected for this Listener conflict with other
// specified properties of the Listener (e.g. Protocol).
// For example, a Listener that specifies "UDP" as the protocol
// but a route selector that resolves "TCPRoute" objects.
ListenerReasonRouteConflict ListenerConditionReason = "RouteConflict"

// This reason is used with the "Conflicted" condition when the condition
// is False.
ListenerReasonNoConflicts ListenerConditionReason = "NoConflicts"
Expand All @@ -721,7 +684,6 @@ const (
// Possible reasons for this condition to be true are:
//
// * "PortUnavailable"
// * "UnsupportedExtension"
// * "UnsupportedProtocol"
// * "UnsupportedAddress"
//
Expand All @@ -742,12 +704,6 @@ const (
// * The port is not supported by the implementation.
ListenerReasonPortUnavailable ListenerConditionReason = "PortUnavailable"

// This reason is used with the "Detached" condition when the
// controller detects that an implementation-specific Listener
// extension is being requested, but is not able to support
// the extension.
ListenerReasonUnsupportedExtension ListenerConditionReason = "UnsupportedExtension"

// This reason is used with the "Detached" condition when the
// Listener could not be attached to be Gateway because its
// protocol type is not supported.
Expand Down Expand Up @@ -801,7 +757,7 @@ const (
// This reason is used with the "ResolvedRefs" condition when
// one of the Listener's Routes has a BackendRef to an object in
// another namespace, where the object in the other namespace does
// not have a ReferencePolicy explicitly allowing the reference.
// not have a ReferenceGrant explicitly allowing the reference.
ListenerReasonRefNotPermitted ListenerConditionReason = "RefNotPermitted"
)

Expand Down
1 change: 1 addition & 0 deletions apis/v1alpha2/gatewayclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:printcolumn:name="Controller",type=string,JSONPath=`.spec.controllerName`
// +kubebuilder:printcolumn:name="Accepted",type=string,JSONPath=`.status.conditions[?(@.type=="Accepted")].status`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +kubebuilder:printcolumn:name="Description",type=string,JSONPath=`.spec.description`,priority=1

Expand Down
Loading