Skip to content

Commit

Permalink
Fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
roivaz committed Jul 15, 2024
1 parent 249af9a commit 675e62e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/resource_builders/service/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@ func MergeWithDefaultPublishingStrategy(defaults []ServiceDescriptor, in *saasv1

out := []ServiceDescriptor{}

// NOTE: the mode is always set to Merge by the API defaulter
// if the user leaves it unset
switch *in.Mode {
var mode saasv1alpha1.PublishingStrategiesReconcileMode
if in.Mode != nil {
mode = *in.Mode
} else {
mode = saasv1alpha1.PublishingStrategiesReconcileModeMerge
}
switch mode {

case saasv1alpha1.PublishingStrategiesReconcileModeReplace:
var merr util.MultiError
Expand Down

0 comments on commit 675e62e

Please sign in to comment.