@@ -321,7 +321,7 @@ func arangodContainer(image string, imagePullPolicy v1.PullPolicy, args []string
321321
322322// arangosyncContainer creates a container configured to run `arangosync`.
323323func arangosyncContainer (image string , imagePullPolicy v1.PullPolicy , args []string , env map [string ]EnvValue , livenessProbe * HTTPProbeConfig ,
324- lifecycle * v1.Lifecycle , lifecycleEnvVars []v1.EnvVar ) v1.Container {
324+ lifecycle * v1.Lifecycle , lifecycleEnvVars []v1.EnvVar , resources v1. ResourceRequirements ) v1.Container {
325325 c := v1.Container {
326326 Command : append ([]string {"/usr/sbin/arangosync" }, args ... ),
327327 Name : ServerContainerName ,
@@ -335,6 +335,7 @@ func arangosyncContainer(image string, imagePullPolicy v1.PullPolicy, args []str
335335 Protocol : v1 .ProtocolTCP ,
336336 },
337337 },
338+ Resources : filterStorageResourceRequirement (resources ), // Storage is handled via pvcs
338339 }
339340 for k , v := range env {
340341 c .Env = append (c .Env , v .CreateEnvVar (k ))
@@ -580,7 +581,7 @@ func CreateArangodPod(kubecli kubernetes.Interface, developmentMode bool, deploy
580581func CreateArangoSyncPod (kubecli kubernetes.Interface , developmentMode bool , deployment APIObject , role , id , podName , image , lifecycleImage string , imagePullPolicy v1.PullPolicy ,
581582 terminationGracePeriod time.Duration , args []string , env map [string ]EnvValue , livenessProbe * HTTPProbeConfig , tolerations []v1.Toleration , serviceAccountName string ,
582583 tlsKeyfileSecretName , clientAuthCASecretName , masterJWTSecretName , clusterJWTSecretName , affinityWithRole string , nodeSelector map [string ]string ,
583- podPriorityClassName string ) error {
584+ podPriorityClassName string , resources v1. ResourceRequirements ) error {
584585 // Prepare basic pod
585586 p := newPod (deployment .GetName (), deployment .GetNamespace (), role , id , podName , nil , tolerations , serviceAccountName , nodeSelector )
586587 terminationGracePeriodSeconds := int64 (math .Ceil (terminationGracePeriod .Seconds ()))
@@ -606,7 +607,7 @@ func CreateArangoSyncPod(kubecli kubernetes.Interface, developmentMode bool, dep
606607 p .Spec .Volumes = append (p .Spec .Volumes , lifecycleVolumes ... )
607608
608609 // Add arangosync container
609- c := arangosyncContainer (image , imagePullPolicy , args , env , livenessProbe , lifecycle , lifecycleEnvVars )
610+ c := arangosyncContainer (image , imagePullPolicy , args , env , livenessProbe , lifecycle , lifecycleEnvVars , resources )
610611 if tlsKeyfileSecretName != "" {
611612 c .VolumeMounts = append (c .VolumeMounts , tlsKeyfileVolumeMounts ()... )
612613 }
0 commit comments