Skip to content

Commit

Permalink
MGMT-15796: set CloudControllerManager to External for OCI (#5877)
Browse files Browse the repository at this point in the history
The installer indroduces a breaking change in the definition of the external
platform through openshift/installer#7581. Previously,
the CCM was enabled without a way to disable it, now it will be disabled by
default with a way to enable it.

This change ensure the CCM is enabled when platform is oci in order to keep the
current behaviour.

Co-authored-by: Adrien Gentil <agentil@redhat.com>
  • Loading branch information
pawanpinjarkar and adriengentil committed Jan 11, 2024
1 parent 0634e0a commit f3a6b80
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions internal/installcfg/installcfg.go
Expand Up @@ -128,8 +128,23 @@ type NutanixPrismElement struct {
Name string `yaml:"name"`
}

// CloudControllerManager describes the type of cloud controller manager to be enabled.
type CloudControllerManager string

const (
// CloudControllerManagerTypeExternal specifies that an external cloud provider is to be configured.
CloudControllerManagerTypeExternal = "External"

// CloudControllerManagerTypeNone specifies that no cloud provider is to be configured.
CloudControllerManagerTypeNone = ""
)

type ExternalInstallConfigPlatform struct {
// PlatformName holds the arbitrary string representing the infrastructure provider name, expected to be set at the installation time.
PlatformName string `yaml:"platformName"`

// CloudControllerManager when set to external, this property will enable an external cloud provider.
CloudControllerManager CloudControllerManager `yaml:"cloudControllerManager"`
}

type PlatformNone struct {
Expand Down
3 changes: 2 additions & 1 deletion internal/provider/external/installConfig.go
Expand Up @@ -12,7 +12,8 @@ import (
func (p baseExternalProvider) AddPlatformToInstallConfig(cfg *installcfg.InstallerConfigBaremetal, cluster *common.Cluster) error {
cfg.Platform = installcfg.Platform{
External: &installcfg.ExternalInstallConfigPlatform{
PlatformName: string(p.Name()),
PlatformName: string(p.Name()),
CloudControllerManager: installcfg.CloudControllerManagerTypeExternal,
},
}

Expand Down

0 comments on commit f3a6b80

Please sign in to comment.