mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-22 10:38:30 +02:00
Minor fixes around PDB (pod-distruption-budget) syncing: (#147)
- Call comparison function in the case of the sync as well as for update - Include full cluster name in PDB name - Assign cluster labels to the PDB object
This commit is contained in:
committed by
Murat Kabilov
parent
c17aabb642
commit
7a76be7d3e
@@ -69,7 +69,7 @@ func (c *Cluster) serviceName(role PostgresRole) string {
|
||||
}
|
||||
|
||||
func (c *Cluster) podDisruptionBudgetName() string {
|
||||
return c.OpConfig.PDBNameFormat.Format("cluster", c.Spec.ClusterName)
|
||||
return c.OpConfig.PDBNameFormat.Format("cluster", c.Name)
|
||||
}
|
||||
|
||||
func (c *Cluster) resourceRequirements(resources spec.Resources) (*v1.ResourceRequirements, error) {
|
||||
@@ -605,6 +605,7 @@ func (c *Cluster) generatePodDisruptionBudget() *policybeta1.PodDisruptionBudget
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: c.podDisruptionBudgetName(),
|
||||
Namespace: c.Namespace,
|
||||
Labels: c.labelsSet(),
|
||||
},
|
||||
Spec: policybeta1.PodDisruptionBudgetSpec{
|
||||
MinAvailable: &minAvailable,
|
||||
|
||||
Reference in New Issue
Block a user