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
13 changes: 13 additions & 0 deletions data/data/install.openshift.io_installconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,19 @@ spec:
- name
- platform
type: object
cpuPartitioningMode:
default: None
description: CPUPartitioning determines if a cluster should be setup for
CPU workload partitioning at install time. When this field is set the
cluster will be flagged for CPU Partitioning allowing users to segregate
workloads to specific CPU Sets. This does not make any decisions on
workloads it only configures the nodes to allow CPU Partitioning. The
"AllNodes" value will setup all nodes for CPU Partitioning, the default
is "None". This feature is currently in TechPreview.
enum:
- None
- AllNodes
type: string
credentialsMode:
description: "CredentialsMode is used to explicitly set the mode with
which CredentialRequests are satisfied. \n If this field is set, then
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ replace sigs.k8s.io/controller-tools => sigs.k8s.io/controller-tools v0.3.1-0.20

// Override the OpenShift API version in hive

replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230201213816-61d971884921
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230208155555-942fb8575cc4

replace github.com/terraform-providers/terraform-provider-nutanix => github.com/nutanix/terraform-provider-nutanix v1.5.0

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1061,8 +1061,8 @@ github.com/opencontainers/runc v1.0.0-rc90/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2r
github.com/opencontainers/runc v1.1.2 h1:2VSZwLx5k/BfsBxMMipG/LYUnmqOD/BPkIVgQUcTlLw=
github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/selinux v1.5.2/go.mod h1:yTcKuYAh6R95iDpefGLQaPaRwJFwyzAJufJyiTt7s0g=
github.com/openshift/api v0.0.0-20230201213816-61d971884921 h1:19XfhG/rG4oxNOQ1PNtHIjW23z2+QNHC6lH1VZWhSWY=
github.com/openshift/api v0.0.0-20230201213816-61d971884921/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4=
github.com/openshift/api v0.0.0-20230208155555-942fb8575cc4 h1:9UEK3Z+drLMFOVesfa31BaE7nT5SK7M09Wa62lOsoIg=
github.com/openshift/api v0.0.0-20230208155555-942fb8575cc4/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4=
github.com/openshift/assisted-image-service v0.0.0-20220506122314-2f689a1084b8 h1:oZ3VAWiM8tPRBM+vYI4GBmlrqyoqizcgZ7pBy5EX2K8=
github.com/openshift/assisted-image-service v0.0.0-20220506122314-2f689a1084b8/go.mod h1:bH4+AsmPy8mQQvtgedBm2Crs93TDWeXEMlIPrlEMpjA=
github.com/openshift/assisted-service v0.0.0-20220928142635-a40422bdea61 h1:HtUYJBAdRgfVYide0bq3GsT/4n5uPWteA1rIZVXEL7k=
Expand Down
1 change: 1 addition & 0 deletions pkg/asset/manifests/infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func (i *Infrastructure) Generate(dependencies asset.Parents) error {

config.Status.InfrastructureTopology = infrastructureTopology
config.Status.ControlPlaneTopology = controlPlaneTopology
config.Status.CPUPartitioning = determineCPUPartitioning(installConfig.Config)

switch installConfig.Config.Platform.Name() {
case aws.Name:
Expand Down
1 change: 1 addition & 0 deletions pkg/asset/manifests/infrastructure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ func (b infraBuildNamespace) build(opts ...infraOption) *configv1.Infrastructure
ControlPlaneTopology: configv1.HighlyAvailableTopologyMode,
InfrastructureTopology: configv1.HighlyAvailableTopologyMode,
PlatformStatus: &configv1.PlatformStatus{},
CPUPartitioning: configv1.CPUPartitioningNone,
},
}
for _, opt := range opts {
Expand Down
12 changes: 12 additions & 0 deletions pkg/asset/manifests/topologies.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,15 @@ func determineTopologies(installConfig *types.InstallConfig) (controlPlaneTopolo

return controlPlaneTopology, infrastructureTopology
}

func determineCPUPartitioning(installConfig *types.InstallConfig) configv1.CPUPartitioningMode {
if installConfig.FeatureSet != configv1.TechPreviewNoUpgrade {
return configv1.CPUPartitioningNone
}
switch installConfig.CPUPartitioning {
case types.CPUPartitioningAllNodes:
return configv1.CPUPartitioningAllNodes
default:
return configv1.CPUPartitioningNone
}
}
5 changes: 5 additions & 0 deletions pkg/explain/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ func Test_PrintFields(t *testing.T) {
controlPlane <object>
ControlPlane is the configuration for the machines that comprise the control plane.

cpuPartitioningMode <string>
Default: "None"
Valid Values: "None","AllNodes"
CPUPartitioning determines if a cluster should be setup for CPU workload partitioning at install time. When this field is set the cluster will be flagged for CPU Partitioning allowing users to segregate workloads to specific CPU Sets. This does not make any decisions on workloads it only configures the nodes to allow CPU Partitioning. The "AllNodes" value will setup all nodes for CPU Partitioning, the default is "None". This feature is currently in TechPreview.

credentialsMode <string>
Valid Values: "","Mint","Passthrough","Manual"
CredentialsMode is used to explicitly set the mode with which CredentialRequests are satisfied.
Expand Down
21 changes: 21 additions & 0 deletions pkg/types/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ type InstallConfig struct {
// +optional
FIPS bool `json:"fips,omitempty"`

// CPUPartitioning determines if a cluster should be setup for CPU workload partitioning at install time.
// When this field is set the cluster will be flagged for CPU Partitioning allowing users to segregate workloads to
// specific CPU Sets. This does not make any decisions on workloads it only configures the nodes to allow CPU Partitioning.
// The "AllNodes" value will setup all nodes for CPU Partitioning, the default is "None".
// This feature is currently in TechPreview.
//
// +kubebuilder:default="None"
// +optional
CPUPartitioning CPUPartitioningMode `json:"cpuPartitioningMode,omitempty"`

// CredentialsMode is used to explicitly set the mode with which CredentialRequests are satisfied.
//
// If this field is set, then the installer will not attempt to query the cloud permissions before attempting
Expand Down Expand Up @@ -218,6 +228,17 @@ func (c *InstallConfig) IsSingleNodeOpenShift() bool {
return c.BootstrapInPlace != nil
}

// CPUPartitioningMode defines how the nodes should be setup for partitioning the CPU Sets.
// +kubebuilder:validation:Enum=None;AllNodes
type CPUPartitioningMode string

const (
// CPUPartitioningNone means that no CPU Partitioning is on in this cluster infrastructure.
CPUPartitioningNone CPUPartitioningMode = "None"
// CPUPartitioningAllNodes means that all nodes are configured with CPU Partitioning in this cluster.
CPUPartitioningAllNodes CPUPartitioningMode = "AllNodes"
)

// Platform is the configuration for the specific platform upon which to perform
// the installation. Only one of the platform configuration should be set.
type Platform struct {
Expand Down

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

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

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

Loading