Skip to content

Commit

Permalink
Add nice/ionice settings (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dipta Das authored and tamalsaha committed Apr 3, 2019
1 parent 3386b69 commit 1ff51f6
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 59 additions & 1 deletion api/v1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions api/v1/runtime_settings_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,25 @@ type ContainerRuntimeSettings struct {
// More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
// +optional
SecurityContext *core.SecurityContext `json:"securityContext,omitempty"`
// Settings to configure `nice` to throttle the load on cpu.
// More info: http://kennystechtalk.blogspot.com/2015/04/throttling-cpu-usage-with-linux-cgroups.html
// More info: https://oakbytes.wordpress.com/2012/06/06/linux-scheduler-cfs-and-nice/
// +optional
Nice *NiceSettings `json:"nice,omitempty"`
// Settings to configure `ionice` to throttle the load on disk.
// More info: http://kennystechtalk.blogspot.com/2015/04/throttling-cpu-usage-with-linux-cgroups.html
// More info: https://oakbytes.wordpress.com/2012/06/06/linux-scheduler-cfs-and-nice/
// +optional
IONice *IONiceSettings `json:"ionice,omitempty"`
}

// https://linux.die.net/man/1/nice
type NiceSettings struct {
Adjustment *int32 `json:"adjustment,omitempty"`
}

// https://linux.die.net/man/1/ionice
type IONiceSettings struct {
Class *int32 `json:"class,omitempty"`
ClassData *int32 `json:"classData,omitempty"`
}
57 changes: 57 additions & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1ff51f6

Please sign in to comment.