Skip to content

Commit

Permalink
Enable multiple installations by not failing if all existing default …
Browse files Browse the repository at this point in the history
…resources exists
  • Loading branch information
erikzaadi committed Dec 10, 2024
1 parent def14b9 commit bea2a0c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ func validateResourcesDoesNotExist(portClient *cli.PortClient, defaults *Default
var errors []error
if _, err := integration.GetIntegration(portClient, config.StateKey); err == nil {
klog.Warningf("Integration with state key %s already exists", config.StateKey)
return &AbortDefaultCreationError{Errors: []error{
fmt.Errorf("integration with state key %s already exists", config.StateKey),
}}
errors = append(errors, fmt.Errorf("integration with state key %s already exists", config.StateKey))
}

for _, bp := range defaults.Blueprints {
Expand All @@ -165,7 +163,7 @@ func validateResourcesDoesNotExist(portClient *cli.PortClient, defaults *Default
}
}

if errors != nil {
if errors != nil && len(errors) != 3 {
return &AbortDefaultCreationError{Errors: errors}
}
return nil
Expand Down

0 comments on commit bea2a0c

Please sign in to comment.