@@ -264,7 +264,7 @@ type CoherenceResourceSpec struct {
264264 // Use the host's ipc namespace. Optional: Default to false.
265265 // +optional
266266 HostIPC * bool `json:"hostIPC,omitempty"`
267- // Configure various networks and DNS settings for Pods in this rolw .
267+ // Configure various networks and DNS settings for Pods in this role .
268268 // +optional
269269 Network * NetworkSpec `json:"network,omitempty"`
270270 // The configuration for the Coherence operator image name
@@ -771,7 +771,7 @@ func (in *CoherenceResourceSpec) CreateStatefulSet(deployment *Coherence) appsv1
771771 UpdateStrategy : appsv1.StatefulSetUpdateStrategy {
772772 Type : appsv1 .RollingUpdateStatefulSetStrategyType ,
773773 },
774- RevisionHistoryLimit : pointer .Int32Ptr (5 ),
774+ RevisionHistoryLimit : pointer .Int32 (5 ),
775775 ServiceName : deployment .GetHeadlessServiceName (),
776776 Selector : & metav1.LabelSelector {
777777 MatchLabels : in .CreatePodSelectorLabels (deployment ),
@@ -973,6 +973,8 @@ func (in *CoherenceResourceSpec) AddEnvVarIfAbsent(envVar corev1.EnvVar) {
973973}
974974
975975// AddEnvVarIfAbsent adds the specified EnvVar to the destination slice if one with the same name does not already exist.
976+ //
977+ //goland:noinspection ALL
976978func AddEnvVarIfAbsent (dest []corev1.EnvVar , envVar corev1.EnvVar ) []corev1.EnvVar {
977979 for _ , e := range dest {
978980 if e .Name == envVar .Name {
@@ -1005,7 +1007,7 @@ func (in *CoherenceResourceSpec) CreateDefaultEnv(deployment *Coherence) []corev
10051007 SecretKeyRef : & corev1.SecretKeySelector {
10061008 LocalObjectReference : corev1.LocalObjectReference {Name : OperatorConfigName },
10071009 Key : OperatorConfigKeyHost ,
1008- Optional : pointer .BoolPtr (true ),
1010+ Optional : pointer .Bool (true ),
10091011 },
10101012 },
10111013 },
@@ -1151,12 +1153,19 @@ func (in *CoherenceResourceSpec) CreateDefaultPodAffinity(deployment *Coherence)
11511153 },
11521154 },
11531155 {
1154- Weight : 1 ,
1156+ Weight : 10 ,
11551157 PodAffinityTerm : corev1.PodAffinityTerm {
11561158 TopologyKey : operator .LabelOciNodeFaultDomain ,
11571159 LabelSelector : & selector ,
11581160 },
11591161 },
1162+ {
1163+ Weight : 1 ,
1164+ PodAffinityTerm : corev1.PodAffinityTerm {
1165+ TopologyKey : operator .LabelHostName ,
1166+ LabelSelector : & selector ,
1167+ },
1168+ },
11601169 },
11611170 },
11621171 }
0 commit comments