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

This commit is contained in:
刘祥超
2021-09-20 16:37:48 +08:00
parent 7a1bd29f6f
commit d121bc86a0
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