Skip to content
Open
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
35 changes: 35 additions & 0 deletions data/data/install.openshift.io_installconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ spec:
For the compute machine pools, the only valid name is "worker".
For the arbiter machine pools, the only valid name is "arbiter".
type: string
osImageStream:
description: |-
OSImageStream specifies the OS Image Stream to use for machines in this pool.
When set, this value overrides the global osImageStream defined in the InstallConfig.
When unset, machines in this pool will inherit the global osImageStream value if configured,
or fall back to the cluster's default OS image stream if neither value is set.
This allows different machine pools to use different OS image streams while maintaining
a common default for the cluster.
type: string
platform:
description: Platform is configuration for machine pool specific to
the platform.
Expand Down Expand Up @@ -1710,6 +1719,15 @@ spec:
For the compute machine pools, the only valid name is "worker".
For the arbiter machine pools, the only valid name is "arbiter".
type: string
osImageStream:
description: |-
OSImageStream specifies the OS Image Stream to use for machines in this pool.
When set, this value overrides the global osImageStream defined in the InstallConfig.
When unset, machines in this pool will inherit the global osImageStream value if configured,
or fall back to the cluster's default OS image stream if neither value is set.
This allows different machine pools to use different OS image streams while maintaining
a common default for the cluster.
type: string
platform:
description: Platform is configuration for machine pool specific
to the platform.
Expand Down Expand Up @@ -3210,6 +3228,15 @@ spec:
For the compute machine pools, the only valid name is "worker".
For the arbiter machine pools, the only valid name is "arbiter".
type: string
osImageStream:
description: |-
OSImageStream specifies the OS Image Stream to use for machines in this pool.
When set, this value overrides the global osImageStream defined in the InstallConfig.
When unset, machines in this pool will inherit the global osImageStream value if configured,
or fall back to the cluster's default OS image stream if neither value is set.
This allows different machine pools to use different OS image streams while maintaining
a common default for the cluster.
type: string
platform:
description: Platform is configuration for machine pool specific to
the platform.
Expand Down Expand Up @@ -4885,6 +4912,14 @@ spec:
- Internal
type: string
type: object
osImageStream:
description: |-
OSImageStream is the global OS Image Stream to be used for all machines in the cluster.
This value serves as the default for all machine pools (control plane, compute, arbiter).
Individual machine pools can override this value by specifying their own osImageStream.
When both this field and the machine pool's osImageStream are unset, the cluster will
use its own default OS image stream.
type: string
platform:
description: |-
Platform is the configuration for the specific platform upon which to
Expand Down
7 changes: 7 additions & 0 deletions pkg/explain/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ the cluster.
operatorPublishingStrategy <object>
OperatorPublishingStrategy controls the visibility of ingress and apiserver. Defaults to public.

osImageStream <string>
OSImageStream is the global OS Image Stream to be used for all machines in the cluster.
This value serves as the default for all machine pools (control plane, compute, arbiter).
Individual machine pools can override this value by specifying their own osImageStream.
When both this field and the machine pool's osImageStream are unset, the cluster will
use its own default OS image stream.

platform <object> -required-
Platform is the configuration for the specific platform upon which to
perform the installation.
Expand Down
27 changes: 27 additions & 0 deletions pkg/types/defaults/validation/featuregates.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,32 @@ func GatedFeatures(c *types.InstallConfig) []featuregates.GatedInstallConfigFeat
}(),
Field: field.NewPath("compute", "diskSetup"),
},
{
FeatureGateName: features.FeatureGateOSStreams,
Condition: len(c.OSImageStream) != 0,
Field: field.NewPath("osImageStream"),
},
{
FeatureGateName: features.FeatureGateOSStreams,
Condition: c.ControlPlane != nil && len(c.ControlPlane.OSImageStream) != 0,
Field: field.NewPath("controlPlane", "osImageStream"),
},
{
FeatureGateName: features.FeatureGateOSStreams,
Condition: c.Arbiter != nil && len(c.Arbiter.OSImageStream) != 0,
Field: field.NewPath("arbiter", "osImageStream"),
},
{
FeatureGateName: features.FeatureGateOSStreams,
Condition: func() bool {
for _, compute := range c.Compute {
if len(compute.OSImageStream) != 0 {
return true
}
}
return false
}(),
Field: field.NewPath("compute", "osImageStream"),
},
}
}
9 changes: 9 additions & 0 deletions pkg/types/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,15 @@ type InstallConfig struct {
// E.g. "featureGates": ["FeatureGate1=true", "FeatureGate2=false"].
// +optional
FeatureGates []string `json:"featureGates,omitempty"`

// OSImageStream is the global OS Image Stream to be used for all machines in the cluster.
// This value serves as the default for all machine pools (control plane, compute, arbiter).
// Individual machine pools can override this value by specifying their own osImageStream.
// When both this field and the machine pool's osImageStream are unset, the cluster will
// use its own default OS image stream.
//
// +optional
OSImageStream string `json:"osImageStream,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make this an "enum", similar to this example:

Publish PublishingStrategy `json:"publish,omitempty"`

In which case, the explain data would show valid values.

}

// ClusterDomain returns the DNS domain that all records for a cluster must belong to.
Expand Down
10 changes: 10 additions & 0 deletions pkg/types/machinepools.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ type MachinePool struct {
// The available types are etcd, swap and user-defined.
// +optional
DiskSetup []Disk `json:"diskSetup,omitempty"`

// OSImageStream specifies the OS Image Stream to use for machines in this pool.
// When set, this value overrides the global osImageStream defined in the InstallConfig.
// When unset, machines in this pool will inherit the global osImageStream value if configured,
// or fall back to the cluster's default OS image stream if neither value is set.
// This allows different machine pools to use different OS image streams while maintaining
// a common default for the cluster.
//
// +optional
OSImageStream string `json:"osImageStream,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is being actively discussed, but my understanding is that at present we will not allow mixed clusters (e.g. we will not allow control plane on 10 and compute on 9). If I'm correct in my understanding, we can simply remove this field from the machine pool...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point I wasn't also very sure of. So in the final implementation all the nodes will be either rhcos 9 or 10? @pablintino can you confirm?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I revisited this discussion and I was slightly mistaken:

OpenShift 5 will allow mixed clusters day-2.
So the spirit of the original comment stands: at install time the nodes should be a single os stream.

}

// MachinePoolPlatform is the platform-specific configuration for a machine
Expand Down