mirror of
https://github.com/openshift/installer.git
synced 2026-02-06 00:48:45 +01:00
feat: add override for control plane fencing creds
Signed-off-by: ehila <ehila@redhat.com>
This commit is contained in:
@@ -105,6 +105,14 @@ type agentClusterInstallPlatform struct {
|
||||
Nutanix *nutanix.Platform `json:"nutanix,omitempty"`
|
||||
}
|
||||
|
||||
// Used for overriding fields in the control plane object.
|
||||
// Note: we are avoiding pulling in the types.MachinePool to avoid any accidental serializations, we are being
|
||||
// explicit here on what we wish to override.
|
||||
type agentClusterInstallControlPlane struct {
|
||||
// Allow overriding Fencing credentials
|
||||
Fencing *types.Fencing `json:"fencing,omitempty"`
|
||||
}
|
||||
|
||||
// Used to generate InstallConfig overrides for Assisted Service to apply
|
||||
type agentClusterInstallInstallConfigOverrides struct {
|
||||
// FIPS configures https://www.nist.gov/itl/fips-general-information
|
||||
@@ -127,6 +135,8 @@ type agentClusterInstallInstallConfigOverrides struct {
|
||||
FeatureSet configv1.FeatureSet `json:"featureSet,omitempty"`
|
||||
// Allow override of FeatureGates
|
||||
FeatureGates []string `json:"featureGates,omitempty"`
|
||||
// Allow overriding ControlPlane fields
|
||||
ControlPlane *agentClusterInstallControlPlane `json:"controlPlane,omitempty"`
|
||||
}
|
||||
|
||||
var _ asset.WritableAsset = (*AgentClusterInstall)(nil)
|
||||
@@ -258,6 +268,13 @@ func (a *AgentClusterInstall) Generate(_ context.Context, dependencies asset.Par
|
||||
icOverrides.FeatureGates = installConfig.Config.FeatureGates
|
||||
}
|
||||
|
||||
if installConfig.Config.ControlPlane.Fencing != nil && len(installConfig.Config.ControlPlane.Fencing.Credentials) > 0 {
|
||||
icOverridden = true
|
||||
icOverrides.ControlPlane = &agentClusterInstallControlPlane{
|
||||
Fencing: installConfig.Config.ControlPlane.Fencing,
|
||||
}
|
||||
}
|
||||
|
||||
if installConfig.Config.Proxy != nil {
|
||||
rendezvousIP := ""
|
||||
if agentConfig.Config != nil {
|
||||
|
||||
Reference in New Issue
Block a user