Skip to content

Commit

Permalink
fix(upgrade): label all pods correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
rkojedzinszky committed Mar 23, 2024
1 parent ff4ef96 commit 40a7b11
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions private/upgrade/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func createUpgradeJob(ctx pcontext.Context, p *v1alpha1.PatroniPostgres, mode st
ActiveDeadlineSeconds: &activeDeadlineSeconds,
Completions: &completions,
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: ctx.CommonLabels(),
},
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Expand Down
3 changes: 3 additions & 0 deletions private/upgrade/primary.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ func (primaryUpgradeHandler) handle(ctx pcontext.Context, p *v1alpha1.PatroniPos
ActiveDeadlineSeconds: &activeDeadlineSeconds,
Completions: &completions,
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: ctx.CommonLabels(),
},
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Expand Down
3 changes: 3 additions & 0 deletions private/upgrade/secondary-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ func upgradeSecondariesEnsureseclients(ctx pcontext.Context, p *v1alpha1.Patroni
ActiveDeadlineSeconds: &activeDeadlineSeconds,
Completions: &completions,
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: ctx.CommonLabels(),
},
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Expand Down

0 comments on commit 40a7b11

Please sign in to comment.