Skip to content

Commit 85dd883

Browse files
authored
🌱 Update grpc server config to make it align with proposal 151 (#392)
* Update grpc server config to make it align with proposal 151 Signed-off-by: Jian Qiu <[email protected]> * Fix typo and comment Signed-off-by: Jian Qiu <[email protected]> --------- Signed-off-by: Jian Qiu <[email protected]>
1 parent f3e5dab commit 85dd883

File tree

3 files changed

+272
-99
lines changed

3 files changed

+272
-99
lines changed

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

Lines changed: 125 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
that govern registration and work distribution for attached Klusterlets.
4646
properties:
4747
addOnManagerConfiguration:
48-
description: AddOnManagerConfiguration contains the configuration
48+
description: addOnManagerConfiguration contains the configuration
4949
of addon manager
5050
properties:
5151
featureGates:
@@ -81,14 +81,14 @@ spec:
8181
type: object
8282
addOnManagerImagePullSpec:
8383
default: quay.io/open-cluster-management/addon-manager
84-
description: AddOnManagerImagePullSpec represents the desired image
84+
description: addOnManagerImagePullSpec represents the desired image
8585
configuration of addon manager controller/webhook installed on hub.
8686
type: string
8787
deployOption:
8888
default:
8989
mode: Default
9090
description: |-
91-
DeployOption contains the options of deploying a cluster-manager
91+
deployOption contains the options of deploying a cluster-manager
9292
Default mode is used if DeployOption is not set.
9393
properties:
9494
default:
@@ -306,7 +306,7 @@ spec:
306306
- mode
307307
type: object
308308
nodePlacement:
309-
description: NodePlacement enables explicit control over the scheduling
309+
description: nodePlacement enables explicit control over the scheduling
310310
of the deployed pods.
311311
properties:
312312
nodeSelector:
@@ -360,11 +360,11 @@ spec:
360360
type: object
361361
placementImagePullSpec:
362362
default: quay.io/open-cluster-management/placement
363-
description: PlacementImagePullSpec represents the desired image configuration
363+
description: placementImagePullSpec represents the desired image configuration
364364
of placement controller/webhook installed on hub.
365365
type: string
366366
registrationConfiguration:
367-
description: RegistrationConfiguration contains the configuration
367+
description: registrationConfiguration contains the configuration
368368
of registration
369369
properties:
370370
autoApproveUsers:
@@ -414,15 +414,16 @@ spec:
414414
properties:
415415
authType:
416416
default: csr
417-
description: Type of the authentication used by hub to initialize
418-
the Hub cluster. Possible values are csr and awsirsa.
417+
description: |-
418+
authType is the type of the authentication used by hub to initialize the Hub cluster.
419+
Possible values are csr, awsirsa and grpc.
419420
enum:
420421
- csr
421422
- awsirsa
422423
- grpc
423424
type: string
424425
awsirsa:
425-
description: AwsIrsa represents the configuration for awsirsa
426+
description: awsirsa represents the configuration for awsirsa
426427
driver.
427428
properties:
428429
autoApprovedIdentities:
@@ -446,7 +447,7 @@ spec:
446447
type: array
447448
type: object
448449
csr:
449-
description: CSR represents the configuration for csr driver.
450+
description: csr represents the configuration for csr driver.
450451
properties:
451452
autoApprovedIdentities:
452453
description: AutoApprovedIdentities represent a list
@@ -456,7 +457,7 @@ spec:
456457
type: array
457458
type: object
458459
grpc:
459-
description: GRPC represents the configuration for gRPC
460+
description: grpc represents the configuration for gRPC
460461
driver.
461462
properties:
462463
autoApprovedIdentities:
@@ -465,35 +466,6 @@ spec:
465466
items:
466467
type: string
467468
type: array
468-
endpointExposure:
469-
description: EndpointExposure represents the configuration
470-
for endpoint exposure.
471-
properties:
472-
hostname:
473-
description: Hostname points to a fixed hostname
474-
for serving agents' handshakes.
475-
properties:
476-
value:
477-
type: string
478-
required:
479-
- value
480-
type: object
481-
type:
482-
default: hostname
483-
description: |-
484-
Type specifies how the gRPC endpoint is exposed.
485-
You may need to apply an object to expose the gRPC endpoint, for example: a route.
486-
enum:
487-
- hostname
488-
type: string
489-
required:
490-
- type
491-
type: object
492-
imagePullSpec:
493-
default: quay.io/open-cluster-management/registration
494-
description: ImagePullSpec represents the desired image
495-
of the gRPC broker installed on hub.
496-
type: string
497469
type: object
498470
required:
499471
- authType
@@ -505,7 +477,7 @@ spec:
505477
type: object
506478
registrationImagePullSpec:
507479
default: quay.io/open-cluster-management/registration
508-
description: RegistrationImagePullSpec represents the desired image
480+
description: registrationImagePullSpec represents the desired image
509481
of registration controller/webhook installed on hub.
510482
type: string
511483
resourceRequirement:
@@ -581,10 +553,120 @@ spec:
581553
- ResourceRequirement
582554
type: string
583555
type: object
556+
serverConfiguration:
557+
description: serverConfiguration contains the configuration for http/grpc
558+
server.
559+
properties:
560+
endpointsExposure:
561+
description: endpointsExposure represents the configuration for
562+
endpoints exposure of the server.
563+
items:
564+
properties:
565+
grpc:
566+
description: grpc represents the configuration for grpc
567+
endpoint.
568+
properties:
569+
hostname:
570+
description: hostname points to a fixed hostname for
571+
serving agents' handshakes.
572+
properties:
573+
caBundle:
574+
description: caBundle of the endpoint.
575+
format: byte
576+
type: string
577+
host:
578+
description: host is the host name of the endpoint.
579+
type: string
580+
required:
581+
- host
582+
type: object
583+
type:
584+
default: hostname
585+
description: |-
586+
type specifies how the endpoint is exposed.
587+
You may need to apply an object to expose the endpoint, for example: a route.
588+
enum:
589+
- hostname
590+
type: string
591+
required:
592+
- type
593+
type: object
594+
https:
595+
description: https represents the configuration for https
596+
endpoint.
597+
properties:
598+
hostname:
599+
description: hostname points to a fixed hostname for
600+
serving agents' handshakes.
601+
properties:
602+
caBundle:
603+
description: caBundle of the endpoint.
604+
format: byte
605+
type: string
606+
host:
607+
description: host is the host name of the endpoint.
608+
type: string
609+
required:
610+
- host
611+
type: object
612+
type:
613+
default: hostname
614+
description: |-
615+
type specifies how the endpoint is exposed.
616+
You may need to apply an object to expose the endpoint, for example: a route.
617+
enum:
618+
- hostname
619+
type: string
620+
required:
621+
- type
622+
type: object
623+
protocol:
624+
default: grpc
625+
description: protocol is the protocol used for the endpoint,
626+
could be https or grpc.
627+
enum:
628+
- grpc
629+
- https
630+
type: string
631+
usage:
632+
description: |-
633+
usage defines the usage of the endpoint. It could be "agentToHub" indicating the endpoint is used
634+
for communication between agent and hub, or "consumer" indicating the endpoint is used for external consumer.
635+
type: string
636+
required:
637+
- protocol
638+
type: object
639+
type: array
640+
featureGates:
641+
description: featureGates represents the features enabled for
642+
the server
643+
items:
644+
properties:
645+
feature:
646+
description: Feature is the key of feature gate. e.g. featuregate/Foo.
647+
type: string
648+
mode:
649+
default: Disable
650+
description: |-
651+
Mode is either Enable, Disable, "" where "" is Disable by default.
652+
In Enable mode, a valid feature gate `featuregate/Foo` will be set to "--featuregate/Foo=true".
653+
In Disable mode, a valid feature gate `featuregate/Foo` will be set to "--featuregate/Foo=false".
654+
enum:
655+
- Enable
656+
- Disable
657+
type: string
658+
required:
659+
- feature
660+
type: object
661+
type: array
662+
imagePullSpec:
663+
description: imagePullSpec is the image for the server
664+
type: string
665+
type: object
584666
workConfiguration:
585667
default:
586668
workDriver: kube
587-
description: WorkConfiguration contains the configuration of work
669+
description: workConfiguration contains the configuration of work
588670
properties:
589671
featureGates:
590672
description: "FeatureGates represents the list of feature gates
@@ -636,7 +718,7 @@ spec:
636718
type: object
637719
workImagePullSpec:
638720
default: quay.io/open-cluster-management/work
639-
description: WorkImagePullSpec represents the desired image configuration
721+
description: workImagePullSpec represents the desired image configuration
640722
of work controller/webhook installed on hub.
641723
type: string
642724
type: object

0 commit comments

Comments
 (0)