nodeAffinity cluster method
This commit is contained in:
		
							parent
							
								
									596ad5375d
								
							
						
					
					
						commit
						133106bcc2
					
				|  | @ -309,7 +309,7 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) ( | |||
| 		}, | ||||
| 	} | ||||
| 
 | ||||
| 	nodeAffinity := nodeAffinity(c.OpConfig.NodeReadinessLabel, spec.NodeAffinity) | ||||
| 	nodeAffinity := c.nodeAffinity(c.OpConfig.NodeReadinessLabel, spec.NodeAffinity) | ||||
| 	if c.OpConfig.EnablePodAntiAffinity { | ||||
| 		labelsSet := labels.Set(c.connectionPoolerLabels(role, false).MatchLabels) | ||||
| 		podTemplate.Spec.Affinity = generatePodAffinity(labelsSet, c.OpConfig.PodAntiAffinityTopologyKey, nodeAffinity) | ||||
|  |  | |||
|  | @ -1270,7 +1270,7 @@ func (c *Cluster) generateStatefulSet(spec *acidv1.PostgresSpec) (*appsv1.Statef | |||
| 		effectiveRunAsUser, | ||||
| 		effectiveRunAsGroup, | ||||
| 		effectiveFSGroup, | ||||
| 		nodeAffinity(c.OpConfig.NodeReadinessLabel, spec.NodeAffinity), | ||||
| 		c.nodeAffinity(c.OpConfig.NodeReadinessLabel, spec.NodeAffinity), | ||||
| 		spec.SchedulerName, | ||||
| 		int64(c.OpConfig.PodTerminateGracePeriod.Seconds()), | ||||
| 		c.OpConfig.PodServiceAccountName, | ||||
|  | @ -2020,7 +2020,7 @@ func (c *Cluster) generateLogicalBackupJob() (*batchv1beta1.CronJob, error) { | |||
| 		nil, | ||||
| 		nil, | ||||
| 		nil, | ||||
| 		nodeAffinity(c.OpConfig.NodeReadinessLabel, nil), | ||||
| 		c.nodeAffinity(c.OpConfig.NodeReadinessLabel, nil), | ||||
| 		nil, | ||||
| 		int64(c.OpConfig.PodTerminateGracePeriod.Seconds()), | ||||
| 		c.OpConfig.PodServiceAccountName, | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue