Skip to content

Commit

Permalink
fix CommitmentConfig not being shown on NoQuota resources
Browse files Browse the repository at this point in the history
  • Loading branch information
majewsky committed Mar 13, 2024
1 parent ea43322 commit cfe40ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/reports/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
Expand Down

0 comments on commit cfe40ab

Please sign in to comment.