From ac048d30b02dfb4574c464d71b3a332c77227983 Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Tue, 12 Mar 2019 16:56:16 -0700 Subject: [PATCH] Handle dnsconfig being a pointer --- cluster/defaults.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cluster/defaults.go b/cluster/defaults.go index 2123f1de..b27193ae 100644 --- a/cluster/defaults.go +++ b/cluster/defaults.go @@ -150,7 +150,8 @@ func (c *Cluster) setClusterDefaults(ctx context.Context) error { return err } - if len(c.DNS.Provider) == 0 { + if c.DNS == nil || len(c.DNS.Provider) == 0 { + c.DNS = &v3.DNSConfig{} c.DNS.Provider = DefaultDNSProvider }