Skip to content

Commit

Permalink
fix: object count resource quotas not working when using Tenant scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksim Fedotov authored and prometherion committed Jan 25, 2022
1 parent 6cee5b7 commit cd56eab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/v1beta1/tenant_annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package v1beta1

import (
"fmt"
"strings"
)

const (
Expand All @@ -21,9 +22,9 @@ const (
)

func UsedQuotaFor(resource fmt.Stringer) string {
return "quota.capsule.clastix.io/used-" + resource.String()
return "quota.capsule.clastix.io/used-" + strings.ReplaceAll(resource.String(), "/", "_")
}

func HardQuotaFor(resource fmt.Stringer) string {
return "quota.capsule.clastix.io/hard-" + resource.String()
return "quota.capsule.clastix.io/hard-" + strings.ReplaceAll(resource.String(), "/", "_")
}

0 comments on commit cd56eab

Please sign in to comment.