Skip to content

Commit

Permalink
Hubsize update (#677)
Browse files Browse the repository at this point in the history
* Updated values.yaml for hubsize

Signed-off-by: Nathaniel Graham <[email protected]>

* Updated HubSize default to Small

Signed-off-by: Nathaniel Graham <[email protected]>

* Removed incorrect comment

Signed-off-by: Nathaniel Graham <[email protected]>

* Updated default to Small

- Also changed ExtraLarge to XLarge

Signed-off-by: Nathaniel Graham <[email protected]>

* Removed component CRD from crd/bases

Signed-off-by: Nathaniel Graham <[email protected]>

---------

Signed-off-by: Nathaniel Graham <[email protected]>
  • Loading branch information
ngraham20 authored Apr 26, 2024
1 parent 15d21f8 commit 6eee632
Show file tree
Hide file tree
Showing 22 changed files with 86 additions and 49 deletions.
15 changes: 7 additions & 8 deletions api/v1/multiclusterengine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ type AvailabilityType string

type HubSize string

// Putting medium first here defaults it to Medium
const (
Small = "Small"
Medium = "Medium"
Large = "Large"
ExtraLarge = "ExtraLarge"
Small = "Small"
Medium = "Medium"
Large = "Large"
XLarge = "XLarge"
)

// DeploymentMode
Expand Down Expand Up @@ -61,9 +60,9 @@ type MultiClusterEngineSpec struct {
NodeSelector map[string]string `json:"nodeSelector,omitempty"`

// The resource allocation bucket for this hub to use.
// Small, Medium, Large, ExtraLarge]. Defaults to Medium if not specified.
//+kubebuilder:validation:Enum:=Small;Medium;Large;ExtraLarge
//+kubebuilder:default:=Medium
// Small, Medium, Large, XLarge]. Defaults to Small if not specified.
//+kubebuilder:validation:Enum:=Small;Medium;Large;XLarge
//+kubebuilder:default:=Small
//+kubebuilder:validation:Type:=string
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Hub Size",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:hidden"}
HubSize HubSize `json:"hubSize,omitempty"`
Expand Down
23 changes: 21 additions & 2 deletions bundle/manifests/multicluster-engine.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
}
]
capabilities: Basic Install
createdAt: "2024-04-01T22:23:48Z"
createdAt: "2024-04-25T18:14:26Z"
operators.operatorframework.io/builder: operator-sdk-v1.34.1
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
name: multicluster-engine.v0.0.1
Expand All @@ -41,7 +41,7 @@ spec:
- urn:alm:descriptor:com.tectonic.ui:select:High
- urn:alm:descriptor:com.tectonic.ui:select:Basic
- description: The resource allocation bucket for this hub to use. Small, Medium,
Large, ExtraLarge]. Defaults to Medium if not specified.
Large, XLarge]. Defaults to Small if not specified.
displayName: Hub Size
path: hubSize
x-descriptors:
Expand Down Expand Up @@ -594,6 +594,23 @@ spec:
- patch
- update
- watch
- apiGroups:
- addon.open-cluster-management.io
resources:
- clustermanagementaddons
- clustermanagementaddons/finalizers
- clustermanagementaddons/status
- managedclusteraddons
- managedclusteraddons/finalizers
- managedclusteraddons/status
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- addon.open-cluster-management.io
resources:
Expand Down Expand Up @@ -1553,6 +1570,8 @@ spec:
- dnses
verbs:
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ spec:
Options are: Basic and High (default)'
type: string
hubSize:
default: Medium
default: Small
description: The resource allocation bucket for this hub to use. Small,
Medium, Large, ExtraLarge]. Defaults to Medium if not specified.
Medium, Large, XLarge]. Defaults to Small if not specified.
enum:
- Small
- Medium
- Large
- ExtraLarge
- XLarge
type: string
imagePullSecret:
description: Override pull secret for accessing MultiClusterEngine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ spec:
Options are: Basic and High (default)'
type: string
hubSize:
default: Medium
default: Small
description: The resource allocation bucket for this hub to use. Small,
Medium, Large, ExtraLarge]. Defaults to Medium if not specified.
Medium, Large, XLarge]. Defaults to Small if not specified.
enum:
- Small
- Medium
- Large
- ExtraLarge
- XLarge
type: string
imagePullSecret:
description: Override pull secret for accessing MultiClusterEngine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
- urn:alm:descriptor:com.tectonic.ui:select:High
- urn:alm:descriptor:com.tectonic.ui:select:Basic
- description: The resource allocation bucket for this hub to use. Small, Medium,
Large, ExtraLarge]. Defaults to Medium if not specified.
Large, XLarge]. Defaults to Small if not specified.
displayName: Hub Size
path: hubSize
x-descriptors:
Expand Down
1 change: 1 addition & 0 deletions hack/bundle-automation/chart-templates/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ global:
templateOverrides: {}
namespace: default
pullSecret: null
hubSize: Small
hubconfig:
nodeSelector: null
proxyConfigs: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ featureGates:
agentImagePullSecret: ""
enableAddOnDeploymentConfig: true
hubDeployMode: AddOnTemplate
global:
hubSize: Small
3 changes: 3 additions & 0 deletions pkg/rendering/renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type Global struct {
PullSecret string `json:"pullSecret" structs:"pullSecret"`
Namespace string `json:"namespace" structs:"namespace"`
ConfigSecret string `json:"configSecret" structs:"configSecret"`
HubSize v1.HubSize `json:"hubSize" structs:"hubSize" yaml:"hubSize"`
}

type HubConfig struct {
Expand Down Expand Up @@ -313,6 +314,8 @@ func injectValuesOverrides(values *Values, backplaneConfig *v1.MultiClusterEngin

values.Global.Namespace = backplaneConfig.Spec.TargetNamespace

values.Global.HubSize = backplaneConfig.Spec.HubSize

values.Global.PullSecret = backplaneConfig.Spec.ImagePullSecret

if v1.IsInHostedMode(backplaneConfig) {
Expand Down
1 change: 1 addition & 0 deletions pkg/templates/charts/always/rbac-aggregates/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
global:
imageOverrides: []
pullSecret: null
hubSize: Small
hubconfig:
nodeSelector: null
proxyConfigs: {}
Expand Down
17 changes: 9 additions & 8 deletions pkg/templates/charts/hosted/server-foundation/values.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
global:
imageOverrides:
multicloud_manager: quay.io/test/test:test
pullSecret: ""
namespace: default
imageOverrides:
multicloud_manager: quay.io/test/test:test
pullSecret: ""
namespace: default
hubSize: Small
hubconfig:
nodeSelector: {}
proxyConfigs: {}
replicaCount: 1
tolerations: []
nodeSelector: {}
proxyConfigs: {}
replicaCount: 1
tolerations: []
org: open-cluster-management
17 changes: 9 additions & 8 deletions pkg/templates/charts/hosting/server-foundation/values.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
global:
imageOverrides:
multicloud_manager: quay.io/test/test:test
pullSecret: ""
namespace: default
imageOverrides:
multicloud_manager: quay.io/test/test:test
pullSecret: ""
namespace: default
hubSize: Small
hubconfig:
nodeSelector: {}
proxyConfigs: {}
replicaCount: 1
tolerations: []
nodeSelector: {}
proxyConfigs: {}
replicaCount: 1
tolerations: []
org: open-cluster-management
1 change: 1 addition & 0 deletions pkg/templates/charts/toggle/assisted-service/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
hubSize: Small
imageOverrides:
assisted_image_service: ''
assisted_installer: ''
Expand Down
1 change: 1 addition & 0 deletions pkg/templates/charts/toggle/cluster-lifecycle/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ global:
templateOverrides: {}
pullSecret: ""
namespace: default
hubSize: Small
hubconfig:
nodeSelector: {}
proxyConfigs: {}
Expand Down
1 change: 1 addition & 0 deletions pkg/templates/charts/toggle/cluster-manager/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
hubSize: Small
imageOverrides:
registration_operator: ''
namespace: default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ global:
cluster_proxy_addon: ""
cluster_proxy: ""
templateOverrides: {}
hubSize: Small
hubconfig:
nodeSelector: null
replicaCount: 1
proxyConfigs: {}
tolerations: []
ocpVersion: "4.12.0"
org: open-cluster-management

11 changes: 6 additions & 5 deletions pkg/templates/charts/toggle/console-mce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ global:
imageOverrides:
console_mce: ""
templateOverrides: {}
# Available template overrides:
# console_mce_deployment_container_memory_request: <memory-value>
# console_mce_deployment_container_memory_limit: <memory-value>
# console_mce_deployment_container_cpu_request: <cpu-value>
# console_mce_deployment_container_cpu_limit: <cpu-value>
# Available template overrides:
# console_mce_deployment_container_memory_request: <memory-value>
# console_mce_deployment_container_memory_limit: <memory-value>
# console_mce_deployment_container_cpu_request: <cpu-value>
# console_mce_deployment_container_cpu_limit: <cpu-value>
pullPolicy: Always
namespace: default
pullSecret: null
hubSize: Small
hubconfig:
nodeSelector: null
proxyConfigs: {}
Expand Down
1 change: 1 addition & 0 deletions pkg/templates/charts/toggle/discovery-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
hubSize: Small
imageOverrides:
discovery_operator: ''
namespace: default
Expand Down
1 change: 1 addition & 0 deletions pkg/templates/charts/toggle/hive-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
hubSize: Small
imageOverrides:
openshift_hive: ''
namespace: default
Expand Down
1 change: 1 addition & 0 deletions pkg/templates/charts/toggle/hypershift/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ global:
templateOverrides: {}
namespace: default
pullSecret: null
hubSize: Small
hubconfig:
nodeSelector: null
proxyConfigs: {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
hubSize: Small
imageOverrides:
image_based_install_operator: ''
namespace: default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global:
hubSize: Small
imageOverrides:
managed_serviceaccount: ''
namespace: default
Expand Down
21 changes: 11 additions & 10 deletions pkg/templates/charts/toggle/server-foundation/values.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
global:
imageOverrides:
multicloud_manager: quay.io/test/test:test
templateOverrides: {}
pullSecret: ""
namespace: default
imageOverrides:
multicloud_manager: quay.io/test/test:test
templateOverrides: {}
pullSecret: ""
namespace: default
hubSize: Small
hubconfig:
nodeSelector: {}
proxyConfigs: {}
replicaCount: 1
tolerations: []
ocpVersion: "4.12.0"
nodeSelector: {}
proxyConfigs: {}
replicaCount: 1
tolerations: []
ocpVersion: "4.12.0"
org: open-cluster-management

0 comments on commit 6eee632

Please sign in to comment.