Skip to content

Commit

Permalink
Adding custom pod labels to logical backup job
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejshapal committed Oct 21, 2023
1 parent 409e4c7 commit 81a1081
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/cluster/k8sres.go
Original file line number Diff line number Diff line change
Expand Up @@ -2192,11 +2192,12 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1.CronJob, error) {
nil,
)

labels := map[string]string{
c.OpConfig.ClusterNameLabel: c.Name,
"application": "spilo-logical-backup",
logicalBackupJobLabel := map[string]string{
"application": "spilo-logical-backup",
}

labels := labels.Merge(c.labelsSet(true), logicalBackupJobLabel)

nodeAffinity := c.nodeAffinity(c.OpConfig.NodeReadinessLabel, nil)
podAffinity := podAffinity(
labels,
Expand Down

0 comments on commit 81a1081

Please sign in to comment.