Skip to content

Commit 011f115

Browse files
authored
Merge pull request #1219 from zexi/global-service-config
feat(operator): global-service-config
2 parents dc3b80c + 86e929b commit 011f115

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+125
-76
lines changed

pkg/apis/onecloud/v1alpha1/defaults.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ func setDefaults_MonitorStackSpec(obj *MonitorStackSpec) {
746746
}
747747

748748
func SetDefaults_OnecloudClusterConfig(obj *OnecloudClusterConfig) {
749+
SetDefaults_GlobalServiceCommonConfig(&obj.CommonConfig)
749750
setDefaults_KeystoneConfig(&obj.Keystone)
750751

751752
type userPort struct {
@@ -812,6 +813,21 @@ func SetDefaults_OnecloudClusterConfig(obj *OnecloudClusterConfig) {
812813
setDefaults_DBConfig(&obj.Grafana.DB, constants.MonitorStackGrafanaDB, constants.MonitorStackGrafanaDBUer)
813814
}
814815

816+
func SetDefaults_GlobalServiceCommonConfig(g *GlobalServiceCommonConfig) {
817+
if g.CronJobWorkerCount == 0 {
818+
g.CronJobWorkerCount = 4
819+
}
820+
if g.LocalTaskWorkerCount == 0 {
821+
g.LocalTaskWorkerCount = 4
822+
}
823+
if g.RequestWorkerCount == 0 {
824+
g.RequestWorkerCount = 8
825+
}
826+
if g.TaskWorkerCount == 0 {
827+
g.TaskWorkerCount = 4
828+
}
829+
}
830+
815831
func SetDefaults_ServiceBaseConfig(obj *ServiceBaseConfig, port int) {
816832
if obj.Port == 0 {
817833
obj.Port = port

pkg/apis/onecloud/v1alpha1/types.go

Lines changed: 42 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,43 +1190,51 @@ type GrafanaConfig struct {
11901190
DB DBConfig `json:"db"`
11911191
}
11921192

1193+
type GlobalServiceCommonConfig struct {
1194+
CronJobWorkerCount int `json:"cron_job_worker_count" default:"4"`
1195+
LocalTaskWorkerCount int `json:"local_task_worker_count" default:"4"`
1196+
RequestWorkerCount int `json:"request_worker_count" default:"8"`
1197+
TaskWorkerCount int `json:"task_worker_count" default:"4"`
1198+
}
1199+
11931200
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
11941201

11951202
type OnecloudClusterConfig struct {
11961203
metav1.TypeMeta
11971204

1198-
Keystone KeystoneConfig `json:"keystone"`
1199-
RegionServer RegionConfig `json:"region"`
1200-
Glance GlanceConfig `json:"glance"`
1201-
Webconsole ServiceDBCommonOptions `json:"webconsole"`
1202-
Logger ServiceDBCommonOptions `json:"logger"`
1203-
Yunionconf ServiceDBCommonOptions `json:"yunionconf"`
1204-
Yunionagent ServiceDBCommonOptions `json:"yunionagent"`
1205-
KubeServer ServiceDBCommonOptions `json:"kubeserver"`
1206-
AnsibleServer ServiceDBCommonOptions `json:"ansibleserver"`
1207-
Monitor ServiceDBCommonOptions `json:"monitor"`
1208-
Suggestion ServiceDBCommonOptions `json:"suggestion"`
1209-
Cloudnet ServiceDBCommonOptions `json:"cloudnet"`
1210-
Cloudproxy ServiceDBCommonOptions `json:"cloudproxy"`
1211-
Cloudevent ServiceDBCommonOptions `json:"cloudevent"`
1212-
APIGateway ServiceCommonOptions `json:"apiGateway"`
1213-
Cloudmon ServiceCommonOptions `json:"cloudmon"`
1214-
Notify ServiceDBCommonOptions `json:"notify"`
1215-
HostAgent HostConfig `json:"host"`
1216-
Lbagent LbagentConfig `json:"lbagent"`
1217-
BaremetalAgent BaremetalConfig `json:"baremetal"`
1218-
S3gateway ServiceCommonOptions `json:"s3gateway"`
1219-
Devtool ServiceDBCommonOptions `json:"devtool"`
1220-
Meter MeterConfig `json:"meter"`
1221-
Billing ServiceDBCommonOptions `json:"billing"`
1222-
AutoUpdate ServiceDBCommonOptions `json:"autoupdate"`
1223-
EsxiAgent EsxiAgentConfig `json:"esxiagent"`
1224-
VpcAgent VpcAgentConfig `json:"vpcagent"`
1225-
ServiceOperator ServiceCommonOptions `json:"onecloudServiceOperator"`
1226-
Itsm ItsmConfig `json:"itsm"`
1227-
CloudId ServiceDBCommonOptions `json:"cloudid"`
1228-
Report ServiceDBCommonOptions `json:"report"`
1229-
Grafana GrafanaConfig `json:"grafana"`
1230-
BastionHost ServiceDBCommonOptions `json:"bastionHost"`
1231-
Extdb ServiceDBCommonOptions `json:"extdb"`
1205+
CommonConfig GlobalServiceCommonConfig `json:"commonConfig"`
1206+
Keystone KeystoneConfig `json:"keystone"`
1207+
RegionServer RegionConfig `json:"region"`
1208+
Glance GlanceConfig `json:"glance"`
1209+
Webconsole ServiceDBCommonOptions `json:"webconsole"`
1210+
Logger ServiceDBCommonOptions `json:"logger"`
1211+
Yunionconf ServiceDBCommonOptions `json:"yunionconf"`
1212+
Yunionagent ServiceDBCommonOptions `json:"yunionagent"`
1213+
KubeServer ServiceDBCommonOptions `json:"kubeserver"`
1214+
AnsibleServer ServiceDBCommonOptions `json:"ansibleserver"`
1215+
Monitor ServiceDBCommonOptions `json:"monitor"`
1216+
Suggestion ServiceDBCommonOptions `json:"suggestion"`
1217+
Cloudnet ServiceDBCommonOptions `json:"cloudnet"`
1218+
Cloudproxy ServiceDBCommonOptions `json:"cloudproxy"`
1219+
Cloudevent ServiceDBCommonOptions `json:"cloudevent"`
1220+
APIGateway ServiceCommonOptions `json:"apiGateway"`
1221+
Cloudmon ServiceCommonOptions `json:"cloudmon"`
1222+
Notify ServiceDBCommonOptions `json:"notify"`
1223+
HostAgent HostConfig `json:"host"`
1224+
Lbagent LbagentConfig `json:"lbagent"`
1225+
BaremetalAgent BaremetalConfig `json:"baremetal"`
1226+
S3gateway ServiceCommonOptions `json:"s3gateway"`
1227+
Devtool ServiceDBCommonOptions `json:"devtool"`
1228+
Meter MeterConfig `json:"meter"`
1229+
Billing ServiceDBCommonOptions `json:"billing"`
1230+
AutoUpdate ServiceDBCommonOptions `json:"autoupdate"`
1231+
EsxiAgent EsxiAgentConfig `json:"esxiagent"`
1232+
VpcAgent VpcAgentConfig `json:"vpcagent"`
1233+
ServiceOperator ServiceCommonOptions `json:"onecloudServiceOperator"`
1234+
Itsm ItsmConfig `json:"itsm"`
1235+
CloudId ServiceDBCommonOptions `json:"cloudid"`
1236+
Report ServiceDBCommonOptions `json:"report"`
1237+
Grafana GrafanaConfig `json:"grafana"`
1238+
BastionHost ServiceDBCommonOptions `json:"bastionHost"`
1239+
Extdb ServiceDBCommonOptions `json:"extdb"`
12321240
}

pkg/apis/onecloud/v1alpha1/zz_generated.deepcopy.go

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/onecloud/v1alpha1/zz_generated.defaults.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/manager/component/autoupdate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (m *autoUpdateManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1al
117117
}
118118
option.SetClickhouseOptions(&opt.DBOptions, oc.Spec.Clickhouse, config.ClickhouseConf)
119119
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
120-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
120+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
121121

122122
opt.Port = config.Port
123123
opt.UpdateServer = "https://iso.yunion.cn"

pkg/manager/component/bastionhost.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (m *bastionHostManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1a
9797
}
9898

9999
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
100-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
100+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
101101
// opt.AutoSyncTable = true
102102
opt.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
103103
opt.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)

pkg/manager/component/billing.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (b *billingManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alpha
107107

108108
option.SetClickhouseOptions(&opt.DBOptions, oc.Spec.Clickhouse, config.ClickhouseConf)
109109
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
110-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
110+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
111111

112112
// TODO: fix this
113113
// opt.AutoSyncTable = true

pkg/manager/component/cloudevent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func (m *cloudeventManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1al
100100

101101
option.SetClickhouseOptions(&opt.DBOptions, oc.Spec.Clickhouse, config.ClickhouseConf)
102102
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
103-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
103+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
104104
opt.AutoSyncTable = true
105105
opt.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
106106
opt.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)

pkg/manager/component/cloudnetserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (m *cloudnetManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alph
9393
}
9494

9595
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
96-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
96+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
9797
opt.AutoSyncTable = true
9898
opt.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
9999
opt.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)

pkg/manager/component/cloudproxyserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (m *cloudproxyManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1al
9494
}
9595

9696
option.SetOptionsServiceTLS(&opt.CommonOptions.BaseOptions, false)
97-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
97+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
9898
opt.AutoSyncTable = true
9999
opt.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
100100
opt.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)

pkg/manager/component/devtool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (m *devtoolManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alpha
9292
}
9393

9494
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
95-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
95+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
9696
opt.Port = config.Port
9797
opt.AutoSyncTable = true
9898

pkg/manager/component/extdb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (m *extdbManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.
9999
}
100100

101101
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
102-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
102+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
103103
opt.AutoSyncTable = true
104104
opt.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
105105
opt.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)

pkg/manager/component/host.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (m *hostManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.O
6161
}
6262
config := cfg.HostAgent
6363
option.SetOptionsServiceTLS(&commonOpt.BaseOptions, false)
64-
option.SetServiceCommonOptions(&commonOpt.CommonOptions, oc, config.ServiceCommonOptions)
64+
option.SetServiceCommonOptions(&commonOpt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
6565
commonOpt.Port = constants.HostPort
6666

6767
commonOpt.EnableRemoteExecutor = true

pkg/manager/component/lbagent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (m *lbagentManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alpha
6060
}
6161
config := cfg.Lbagent
6262
option.SetOptionsServiceTLS(&commonOpt.BaseOptions, false)
63-
option.SetServiceCommonOptions(&commonOpt.CommonOptions, oc, config.ServiceCommonOptions)
63+
option.SetServiceCommonOptions(&commonOpt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
6464
commonOpt.Port = constants.LbagentPort
6565
commonOpt.BaseDataDir = "/opt/cloud/workspace/lbagent"
6666
commonOpt.EnableRemoteExecutor = true

pkg/manager/component/meter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (m *meterManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.
123123

124124
option.SetClickhouseOptions(&opt.DBOptions, oc.Spec.Clickhouse, config.ClickhouseConf)
125125
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
126-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceDBCommonOptions.ServiceCommonOptions)
126+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceDBCommonOptions.ServiceCommonOptions, cfg.CommonConfig)
127127

128128
opt.BillingFileDirectory = filepath.Join(constants.MeterDataStore, constants.MeterBillingDataDir)
129129
opt.CloudratesFileDirectory = filepath.Join(constants.MeterDataStore, constants.MeterRatesDataDir)

pkg/manager/component/regiondns.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func (m *regionDNSManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alp
158158
InCloudOnly: spec.InCloudOnly,
159159
}
160160
config.Region = oc.GetRegion()
161-
option.SetServiceCommonOptions(&config.CommonOptions, oc, cfg.RegionServer.ServiceDBCommonOptions.ServiceCommonOptions)
161+
option.SetServiceCommonOptions(&config.CommonOptions, oc, cfg.RegionServer.ServiceDBCommonOptions.ServiceCommonOptions, cfg.CommonConfig)
162162
if len(config.AdminProjectDomain) == 0 {
163163
config.AdminProjectDomain = identity_api.DEFAULT_DOMAIN_NAME
164164
}

pkg/manager/component/report.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func (m *reportManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1
9696
}
9797

9898
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
99-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
99+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
100100
opt.AutoSyncTable = true
101101
opt.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
102102
opt.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)

pkg/manager/component/s3gateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (m *s3gatewayManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alp
7979
}
8080
config := cfg.S3gateway
8181
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
82-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config)
82+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config, cfg.CommonConfig)
8383

8484
return m.newServiceConfigMap(v1alpha1.S3gatewayComponentType, "", oc, opt), false, nil
8585
}

pkg/manager/component/suggestion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (m *suggestionManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1al
9595
}
9696

9797
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
98-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
98+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
9999
opt.AutoSyncTable = true
100100
opt.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
101101
opt.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)

pkg/manager/component/vpcagent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (m *vpcAgentManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1alph
8080
)
8181
config := cfg.VpcAgent
8282
option.SetOptionsServiceTLS(&opts.BaseOptions, false)
83-
option.SetServiceCommonOptions(&opts.CommonOptions, oc, config.ServiceCommonOptions)
83+
option.SetServiceCommonOptions(&opts.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
8484
opts.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
8585
opts.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)
8686
opts.Port = constants.VpcAgentPort

pkg/manager/component/yunionagent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (m *yunionagentManager) getConfigMap(oc *v1alpha1.OnecloudCluster, cfg *v1a
102102
}
103103

104104
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
105-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
105+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
106106
opt.AutoSyncTable = true
107107
// yunionagent use hostNetwork
108108
opt.Port = oc.Spec.Yunionagent.Service.NodePort

pkg/service-init/component/ansibleserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (r ansibleServer) GetConfig(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.One
5252
}
5353

5454
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
55-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
55+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
5656
opt.AutoSyncTable = true
5757
opt.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
5858
opt.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)

pkg/service-init/component/apigateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (a apiGateway) GetConfig(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.Oneclo
3939
return nil, err
4040
}
4141
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
42-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, cfg.APIGateway)
42+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, cfg.APIGateway, cfg.CommonConfig)
4343
opt.Port = cfg.APIGateway.Port
4444
opt.WsPort = constants.APIWebsocketPort
4545
opt.CorsHosts = oc.Spec.APIGateway.CorsHosts

pkg/service-init/component/apimap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func (am *apiMap) GetConfig(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.Onecloud
3636
}
3737

3838
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
39-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceDBCommonOptions.ServiceCommonOptions)
39+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceDBCommonOptions.ServiceCommonOptions, cfg.CommonConfig)
4040

4141
opt.Port = constants.APIMapPort
4242
return opt, nil

pkg/service-init/component/baremetal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (b baremetal) GetConfig(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.Oneclou
4141

4242
config := cfg.BaremetalAgent
4343
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
44-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
44+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
4545
opt.Port = constants.BaremetalPort
4646
opt.AutoRegisterBaremetal = false
4747
opt.LinuxDefaultRootUser = true

pkg/service-init/component/cloudid.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (r cloudid) GetConfig(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.OnecloudC
5252
}
5353

5454
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
55-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
55+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
5656
opt.AutoSyncTable = true
5757
opt.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
5858
opt.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)

pkg/service-init/component/cloudmon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (r cloudmon) GetConfig(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.Onecloud
4141
}
4242
config := cfg.Cloudmon
4343
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
44-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config)
44+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config, cfg.CommonConfig)
4545
opt.SslCertfile = path.Join(constants.CertDir, constants.ServiceCertName)
4646
opt.SslKeyfile = path.Join(constants.CertDir, constants.ServiceKeyName)
4747
opt.Port = config.Port

pkg/service-init/component/esxi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (ea esxiAgent) GetConfig(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.Oneclo
4141
opt.ListenInterface = "eth0"
4242
config := cfg.EsxiAgent
4343
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
44-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions)
44+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceCommonOptions, cfg.CommonConfig)
4545
opt.Port = constants.EsxiAgentPort
4646
return opt, nil
4747
}

pkg/service-init/component/glance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (g glance) GetConfig(oc *v1alpha1.OnecloudCluster, cfg *v1alpha1.OnecloudCl
6363

6464
option.SetClickhouseOptions(&opt.DBOptions, oc.Spec.Clickhouse, config.ClickhouseConf)
6565
option.SetOptionsServiceTLS(&opt.BaseOptions, false)
66-
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceDBCommonOptions.ServiceCommonOptions)
66+
option.SetServiceCommonOptions(&opt.CommonOptions, oc, config.ServiceDBCommonOptions.ServiceCommonOptions, cfg.CommonConfig)
6767

6868
opt.FilesystemStoreDatadir = constants.GlanceFileStoreDir
6969
//opt.TorrentStoreDir = constants.GlanceTorrentStoreDir

0 commit comments

Comments
 (0)