-
-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve pod label patching with error handling and retry mechani…
…sm (#1231) fix: improve pod label patching with error handling and retry mechanism - Added JSON pointer escaping for label keys - Implemented retry mechanism for label patching - Enhanced error handling and logging - Added validation for empty labels - Created utility function for JSON pointer escaping in util package Signed-off-by: drivebyer <[email protected]>
- Loading branch information
Showing
2 changed files
with
41 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package util | ||
|
||
import "strings" | ||
|
||
func EscapeJSONPointer(s string) string { | ||
return strings.ReplaceAll(strings.ReplaceAll(s, "~", "~0"), "/", "~1") | ||
} |