创建集群的时候可以设置DNS记录的默认TTL

This commit is contained in:
GoEdgeLab
2022-09-08 11:02:19 +08:00
parent f5d5dc6883
commit 6c4395ed5e
3 changed files with 14 additions and 2 deletions

View File

@@ -63,6 +63,7 @@ func (this *CreateAction) RunPost(params struct {
// DNS相关
DnsDomainId int64
DnsName string
DnsTTL int32
Must *actions.Must
}) {
@@ -93,7 +94,7 @@ func (this *CreateAction) RunPost(params struct {
// TODO 检查DnsDomainId的有效性
// 系统服务
systemServices := map[string]interface{}{}
var systemServices = map[string]any{}
if params.SystemdServiceIsOn {
systemServices[nodeconfigs.SystemServiceTypeSystemd] = &nodeconfigs.SystemdServiceConfig{
IsOn: true,
@@ -111,6 +112,7 @@ func (this *CreateAction) RunPost(params struct {
InstallDir: params.InstallDir,
DnsDomainId: params.DnsDomainId,
DnsName: params.DnsName,
DnsTTL: params.DnsTTL,
HttpCachePolicyId: params.CachePolicyId,
HttpFirewallPolicyId: params.HttpFirewallPolicyId,
SystemServicesJSON: systemServicesJSON,