We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2465b66 commit e932f9bCopy full SHA for e932f9b
api/v1beta2/tenant_annotations.go
@@ -7,6 +7,7 @@ import (
7
"crypto/md5" //#nosec
8
"encoding/hex"
9
"fmt"
10
+ "strings"
11
)
12
13
const (
@@ -18,13 +19,13 @@ const (
18
19
20
21
func createAnnotation(format string, resource fmt.Stringer) (string, error) {
- suffix := resource.String()
22
+ resourceStr := strings.ReplaceAll(resource.String(), "/", "_")
23
- hash := md5.Sum([]byte(resource.String())) //#nosec
24
+ hash := md5.Sum([]byte(resourceStr)) //#nosec
25
26
hashed := hex.EncodeToString(hash[:])
27
capsuleHashed := format + hashed
- capsuleAnnotation := format + suffix
28
+ capsuleAnnotation := format + resourceStr
29
30
switch {
31
case len(capsuleAnnotation) <= maxAnnotationLength:
0 commit comments