Add metering default config.
Signed-off-by: Rao Yunkun <yunkunrao@yunify.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user