From cfe40ab72753687eca95420cb130163eb4b24049 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Wed, 13 Mar 2024 09:34:38 +0100 Subject: [PATCH] fix CommitmentConfig not being shown on NoQuota resources --- internal/reports/project.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/reports/project.go b/internal/reports/project.go index 2bcdc2e0a..3824fd90c 100644 --- a/internal/reports/project.go +++ b/internal/reports/project.go @@ -197,10 +197,11 @@ func GetProjectResources(cluster *core.Cluster, domain db.Domain, project *db.Pr resReport := srvReport.Resources[*resourceName] if resReport == nil { resReport = &limesresources.ProjectResourceReport{ - ResourceInfo: cluster.InfoForResource(*serviceType, *resourceName), - Usage: 0, - Scaling: globalBehavior.ToScalingBehavior(), - Annotations: localBehavior.Annotations, + ResourceInfo: cluster.InfoForResource(*serviceType, *resourceName), + Usage: 0, + Scaling: globalBehavior.ToScalingBehavior(), + Annotations: localBehavior.Annotations, + CommitmentConfig: globalBehavior.ToCommitmentConfig(now), //all other fields are set below } @@ -211,7 +212,6 @@ func GetProjectResources(cluster *core.Cluster, domain db.Domain, project *db.Pr if !resReport.NoQuota { qdConfig := cluster.QuotaDistributionConfigForResource(*serviceType, *resourceName) resReport.QuotaDistributionModel = qdConfig.Model - resReport.CommitmentConfig = globalBehavior.ToCommitmentConfig(now) if quota != nil { resReport.Quota = quota resReport.UsableQuota = quota