From 68227876c677c14ad5126b3210a0e47ac5d6bb16 Mon Sep 17 00:00:00 2001 From: Kyle Squizzato Date: Wed, 3 Jul 2024 13:42:17 -0700 Subject: [PATCH] Fix panic when applying NestedStringSlice type Signed-off-by: Kyle Squizzato --- pkg/product/mke/phase/install_msr3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/product/mke/phase/install_msr3.go b/pkg/product/mke/phase/install_msr3.go index 412ada13..bb4537ac 100644 --- a/pkg/product/mke/phase/install_msr3.go +++ b/pkg/product/mke/phase/install_msr3.go @@ -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) } }