Skip to content

Commit f8fd37f

Browse files
authored
add +optional and +default=true to workloadHints API (openshift#416)
Signed-off-by: Mario Fernandez <mariofer@redhat.com>
1 parent e96f06c commit f8fd37f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pkg/apis/performanceprofile/v1/performanceprofile_types.go

+4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ type PerformanceProfileSpec struct {
7272
GloballyDisableIrqLoadBalancing *bool `json:"globallyDisableIrqLoadBalancing,omitempty"`
7373
// WorkloadHints defines hints for different types of workloads. It will allow defining exact set of tuned and
7474
// kernel arguments that should be applied on top of the node.
75+
// +optional
7576
WorkloadHints *WorkloadHints `json:"workloadHints,omitempty"`
7677
}
7778

@@ -165,8 +166,11 @@ type RealTimeKernel struct {
165166
type WorkloadHints struct {
166167
// HighPowerConsumption defines if the node should be configured in high power consumption mode.
167168
// The flag will affect the power consumption but will improve the CPUs latency.
169+
// +optional
168170
HighPowerConsumption *bool `json:"highPowerConsumption,omitempty"`
169171
// RealTime defines if the node should be configured for the real time workload.
172+
// +default=true
173+
// +optional
170174
RealTime *bool `json:"realTime,omitempty"`
171175
}
172176

pkg/apis/performanceprofile/v2/performanceprofile_types.go

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ type PerformanceProfileSpec struct {
7676
GloballyDisableIrqLoadBalancing *bool `json:"globallyDisableIrqLoadBalancing,omitempty"`
7777
// WorkloadHints defines hints for different types of workloads. It will allow defining exact set of tuned and
7878
// kernel arguments that should be applied on top of the node.
79+
// +optional
7980
WorkloadHints *WorkloadHints `json:"workloadHints,omitempty"`
8081
}
8182

@@ -172,8 +173,11 @@ type RealTimeKernel struct {
172173
type WorkloadHints struct {
173174
// HighPowerConsumption defines if the node should be configured in high power consumption mode.
174175
// The flag will affect the power consumption but will improve the CPUs latency.
176+
// +optional
175177
HighPowerConsumption *bool `json:"highPowerConsumption,omitempty"`
176178
// RealTime defines if the node should be configured for the real time workload.
179+
// +default=true
180+
// +optional
177181
RealTime *bool `json:"realTime,omitempty"`
178182
}
179183

0 commit comments

Comments
 (0)