Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1806 from weaveworks/gc-mark-valid-label-value
Browse files Browse the repository at this point in the history
Replace ':' with '.' in GC mark
  • Loading branch information
hiddeco authored Mar 7, 2019
2 parents c9cda8a + e14a5f0 commit 1360f9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cluster/kubernetes/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ func makeGCMark(syncSetName, resourceID string) string {
// To prevent deleting objects with copied labels
// an object-specific mark is created (by including its identifier).
hasher.Write([]byte(resourceID))
return "sha256:" + base64.RawURLEncoding.EncodeToString(hasher.Sum(nil))
// The prefix is to make sure it's a valid (Kubernetes) label value.
return "sha256." + base64.RawURLEncoding.EncodeToString(hasher.Sum(nil))
}

// --- internal types for keeping track of syncing
Expand Down

0 comments on commit 1360f9b

Please sign in to comment.