Skip to content

Commit 9087a40

Browse files
committed
Include NodeConfigs with disabled optimizations as matching ones in tuning ConfigMap
1 parent d8e94c1 commit 9087a40

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pkg/controller/nodeconfigpod/sync_configmaps.go

+8-6
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ func (ncpc *Controller) makeConfigMap(ctx context.Context, pod *corev1.Pod) (*co
3737
// Filter nodeconfig selecting this node.
3838
var ncs []*scyllav1alpha1.NodeConfig
3939
for _, nc := range allNodeConfigs {
40-
if nc.Spec.DisableOptimizations {
41-
continue
42-
}
43-
4440
isSelectingNode, err := controllerhelpers.IsNodeConfigSelectingNode(nc, node)
4541
if err != nil {
4642
return nil, fmt.Errorf(
@@ -71,9 +67,15 @@ func (ncpc *Controller) makeConfigMap(ctx context.Context, pod *corev1.Pod) (*co
7167
for _, nc := range ncs {
7268
src.MatchingNodeConfigs = append(src.MatchingNodeConfigs, nc.Name)
7369

74-
if !controllerhelpers.IsNodeTunedForContainer(nc, node.Name, containerID) {
75-
src.BlockingNodeConfigs = append(src.BlockingNodeConfigs, nc.Name)
70+
if nc.Spec.DisableOptimizations {
71+
continue
7672
}
73+
74+
if controllerhelpers.IsNodeTunedForContainer(nc, node.Name, containerID) {
75+
continue
76+
}
77+
78+
src.BlockingNodeConfigs = append(src.BlockingNodeConfigs, nc.Name)
7779
}
7880
}
7981

0 commit comments

Comments
 (0)