在集群中可以设置自动加入DNS的CNAME记录

This commit is contained in:
GoEdgeLab
2021-09-20 16:37:48 +08:00
parent 34fb5c11a5
commit d1351f63d6
5 changed files with 136 additions and 18 deletions

View File

@@ -5,7 +5,7 @@ import (
"github.com/TeaOSLab/EdgeCommon/pkg/dnsconfigs"
)
// 解析DNS配置
// DecodeDNSConfig 解析DNS配置
func (this *NodeCluster) DecodeDNSConfig() (*dnsconfigs.ClusterDNSConfig, error) {
if len(this.Dns) == 0 || this.Dns == "null" {
// 一定要返回一个默认的值防止产生nil