Skip to content
Merged
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
16 changes: 16 additions & 0 deletions api/v1alpha/httpproxy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ type HTTPProxyRuleBackend struct {
// +kubebuilder:validation:Required
Endpoint string `json:"endpoint,omitempty"`

// Connector references the Connector that should be used for this backend.
//
// For now, only a name reference is supported. In the future this can be
// extended to selector-based matching to allow multiple connectors.
//
// +kubebuilder:validation:Optional
Connector *ConnectorReference `json:"connector,omitempty"`

// Filters defined at this level should be executed if and only if the
// request is being forwarded to the backend defined here.
//
Expand All @@ -133,6 +141,14 @@ type HTTPProxyRuleBackend struct {
Filters []gatewayv1.HTTPRouteFilter `json:"filters,omitempty"`
}

// ConnectorReference references a Connector by name.
type ConnectorReference struct {
// Name of the referenced Connector.
//
// +kubebuilder:validation:Required
Name string `json:"name"`
}

// HTTPProxyStatus defines the observed state of HTTPProxy.
type HTTPProxyStatus struct {
// Addresses lists the network addresses that have been bound to the
Expand Down
20 changes: 20 additions & 0 deletions api/v1alpha/zz_generated.deepcopy.go

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

160 changes: 158 additions & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,88 @@ spec:
type: object
spec:
description: Spec defines the desired state of a ConnectorAdvertisement
properties:
connectorRef:
description: ConnectorRef references the Connector being advertised.
properties:
name:
description: Name of the referenced Connector.
type: string
required:
- name
type: object
layer4:
description: Layer 4 services being advertised.
items:
properties:
name:
description: Name of the advertisement.
type: string
services:
description: Layer 4 services being advertised.
items:
properties:
address:
description: |-
Address of the service.

Can be an IPv4, IPv6, or a DNS address. A DNS address may contain
wildcards. A DNS address acts as an allow list for what addresses the
connector will allow to be requested through it.

DNS resolution is the responsibility of the connector.
maxLength: 253
minLength: 1
type: string
ports:
description: Ports of the service.
items:
description: Layer4ServicePort represents a port for
a Layer 4 service.
properties:
name:
description: Named port for the service.
type: string
port:
description: Port number for the service.
format: int32
maximum: 65535
minimum: 1
type: integer
protocol:
default: TCP
description: Protocol for port. Must be TCP or UDP,
defaults to "TCP".
type: string
required:
- name
- port
- protocol
type: object
maxItems: 16
minItems: 1
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
required:
- address
- ports
type: object
maxItems: 16
minItems: 1
type: array
required:
- name
- services
type: object
maxItems: 16
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
required:
- connectorRef
type: object
status:
description: Status defines the observed state of a ConnectorAdvertisement
Expand Down
13 changes: 13 additions & 0 deletions config/crd/bases/networking.datumapis.com_httpproxies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,19 @@ spec:
will be increased to allow for multiple backends on any given route.
items:
properties:
connector:
description: |-
Connector references the Connector that should be used for this backend.

For now, only a name reference is supported. In the future this can be
extended to selector-based matching to allow multiple connectors.
properties:
name:
description: Name of the referenced Connector.
type: string
required:
- name
type: object
endpoint:
description: |-
Endpoint for the backend. Must be a valid URL.
Expand Down
Loading