Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,42 @@ spec:
enum:
- Default
- Detached
detached:
description: Detached includes configurations we needs for clustermanager in the detached mode.
type: object
properties:
registrationWebhookConfiguration:
description: RegistrationWebhookConfiguration represents the customized webhook-server configuration of registration.
type: object
required:
- address
properties:
address:
description: Address represents the address of a webhook-server. It could be in IP format or fqdn format. The Address must be reachable by apiserver of the hub cluster.
type: string
pattern: ^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$
port:
description: Port represents the port of a webhook-server. The default value of Port is 443.
type: integer
format: int32
default: 443
maximum: 65535
workWebhookConfiguration:
description: WorkWebhookConfiguration represents the customized webhook-server configuration of work.
type: object
required:
- address
properties:
address:
description: Address represents the address of a webhook-server. It could be in IP format or fqdn format. The Address must be reachable by apiserver of the hub cluster.
type: string
pattern: ^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$
port:
description: Port represents the port of a webhook-server. The default value of Port is 443.
type: integer
format: int32
default: 443
maximum: 65535
nodePlacement:
description: NodePlacement enables explicit control over the scheduling of the deployed pods.
type: object
Expand Down
33 changes: 33 additions & 0 deletions operator/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,39 @@ type ClusterManagerSpec struct {
// +optional
// +kubebuilder:default={mode: Default}
DeployOption DeployOption `json:"deployOption,omitempty"`

// Detached includes configurations we needs for clustermanager in the detached mode.
// +optional
Detached DetachedClusterManagerConfiguration `json:"detached,omitempty"`
}

// DetachedClusterManagerConfiguration represents customized configurations we need to set for clustermanager in the detached mode.
type DetachedClusterManagerConfiguration struct {
// RegistrationWebhookConfiguration represents the customized webhook-server configuration of registration.
// +optional
RegistrationWebhookConfiguration WebhookConfiguration `json:"registrationWebhookConfiguration,omitempty"`

// WorkWebhookConfiguration represents the customized webhook-server configuration of work.
// +optional
WorkWebhookConfiguration WebhookConfiguration `json:"workWebhookConfiguration,omitempty"`
}

// WebhookConfiguration has two properties: Address and Port.
type WebhookConfiguration struct {
// Address represents the address of a webhook-server.
// It could be in IP format or fqdn format.
// The Address must be reachable by apiserver of the hub cluster.
// +required
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$
Address string `json:"address"`

// Port represents the port of a webhook-server. The default value of Port is 443.
// +optional
// +default=443
// +kubebuilder:default=443
// +kubebuilder:validation:Maximum=65535
Port int32 `json:"port,omitempty"`
}

// DeployOption describes the deploy options for cluster-manager or klusterlet
Expand Down
35 changes: 35 additions & 0 deletions operator/v1/zz_generated.deepcopy.go

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

21 changes: 21 additions & 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.