Skip to content

Commit

Permalink
Apply Scylla sysctls during node tuning
Browse files Browse the repository at this point in the history
Scylla image contains several custom sysctls which are not applied
automatically. To make sure these are applied on host kernel, additional
container setting it is added to node tuning jobs.

Fixes scylladb#868
  • Loading branch information
zimnx committed Dec 13, 2021
1 parent a32ffa5 commit 06d9f87
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkg/controller/nodeconfigdaemon/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,25 @@ func makePerftuneJobForNode(controllerRef *metav1.OwnerReference, namespace, nod
HostPID: true,
HostNetwork: true,
Containers: []corev1.Container{

{
Name: naming.SysctlContainerName,
Image: image,
ImagePullPolicy: corev1.PullIfNotPresent,
Command: []string{"/bin/sh",
"-c",
"sysctl -e -f /usr/lib/sysctl.d/*.conf",
},
SecurityContext: &corev1.SecurityContext{
Privileged: pointer.BoolPtr(true),
},
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("10m"),
corev1.ResourceMemory: resource.MustParse("50Mi"),
},
},
},
{
Name: naming.PerftuneContainerName,
Image: image,
Expand Down
1 change: 1 addition & 0 deletions pkg/naming/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const (
ScyllaContainerName = "scylla"
SidecarInjectorContainerName = "sidecar-injection"
PerftuneContainerName = "perftune"
SysctlContainerName = "sysctl"

PVCTemplateName = "data"

Expand Down

0 comments on commit 06d9f87

Please sign in to comment.