Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
91 changes: 0 additions & 91 deletions apis/v1beta1/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ type GatewaySpec struct {
// +kubebuilder:validation:XValidation:message="Combination of port, protocol and hostname must be unique for each listener",rule="self.all(l1, self.exists_one(l2, l1.port == l2.port && l1.protocol == l2.protocol && (has(l1.hostname) && has(l2.hostname) ? l1.hostname == l2.hostname : true)))"
Listeners []Listener `json:"listeners"`

// Infrastructure defines infrastructure level attributes about this Gateway instance.
//
// <gateway:experimental>
// +optional
Infrastructure *GatewayInfrastructure `json:"infrastructure,omitempty"`

// Addresses requested for this Gateway. This is optional and behavior can
// depend on the implementation. If a value is set in the spec and the
// requested address is invalid or unavailable, the implementation MUST
Expand Down Expand Up @@ -161,69 +155,6 @@ type GatewaySpec struct {
Addresses []GatewayAddress `json:"addresses,omitempty"`
}

// GatewayInfrastructure defines infrastructure level attributes about a Gateway
type GatewayInfrastructure struct {
// Routability allows the Gateway to specify the accessibility of its addresses. Setting
// this property will override the default value defined by the GatewayClass.
//
// If the desired Gateway routability is incompatible with the GatewayClass implementations
// MUST set the condition `Accepted` to `False` with `Reason` set to `UnsupportedRoutability`.
//
// The default value of routability is implementation specific and MUST remain consistent for
// Gateways with the same gatewayClassName
//
// Implementations MUST clearly document if they support updates to this field. The default
// expectation should be that changes to this field are not supported unless an implementation
// specifies otherwise.
//
// If a Gateway is mutated but does not support the desired routability it MUST set the `Accepted`
// and `Programmed` conditions to `False` with `Reason` set to `UnsupportedRoutability`.
//
// +optional
Routability *GatewayRoutability `json:"routability,omitempty"`
}

// GatewayRoutability represents the routability of a Gateway
//
// The pre-defined values listed in this package can be compared semantically.
// `Public` has a larger scope than `Private`, while `Private` has a larger scope than
// `Cluster`.
//
// Implementations can define custom routability values by specifying a vendor
// prefix followed by a slash '/' and a custom name ie. `dev.example.com/my-routability`.
//
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Pattern=`^Public|Private|Cluster|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-_]+$`
type GatewayRoutability string

const (
// GatewayRoutabilityPublic means the Gateway's address MUST
// be routable on the public internet.
//
// Support: Extended
GatewayRoutabilityPublic GatewayRoutability = "Public"

// GatewayRoutabilityPrivate means the Gateway's address MUST
// only be routable inside a private network larger than a single
// cluster (ie. VPC) and MAY include the RFC1918 address space.
//
// It is RECOMMENDED that in-cluster gateways SHOULD NOT support 'Private' routability.
// Kubernetes doesn't have a concept of 'Private' routability for Services. In the future this may
// change upstream.
//
// Support: Extended
GatewayRoutabilityPrivate GatewayRoutability = "Private"

// GatewayRoutabilityCluster means the Gateway's address MUST
// only be routable inside the [cluster's network].
//
// Support: Extended
//
// [cluster's network]: https://kubernetes.io/docs/concepts/cluster-administration/networking/#how-to-implement-the-kubernetes-network-model
GatewayRoutabilityCluster GatewayRoutability = "Cluster"
)

// Listener embodies the concept of a logical endpoint where a Gateway accepts
// network connections.
type Listener struct {
Expand Down Expand Up @@ -570,16 +501,6 @@ type GatewayStatusAddress struct {
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Value string `json:"value"`

// Routability specifies the routable bounds of this address
// Predefined values are: 'Private', 'Public', Cluster
// Other values MUST have a vendor prefix.
//
// Implementations that support Routability MUST populate this field
//
// +optional
// <gateway:experimental>
Routability *GatewayRoutability `json:"routability,omitempty"`
}

// GatewayStatus defines the observed state of Gateway.
Expand All @@ -589,14 +510,6 @@ type GatewayStatus struct {
// addresses in the Spec, e.g. if the Gateway automatically
// assigns an address from a reserved pool.
//
// Implementations that support GatewayRoutability MUST include an address
// that has the same routable semantics as defined in the Gateway spec.
//
// Implementations MAY add additional addresses in status, but they MUST be
// semantically less than the scope of the requested scope. For example if a
// user requests a `Private` routable Gateway then an additional address MAY
// have a routability of `Cluster` but MUST NOT include `Public`.
//
// +optional
// +kubebuilder:validation:MaxItems=16
Addresses []GatewayStatusAddress `json:"addresses,omitempty"`
Expand Down Expand Up @@ -689,10 +602,6 @@ const (
// express a range of circumstances, including (but not limited to) IPAM
// address exhaustion, address not yet allocated, or a named address not being found.
GatewayReasonAddressNotAssigned GatewayConditionReason = "AddressNotAssigned"

// This reason is used with "Programmed" and "Accepted" conditions when
// desired routability is not able to be fulfilled by the implementation
GatewayUnsupportedRoutability GatewayConditionReason = "UnsupportedRoutability"
)

const (
Expand Down
15 changes: 0 additions & 15 deletions apis/v1beta1/gatewayclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,6 @@ const (

// GatewayClassStatus is the current status for the GatewayClass.
type GatewayClassStatus struct {
// Routabilities specifies a list of supported routabilities offered by
// the GatewayClass. The first entry in this list will be the default
// routability used when Gateways of this class are created.
//
// Implementations MAY provide a pre-defined set of GatewayClasses that
// limit the routability choices of a Gateway.
//
// Implementations MUST populate this list with the GatewayRoutability values
// that are supported by this GatewayClass.
//
// +optional
// +kubebuilder:validation:MaxItems=8
// <gateway:experimental>
Routabilities []GatewayRoutability `json:"routabilities,omitempty"`

// Conditions is the current status from the controller for
// this GatewayClass.
//
Expand Down
35 changes: 0 additions & 35 deletions apis/v1beta1/zz_generated.deepcopy.go

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

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

Loading