Add metering default config.

Signed-off-by: Rao Yunkun <yunkunrao@yunify.com>
This commit is contained in:
Rao Yunkun
2021-04-20 12:10:41 +08:00
parent 796d667e48
commit bc387ca3fd
2 changed files with 2 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ func NewHandler(k kubernetes.Interface, monitoringClient monitoring.Interface, m
if ksClient != nil {
opRelease = openpitrix.NewOpenpitrixOperator(f, ksClient, nil)
}
if meteringOptions == nil {
if meteringOptions == nil || meteringOptions.RetentionDay == "" {
meteringOptions = &meteringclient.DefaultMeteringOption
}

View File

@@ -61,7 +61,7 @@ func newTenantHandler(factory informers.InformerFactory, k8sclient kubernetes.In
monitoringclient monitoringclient.Interface, resourceGetter *resourcev1alpha3.ResourceGetter,
meteringOptions *meteringclient.Options) *tenantHandler {
if meteringOptions == nil {
if meteringOptions == nil || meteringOptions.RetentionDay == "" {
meteringOptions = &meteringclient.DefaultMeteringOption
}