Skip to content

Commit

Permalink
Limit cleanup job name to 63 chars, fixes #577
Browse files Browse the repository at this point in the history
  • Loading branch information
AMecea committed Sep 4, 2020
1 parent 66f4c92 commit 1b4080b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/internal/mysqlbackup/mysqlbackup.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ func (b *MysqlBackup) GetNameForJob() string {

// GetNameForDeletionJob returns the name for the hard deletion job.
func (b *MysqlBackup) GetNameForDeletionJob() string {
return fmt.Sprintf("%s-backup-cleanup", b.Name)
prefix := b.Name
if len(prefix) >= 55 {
prefix = prefix[:55]
}
return fmt.Sprintf("%s-cleanup", prefix)
}

// String returns the backup name and namespace
Expand Down

0 comments on commit 1b4080b

Please sign in to comment.