Skip to content

Commit 6cc2ec0

Browse files
authored
machineconfig: log kernelType (#1366)
Add some logs to to show the selected kernelType under the MachineConfig. Signed-off-by: Talor Itzhak <titzhak@redhat.com>
1 parent d6f5ca2 commit 6cc2ec0

File tree

1 file changed

+4
-0
lines changed
  • pkg/performanceprofile/controller/performanceprofile/components/machineconfig

1 file changed

+4
-0
lines changed

pkg/performanceprofile/controller/performanceprofile/components/machineconfig/machineconfig.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/docker/go-units"
1919
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2020
"k8s.io/apimachinery/pkg/runtime"
21+
"k8s.io/klog/v2"
2122
"k8s.io/utils/cpuset"
2223
"k8s.io/utils/ptr"
2324

@@ -152,12 +153,15 @@ func New(profile *performancev2.PerformanceProfile, opts *components.MachineConf
152153
// Real time kernel with 64k-pages for aarch64 not yet supported and rejected in the validation webhook.
153154
if enableRTKernel {
154155
mc.Spec.KernelType = MCKernelRT
156+
klog.V(4).InfoS("MachineConfig realtime kernel type", "MachineConfig", mc.Name)
155157
} else if profile.Spec.KernelPageSize != nil && *profile.Spec.KernelPageSize == performancev2.KernelPageSize("64k") {
156158
// During validation, we ensure that nodes are based on aarch64 when the administrator specifies 64k for this field.
157159
// Hence, this assignment is guaranteed to be safe.
158160
mc.Spec.KernelType = MCKernel64kPages
161+
klog.V(4).InfoS("MachineConfig 64k-pages kernel type", "MachineConfig", mc.Name)
159162
} else {
160163
mc.Spec.KernelType = MCKernelDefault
164+
klog.V(4).InfoS("MachineConfig default kernel type", "MachineConfig", mc.Name)
161165
}
162166

163167
return mc, nil

0 commit comments

Comments
 (0)