Skip to content

Commit 681cd5d

Browse files
committed
add work driver config to cluster manager.
Signed-off-by: morvencao <[email protected]>
1 parent 29e1b1d commit 681cd5d

3 files changed

+43
-0
lines changed

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

+17
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,23 @@ spec:
356356
- feature
357357
type: object
358358
type: array
359+
workDriver:
360+
default: kube
361+
description: "WorkDriver represents the type of work driver. Possible
362+
values are kube, mqtt, or grpc. If not provided, the default
363+
value is kube. If the driver is not kube, the driver config
364+
must be provided in a secret named \"work-driver-config\". \n
365+
An example of MQTT driver config (in YAML format) is as follows:
366+
broker: broker.example.com:1883 username: maestro password:
367+
password topics: sourceEvents: sources/maestro/consumers/+/sourceevents
368+
agentEvents: $share/statussubscribers/sources/maestro/consumers/+/agentevents
369+
\n An example of GRPC driver config (in YAML format) is as follows:
370+
url: grpc.example.com:8443 caFile: /certs/ca.crt clientCertFile:
371+
/certs/client.crt clientKeyFile: /certs/client.key \n For detailed
372+
driver config content, refer to the specific work driver options
373+
package: MQTT: https://github.com/open-cluster-management-io/sdk-go/blob/00a94671ced1c17d2ca2b5fad2f4baab282a7d3c/pkg/cloudevents/generic/options/mqtt/options.go#L46-L76
374+
GRPC: https://github.com/open-cluster-management-io/sdk-go/blob/00a94671ced1c17d2ca2b5fad2f4baab282a7d3c/pkg/cloudevents/generic/options/grpc/options.go#L30-L40"
375+
type: string
359376
type: object
360377
workImagePullSpec:
361378
default: quay.io/open-cluster-management/work

operator/v1/types_clustermanager.go

+25
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,31 @@ type WorkConfiguration struct {
119119
// he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.
120120
// +optional
121121
FeatureGates []FeatureGate `json:"featureGates,omitempty"`
122+
123+
// WorkDriver represents the type of work driver. Possible values are kube, mqtt, or grpc.
124+
// If not provided, the default value is kube.
125+
// If the driver is not kube, the driver config must be provided in a secret named "work-driver-config".
126+
//
127+
// An example of MQTT driver config (in YAML format) is as follows:
128+
// broker: broker.example.com:1883
129+
// username: maestro
130+
// password: password
131+
// topics:
132+
// sourceEvents: sources/maestro/consumers/+/sourceevents
133+
// agentEvents: $share/statussubscribers/sources/maestro/consumers/+/agentevents
134+
//
135+
// An example of GRPC driver config (in YAML format) is as follows:
136+
// url: grpc.example.com:8443
137+
// caFile: /certs/ca.crt
138+
// clientCertFile: /certs/client.crt
139+
// clientKeyFile: /certs/client.key
140+
//
141+
// For detailed driver config content, refer to the specific work driver options package:
142+
// MQTT: https://github.com/open-cluster-management-io/sdk-go/blob/00a94671ced1c17d2ca2b5fad2f4baab282a7d3c/pkg/cloudevents/generic/options/mqtt/options.go#L46-L76
143+
// GRPC: https://github.com/open-cluster-management-io/sdk-go/blob/00a94671ced1c17d2ca2b5fad2f4baab282a7d3c/pkg/cloudevents/generic/options/grpc/options.go#L30-L40
144+
// +optional
145+
// +kubebuilder:default:=kube
146+
WorkDriver string `json:"workDriver,omitempty"`
122147
}
123148

124149
type AddOnManagerConfiguration struct {

operator/v1/zz_generated.swagger_doc_generated.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)