Skip to content

Commit

Permalink
add resource type struct and make update
Browse files Browse the repository at this point in the history
Signed-off-by: haolin <[email protected]>
  • Loading branch information
haowells committed Nov 24, 2023
1 parent b8f4303 commit a33606c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ spec:
registrationImagePullSpec:
description: RegistrationImagePullSpec represents the desired image configuration of registration agent. quay.io/open-cluster-management.io/registration:latest will be used if unspecified.
type: string
resourceType:
description: ResourceType specify QoS classes of klusterlet deployment
type: object
properties:
type:
type: string
workConfiguration:
description: WorkConfiguration contains the configuration of work
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ spec:
configuration of registration agent. quay.io/open-cluster-management.io/registration:latest
will be used if unspecified.
type: string
resourceType:
description: ResourceType specify QoS classes of klusterlet deployment
properties:
type:
type: string
type: object
workConfiguration:
description: WorkConfiguration contains the configuration of work
properties:
Expand Down
16 changes: 14 additions & 2 deletions operator/v1/types_klusterlet.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,21 @@ type KlusterletSpec struct {
// +optional
HubApiServerHostAlias *HubApiServerHostAlias `json:"hubApiServerHostAlias,omitempty"`

// BestEffortResource allow use the best effort resource for operator/registration/work deployment
// ResourceType specify QoS classes of klusterlet deployment
// +optional
BestEffortResource bool `json:"bestEffortResource,omitempty"`
ResourceType ResourceType `json:"resourceType,omitempty"`
}

type ResourceQosClass string

const (
ResourceQosClassDefault ResourceQosClass = "Default"
ResourceQosClassBestEffort ResourceQosClass = "BestEffort"
)

// ResourceType allow user override the default pod QoS classes
type ResourceType struct {
Type ResourceQosClass `json:"type"`
}

// ServerURL represents the apiserver url and ca bundle that is accessible externally
Expand Down
9 changes: 9 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.

0 comments on commit a33606c

Please sign in to comment.