Skip to content

Commit 6c09326

Browse files
committed
pass vttablet extraLabels to vtbackup as well
Signed-off-by: Jeremy Doupe <jeremy@doupe.com>
1 parent 9e4460e commit 6c09326

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/controller/vitessshard/reconcile_backup_job.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ func vtbackupSpec(key client.ObjectKey, vts *planetscalev2.VitessShard, parentLa
235235
ExtraEnv: pool.ExtraEnv,
236236
ExtraVolumes: pool.ExtraVolumes,
237237
ExtraVolumeMounts: pool.ExtraVolumeMounts,
238+
ExtraLabels: pool.ExtraLabels,
238239
Annotations: annotations,
239240
Affinity: pool.Affinity,
240241
Tolerations: pool.Tolerations,

pkg/operator/vttablet/vtbackup_pod.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ func NewBackupPod(key client.ObjectKey, backupSpec *BackupSpec, mysqldImage stri
193193
},
194194
}
195195

196+
// Apply ExtraLabels to the pod, similar to regular vttablet pods.
197+
update.Labels(&pod.Labels, tabletSpec.ExtraLabels)
198+
196199
if planetscalev2.DefaultVitessServiceAccount != "" {
197200
pod.Spec.ServiceAccountName = planetscalev2.DefaultVitessServiceAccount
198201
}

0 commit comments

Comments
 (0)