Skip to content

Commit ca11ed9

Browse files
committed
update endpoint of endpointsExposure in serverConfiguration
Signed-off-by: Zhiwei Yin <[email protected]>
1 parent a8652dd commit ca11ed9

File tree

2 files changed

+32
-20
lines changed

2 files changed

+32
-20
lines changed

operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -567,18 +567,19 @@ spec:
567567
endpoint.
568568
properties:
569569
hostname:
570-
description: hostname points to a fixed hostname for
571-
serving agents' handshakes.
570+
description: hostname points to a fixed hostname or
571+
customized ca for serving agents' handshakes.
572572
properties:
573573
caBundle:
574-
description: caBundle of the endpoint.
574+
description: CABundle is a customized caBundle of
575+
the endpoint.
575576
format: byte
576577
type: string
577578
host:
578-
description: host is the host name of the endpoint.
579+
description: |-
580+
Host is the host name of the endpoint.
581+
Host must be set if the type is hostname and could be empty if the type is loadBalancer or route.
579582
type: string
580-
required:
581-
- host
582583
type: object
583584
type:
584585
default: hostname
@@ -587,6 +588,8 @@ spec:
587588
You may need to apply an object to expose the endpoint, for example: a route.
588589
enum:
589590
- hostname
591+
- loadBalancer
592+
- route
590593
type: string
591594
required:
592595
- type
@@ -596,18 +599,19 @@ spec:
596599
endpoint.
597600
properties:
598601
hostname:
599-
description: hostname points to a fixed hostname for
600-
serving agents' handshakes.
602+
description: hostname points to a fixed hostname or
603+
customized ca for serving agents' handshakes.
601604
properties:
602605
caBundle:
603-
description: caBundle of the endpoint.
606+
description: CABundle is a customized caBundle of
607+
the endpoint.
604608
format: byte
605609
type: string
606610
host:
607-
description: host is the host name of the endpoint.
611+
description: |-
612+
Host is the host name of the endpoint.
613+
Host must be set if the type is hostname and could be empty if the type is loadBalancer or route.
608614
type: string
609-
required:
610-
- host
611615
type: object
612616
type:
613617
default: hostname
@@ -616,6 +620,8 @@ spec:
616620
You may need to apply an object to expose the endpoint, for example: a route.
617621
enum:
618622
- hostname
623+
- loadBalancer
624+
- route
619625
type: string
620626
required:
621627
- type

operator/v1/types_clustermanager.go

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,34 +197,40 @@ type EndpointExposure struct {
197197
type Endpoint struct {
198198
// type specifies how the endpoint is exposed.
199199
// You may need to apply an object to expose the endpoint, for example: a route.
200-
// TODO: support loadbalancer.
201200
// +kubebuilder:default:=hostname
202-
// +kubebuilder:validation:Enum=hostname
201+
// +kubebuilder:validation:Enum=hostname; loadBalancer; route
203202
// +required
204203
Type EndpointExposureType `json:"type,omitempty"`
205204

206-
// hostname points to a fixed hostname for serving agents' handshakes.
205+
// hostname points to a fixed hostname or customized ca for serving agents' handshakes.
207206
// +optional
208207
Hostname *HostnameConfig `json:"hostname,omitempty"`
209208
}
210209

211-
// HostnameConfig references a fixed hostname.
210+
// HostnameConfig references a fixed hostname or customized ca.
212211
type HostnameConfig struct {
213-
// host is the host name of the endpoint.
214-
// +required
212+
// Host is the host name of the endpoint.
213+
// Host must be set if the type is hostname and could be empty if the type is loadBalancer or route.
214+
// +optional
215215
Host string `json:"host"`
216216

217-
// caBundle of the endpoint.
217+
// CABundle is a customized caBundle of the endpoint.
218218
// +optional
219219
CABundle []byte `json:"caBundle,omitempty"`
220220
}
221221

222-
// GRPCEndpointExposureType represents the type of endpoint exposure for gRPC.
222+
// EndpointExposureType represents the type of endpoint exposure for gRPC.
223223
type EndpointExposureType string
224224

225225
const (
226226
// EndpointTypeHostname is the endpoint exposure type for hostname.
227227
EndpointTypeHostname EndpointExposureType = "hostname"
228+
229+
// EndpointTypeLoadBalancer is the endpoint exposure type for load balancer.
230+
EndpointTypeLoadBalancer EndpointExposureType = "loadBalancer"
231+
232+
// EndpointTypeRoute is the endpoint exposure type for route.
233+
EndpointTypeRoute EndpointExposureType = "route"
228234
)
229235

230236
type CSRConfig struct {

0 commit comments

Comments
 (0)