Skip to content

Commit

Permalink
Fix panic when applying NestedStringSlice type
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Squizzato <[email protected]>
  • Loading branch information
squizzi authored and james-nesbitt committed Jul 9, 2024
1 parent d875f8c commit 6822787
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/product/mke/phase/install_msr3.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (p *InstallOrUpgradeMSR3) Run() error {

// Configure Nginx.DNSNames if a LoadBalancerURL is specified.
if p.Config.Spec.MSR.V3.ShouldConfigureLB() {
if err := unstructured.SetNestedField(msr.Object, []string{"nginx", "localhost", p.Config.Spec.MSR.V3.LoadBalancerURL}, "spec", "nginx", "dnsNames"); err != nil {
if err := unstructured.SetNestedStringSlice(msr.Object, []string{"nginx", "localhost", p.Config.Spec.MSR.V3.LoadBalancerURL}, "spec", "nginx", "dnsNames"); err != nil {
return fmt.Errorf("failed to set MSR spec.nginx.dnsNames to include LoadBalancerURL: %q: %w", p.Config.Spec.MSR.V3.LoadBalancerURL, err)
}
}
Expand Down

0 comments on commit 6822787

Please sign in to comment.