Skip to content

Commit

Permalink
Allow updating failure domains for existing clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
adiantum committed Jun 6, 2024
1 parent 1affcb4 commit 2726504
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions pkg/providers/nutanix/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,7 @@ func (p *Provider) SetupAndValidateDeleteCluster(ctx context.Context, cluster *t
}

// SetupAndValidateUpgradeCluster - Performs necessary setup and validations for upgrade cluster operation.
func (p *Provider) SetupAndValidateUpgradeCluster(ctx context.Context, cluster *types.Cluster, clusterSpec *cluster.Spec, _ *cluster.Spec) error {
// Get current Nutanix Datacenter Config
curDc, err := p.kubectlClient.GetEksaNutanixDatacenterConfig(ctx, p.datacenterConfig.Name, cluster.KubeconfigFile, clusterSpec.Cluster.Namespace)
if err != nil {
return fmt.Errorf("failed setup and validations: %v", err)
}

if len(curDc.Spec.FailureDomains) != len(p.datacenterConfig.Spec.FailureDomains) {
return fmt.Errorf("failed setup and validations: failure domains upgrade doesn't supported in current release")
}

func (p *Provider) SetupAndValidateUpgradeCluster(ctx context.Context, _ *types.Cluster, clusterSpec *cluster.Spec, _ *cluster.Spec) error {
if err := p.SetupAndValidateUpgradeManagementComponents(ctx, clusterSpec); err != nil {
return err
}
Expand Down

0 comments on commit 2726504

Please sign in to comment.