Skip to content

Commit 056da50

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

3 files changed

+21
-0
lines changed

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

+10
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,16 @@ 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". For
365+
detailed driver config content, refer to the specific work driver
366+
options package: MQTT: https://github.com/open-cluster-management-io/sdk-go/blob/00a94671ced1c17d2ca2b5fad2f4baab282a7d3c/pkg/cloudevents/generic/options/mqtt/options.go#L46-L76
367+
GRPC: https://github.com/open-cluster-management-io/sdk-go/blob/00a94671ced1c17d2ca2b5fad2f4baab282a7d3c/pkg/cloudevents/generic/options/grpc/options.go#L30-L40'
368+
type: string
359369
type: object
360370
workImagePullSpec:
361371
default: quay.io/open-cluster-management/work

operator/v1/types_clustermanager.go

+10
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ 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+
// For detailed driver config content, refer to the specific work driver options package:
127+
// MQTT: https://github.com/open-cluster-management-io/sdk-go/blob/00a94671ced1c17d2ca2b5fad2f4baab282a7d3c/pkg/cloudevents/generic/options/mqtt/options.go#L46-L76
128+
// GRPC: https://github.com/open-cluster-management-io/sdk-go/blob/00a94671ced1c17d2ca2b5fad2f4baab282a7d3c/pkg/cloudevents/generic/options/grpc/options.go#L30-L40
129+
// +optional
130+
// +kubebuilder:default:=kube
131+
WorkDriver string `json:"workDriver,omitempty"`
122132
}
123133

124134
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)