Skip to content

Commit

Permalink
Merge pull request openshift#2210 from openshift/revert-2209-OCM_9094…
Browse files Browse the repository at this point in the history
…_multi_arch_enabled

Revert "OCM-9094 | feat: support multi-arch-enabled parameter"
  • Loading branch information
openshift-merge-bot[bot] authored Jun 28, 2024
2 parents 4028b95 + 0b38e21 commit 1e7cd7b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 41 deletions.
24 changes: 0 additions & 24 deletions cmd/create/cluster/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,6 @@ var args struct {

// Control Plane machine pool attributes
additionalControlPlaneSecurityGroupIds []string

// Multi arch enabled
multiArchEnabled bool
}

var autoscalerArgs *clusterautoscaler.AutoscalerArgs
Expand Down Expand Up @@ -842,14 +839,6 @@ func initFlags(cmd *cobra.Command) {
listInputMessage,
)

flags.BoolVar(
&args.multiArchEnabled,
"multi-arch-enabled",
false,
"Enable workers in arm64 architecture for Hosted Control Plane clusters.",
)
flags.MarkHidden("multi-arch-enabled")

interactive.AddModeFlag(cmd)
interactive.AddFlag(flags)
output.AddFlag(cmd)
Expand Down Expand Up @@ -1204,14 +1193,6 @@ func run(cmd *cobra.Command, _ []string) {
}
}

multiArchEnabled := args.multiArchEnabled
if multiArchEnabled {
if !isHostedCP {
r.Reporter.Errorf("Workers in arm64 architecture are only supported for a Hosted Control Plane cluster.")
os.Exit(1)
}
}

etcdEncryptionKmsARN := args.etcdEncryptionKmsARN

if etcdEncryptionKmsARN != "" && !isHostedCP {
Expand Down Expand Up @@ -3156,7 +3137,6 @@ func run(cmd *cobra.Command, _ []string) {
AdditionalInfraSecurityGroupIds: additionalInfraSecurityGroupIds,
AdditionalControlPlaneSecurityGroupIds: additionalControlPlaneSecurityGroupIds,
AdditionalAllowedPrincipals: additionalAllowedPrincipals,
MultiArchEnabled: multiArchEnabled,
}

if httpTokens != "" {
Expand Down Expand Up @@ -3958,10 +3938,6 @@ func buildCommand(spec ocm.Spec, operatorRolesPrefix string,
strings.Join(spec.AdditionalAllowedPrincipals, ","))
}

if spec.MultiArchEnabled {
command += " --multi-arch-enabled"
}

for _, p := range properties {
command += fmt.Sprintf(" --properties \"%s\"", p)
}
Expand Down
10 changes: 0 additions & 10 deletions cmd/describe/cluster/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,6 @@ func run(cmd *cobra.Command, argv []string) {
"Additional Principals: %s\n", str,
strings.Join(cluster.AWS().AdditionalAllowedPrincipals(), ","))
}
str = fmt.Sprintf("%s"+
"Multi Architecture Workers: %s\n", str, getMultiArchEnabledStatus(cluster))
}

if cluster.Status().State() == cmv1.ClusterStateError {
Expand Down Expand Up @@ -841,14 +839,6 @@ func getExternalAuthConfigStatus(cluster *cmv1.Cluster) string {
return externalAuthConfigStatus
}

func getMultiArchEnabledStatus(cluster *cmv1.Cluster) string {
multiArchEnabledStatus := DisabledOutput
if cluster.MultiArchEnabled() {
multiArchEnabledStatus = EnabledOutput
}
return multiArchEnabledStatus
}

func getRolePolicyBindings(roleARN string, rolePolicyDetails map[string][]aws.PolicyDetail,
prefix string) (string, error) {
roleName, err := aws.GetResourceIdFromARN(roleARN)
Expand Down
7 changes: 0 additions & 7 deletions pkg/ocm/clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ type Spec struct {

// Control Plane Machine Pool attributes
AdditionalControlPlaneSecurityGroupIds []string

// Workers with arm64 architecture
MultiArchEnabled bool
}

// Volume represents a volume property for a disk
Expand Down Expand Up @@ -1068,10 +1065,6 @@ func (c *Client) createClusterSpec(config Spec) (*cmv1.Cluster, error) {
clusterBuilder.Autoscaler(BuildClusterAutoscaler(config.AutoscalerConfig))
}

if config.MultiArchEnabled {
clusterBuilder.MultiArchEnabled(config.MultiArchEnabled)
}

clusterSpec, err := clusterBuilder.Build()
if err != nil {
return nil, fmt.Errorf("Failed to create description of cluster: %v", err)
Expand Down

0 comments on commit 1e7cd7b

Please sign in to comment.