Skip to content

Commit

Permalink
update(webhook.go): move cleanAndSanitizeName() func call
Browse files Browse the repository at this point in the history
I've moved the call to cleanAndSanitizeName() to a more appropriate place where it does what I intended for it to do.
  • Loading branch information
Bryan Paget committed Sep 5, 2024
1 parent cbc8204 commit c0b9f82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ func createPatch(pod *corev1.Pod, sidecarConfigTemplate *Config, annotations map
// Append the deepest directory name if available
if len(bucketDirs) >= 2 {
limitDeepestDirName := limitString(bucketDirs[len(bucketDirs)-1], 5)
filerBucketName = filerBucketName + "-" + limitDeepestDirName
// Clean and sanitize the filerBucketName
filerBucketName = cleanAndSanitizeName(filerBucketName + "-" + limitDeepestDirName)
}

// Ensure the name is unique by appending an integer if necessary
Expand Down

0 comments on commit c0b9f82

Please sign in to comment.