Skip to content

Commit

Permalink
fix(upgrade): jobs inherit more settings from final StatefulSet
Browse files Browse the repository at this point in the history
  • Loading branch information
rkojedzinszky committed Mar 23, 2024
1 parent 40a7b11 commit 051aaec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
7 changes: 5 additions & 2 deletions private/upgrade/primary.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@ func (primaryUpgradeHandler) handle(ctx pcontext.Context, p *v1alpha1.PatroniPos
},
},
},
RestartPolicy: v1.RestartPolicyOnFailure,
SecurityContext: security.DatabasePodSecurityContext,
RestartPolicy: v1.RestartPolicyOnFailure,
SecurityContext: security.DatabasePodSecurityContext,
ImagePullSecrets: p.Spec.ImagePullSecrets,
NodeSelector: p.Spec.NodeSelector,
Tolerations: p.Spec.Tolerations,
},
},
},
Expand Down
7 changes: 5 additions & 2 deletions private/upgrade/secondary-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,11 @@ func upgradeSecondariesEnsureseclients(ctx pcontext.Context, p *v1alpha1.Patroni
},
},
},
RestartPolicy: v1.RestartPolicyOnFailure,
SecurityContext: security.DatabasePodSecurityContext,
RestartPolicy: v1.RestartPolicyOnFailure,
SecurityContext: security.DatabasePodSecurityContext,
ImagePullSecrets: p.Spec.ImagePullSecrets,
NodeSelector: p.Spec.NodeSelector,
Tolerations: p.Spec.Tolerations,
},
},
},
Expand Down
5 changes: 4 additions & 1 deletion private/upgrade/secondary-stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ func upgradeSecondariesEnsurestreamer(ctx pcontext.Context, p *v1alpha1.PatroniP
},
},
},
SecurityContext: security.DatabasePodSecurityContext,
SecurityContext: security.DatabasePodSecurityContext,
ImagePullSecrets: p.Spec.ImagePullSecrets,
NodeSelector: p.Spec.NodeSelector,
Tolerations: p.Spec.Tolerations,
},
},
},
Expand Down

0 comments on commit 051aaec

Please sign in to comment.