File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ func buildDeployment(cfg *conf.OperatorConfig,
39
39
labels := labelsForSmbServer (planner )
40
40
var size int32 = 1
41
41
42
+ podSpec := buildPodSpec (planner , cfg , pvcName )
43
+ podSpec .Affinity = affinityForSmbPod (planner )
42
44
deployment := & appsv1.Deployment {
43
45
ObjectMeta : metav1.ObjectMeta {
44
46
Name : planner .InstanceName (),
@@ -58,7 +60,7 @@ func buildDeployment(cfg *conf.OperatorConfig,
58
60
Labels : labels ,
59
61
Annotations : annotationsForSmbPod (cfg ),
60
62
},
61
- Spec : buildPodSpec ( planner , cfg , pvcName ) ,
63
+ Spec : podSpec ,
62
64
},
63
65
},
64
66
}
@@ -120,3 +122,10 @@ func annotationsForSmbPod(cfg *conf.OperatorConfig) map[string]string {
120
122
func withMetricsExporter (cfg * conf.OperatorConfig ) bool {
121
123
return strings .ToLower (cfg .MetricsExporterMode ) == "enabled"
122
124
}
125
+
126
+ func affinityForSmbPod (planner * pln.Planner ) * corev1.Affinity {
127
+ if planner .CommonConfig != nil && planner .CommonConfig .Spec .PodSettings != nil {
128
+ return planner .CommonConfig .Spec .PodSettings .Affinity
129
+ }
130
+ return nil
131
+ }
You can’t perform that action at this time.
0 commit comments