Skip to content

Commit

Permalink
fixL sanitize cron job name (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsukhin authored Feb 16, 2024
1 parent eb0de2b commit f70b2e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/cronjob/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,5 +229,11 @@ func NewCronJobSpec(parameters templateParameters) (*batchv1.CronJob, error) {

// GetMetadataName returns cron job metadata name
func GetMetadataName(name, resource string) string {
return fmt.Sprintf("%s-%s", name, resource)
result := fmt.Sprintf("%s-%s", name, resource)

if len(result) > 52 {
return result[:52]
}

return result
}

0 comments on commit f70b2e7

Please sign in to comment.