Skip to content

Commit

Permalink
add work driver to cluster manager.
Browse files Browse the repository at this point in the history
Signed-off-by: morvencao <lcao@redhat.com>
  • Loading branch information
morvencao committed Mar 19, 2024
1 parent 29e1b1d commit b61b5ee
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,20 @@ spec:
- feature
type: object
type: array
workDriver:
default: kube
description: "WorkDriver represents the type of work driver. Possible
values are \"kube\", \"mqtt\", or \"grpc\". If not provided,
the default value is \"kube\". If the driver is not \"kube\",
the driver config must be provided in a secret named \"work-driver-config\"
with the following structure: config.yaml: | <driver-config-in-yaml>
\n For detailed driver configuration, please refer to the sdk-go
documentation: https://github.com/open-cluster-management-io/sdk-go/blob/main/pkg/cloudevents/README.md#supported-protocols-and-drivers"
enum:
- kube
- mqtt
- grpc
type: string
type: object
workImagePullSpec:
default: quay.io/open-cluster-management/work
Expand Down
13 changes: 13 additions & 0 deletions operator/v1/types_clustermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,19 @@ type WorkConfiguration struct {
// he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.
// +optional
FeatureGates []FeatureGate `json:"featureGates,omitempty"`

// WorkDriver represents the type of work driver. Possible values are "kube", "mqtt", or "grpc".
// If not provided, the default value is "kube".
// If the driver is not "kube", the driver config must be provided in a secret named "work-driver-config" with the following structure:
// config.yaml: |
// <driver-config-in-yaml>
//
// For detailed driver configuration, please refer to the sdk-go documentation: https://github.com/open-cluster-management-io/sdk-go/blob/main/pkg/cloudevents/README.md#supported-protocols-and-drivers
//
// +optional
// +kubebuilder:default:=kube
// +kubebuilder:validation:Enum=kube;mqtt;grpc
WorkDriver string `json:"workDriver,omitempty"`
}

type AddOnManagerConfiguration struct {
Expand Down
1 change: 1 addition & 0 deletions operator/v1/zz_generated.swagger_doc_generated.go

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

0 comments on commit b61b5ee

Please sign in to comment.