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
Original file line number Diff line number Diff line change
Expand Up @@ -580,13 +580,43 @@ spec:
required:
- host
type: object
loadBalancer:
description: LoadBalancer points customized configuration
for loadBalancer type.
properties:
caBundle:
description: CABundle is a customized caBundle of
the endpoint.
format: byte
type: string
host:
description: Host is the customized host name of
the endpoint.
type: string
type: object
route:
description: Route points customized configuration for
route type.
properties:
caBundle:
description: CABundle is a customized caBundle of
the endpoint.
format: byte
type: string
host:
description: Host is the customized host name of
the endpoint.
type: string
type: object
type:
default: hostname
description: |-
type specifies how the endpoint is exposed.
You may need to apply an object to expose the endpoint, for example: a route.
enum:
- hostname
- loadBalancer
- route
type: string
required:
- type
Expand All @@ -609,13 +639,43 @@ spec:
required:
- host
type: object
loadBalancer:
description: LoadBalancer points customized configuration
for loadBalancer type.
properties:
caBundle:
description: CABundle is a customized caBundle of
the endpoint.
format: byte
type: string
host:
description: Host is the customized host name of
the endpoint.
type: string
type: object
route:
description: Route points customized configuration for
route type.
properties:
caBundle:
description: CABundle is a customized caBundle of
the endpoint.
format: byte
type: string
host:
description: Host is the customized host name of
the endpoint.
type: string
type: object
type:
default: hostname
description: |-
type specifies how the endpoint is exposed.
You may need to apply an object to expose the endpoint, for example: a route.
enum:
- hostname
- loadBalancer
- route
type: string
required:
- type
Expand Down
41 changes: 38 additions & 3 deletions operator/v1/types_clustermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,22 @@ type EndpointExposure struct {
type Endpoint struct {
// type specifies how the endpoint is exposed.
// You may need to apply an object to expose the endpoint, for example: a route.
// TODO: support loadbalancer.
// +kubebuilder:default:=hostname
// +kubebuilder:validation:Enum=hostname
// +kubebuilder:validation:Enum=hostname;loadBalancer;route
// +required
Type EndpointExposureType `json:"type,omitempty"`

// hostname points to a fixed hostname for serving agents' handshakes.
// +optional
Hostname *HostnameConfig `json:"hostname,omitempty"`

// LoadBalancer points customized configuration for loadBalancer type.
// +optional
LoadBalancer *LoadBalancerConfig `json:"loadBalancer,omitempty"`

// Route points customized configuration for route type.
// +optional
Route *RouteConfig `json:"route,omitempty"`
}

// HostnameConfig references a fixed hostname.
Expand All @@ -219,12 +226,40 @@ type HostnameConfig struct {
CABundle []byte `json:"caBundle,omitempty"`
}

// GRPCEndpointExposureType represents the type of endpoint exposure for gRPC.
// LoadBalancerConfig references customized configuration for LoadBalancer type.
type LoadBalancerConfig struct {
// Host is the customized host name of the endpoint.
// +optional
Host string `json:"host,omitempty"`

// CABundle is a customized caBundle of the endpoint.
// +optional
CABundle []byte `json:"caBundle,omitempty"`
}

// RouteConfig references customized configuration for Route type.
type RouteConfig struct {
// Host is the customized host name of the endpoint.
// +optional
Host string `json:"host,omitempty"`

// CABundle is a customized caBundle of the endpoint.
// +optional
CABundle []byte `json:"caBundle,omitempty"`
}

// EndpointExposureType represents the type of endpoint exposure.
type EndpointExposureType string

const (
// EndpointTypeHostname is the endpoint exposure type for hostname.
EndpointTypeHostname EndpointExposureType = "hostname"

// EndpointTypeLoadBalancer is the endpoint exposure type for load balancer.
EndpointTypeLoadBalancer EndpointExposureType = "loadBalancer"

// EndpointTypeRoute is the endpoint exposure type for route.
EndpointTypeRoute EndpointExposureType = "route"
)

type CSRConfig struct {
Expand Down
52 changes: 52 additions & 0 deletions operator/v1/zz_generated.deepcopy.go

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