@@ -434,7 +434,8 @@ func CreateArangodPod(kubecli kubernetes.Interface, developmentMode bool, deploy
434434 engine string , requireUUID bool , terminationGracePeriod time.Duration ,
435435 args []string , env map [string ]EnvValue , finalizers []string ,
436436 livenessProbe * HTTPProbeConfig , readinessProbe * HTTPProbeConfig , tolerations []v1.Toleration , serviceAccountName string ,
437- tlsKeyfileSecretName , rocksdbEncryptionSecretName string , clusterJWTSecretName string , nodeSelector map [string ]string ) error {
437+ tlsKeyfileSecretName , rocksdbEncryptionSecretName string , clusterJWTSecretName string , nodeSelector map [string ]string ,
438+ podPriorityClassName string , podPriority * int32 ) error {
438439 // Prepare basic pod
439440 p := newPod (deployment .GetName (), deployment .GetNamespace (), role , id , podName , finalizers , tolerations , serviceAccountName , nodeSelector )
440441 terminationGracePeriodSeconds := int64 (math .Ceil (terminationGracePeriod .Seconds ()))
@@ -469,6 +470,10 @@ func CreateArangodPod(kubecli kubernetes.Interface, developmentMode bool, deploy
469470 }
470471 p .Spec .Containers = append (p .Spec .Containers , c )
471472
473+ // Add priority and priorityClassName
474+ p .Spec .Priority = podPriority
475+ p .Spec .PriorityClassName = podPriorityClassName
476+
472477 // Add UUID init container
473478 if alpineImage != "" {
474479 p .Spec .InitContainers = append (p .Spec .InitContainers , arangodInitContainer ("uuid" , id , engine , alpineImage , requireUUID ))
@@ -553,7 +558,8 @@ func CreateArangodPod(kubecli kubernetes.Interface, developmentMode bool, deploy
553558// If another error occurs, that error is returned.
554559func CreateArangoSyncPod (kubecli kubernetes.Interface , developmentMode bool , deployment APIObject , role , id , podName , image , lifecycleImage string , imagePullPolicy v1.PullPolicy ,
555560 terminationGracePeriod time.Duration , args []string , env map [string ]EnvValue , livenessProbe * HTTPProbeConfig , tolerations []v1.Toleration , serviceAccountName string ,
556- tlsKeyfileSecretName , clientAuthCASecretName , masterJWTSecretName , clusterJWTSecretName , affinityWithRole string , nodeSelector map [string ]string ) error {
561+ tlsKeyfileSecretName , clientAuthCASecretName , masterJWTSecretName , clusterJWTSecretName , affinityWithRole string , nodeSelector map [string ]string ,
562+ podPriorityClassName string , podPriority * int32 ) error {
557563 // Prepare basic pod
558564 p := newPod (deployment .GetName (), deployment .GetNamespace (), role , id , podName , nil , tolerations , serviceAccountName , nodeSelector )
559565 terminationGracePeriodSeconds := int64 (math .Ceil (terminationGracePeriod .Seconds ()))
@@ -594,6 +600,10 @@ func CreateArangoSyncPod(kubecli kubernetes.Interface, developmentMode bool, dep
594600 }
595601 p .Spec .Containers = append (p .Spec .Containers , c )
596602
603+ // Add priority and priorityClassName
604+ p .Spec .Priority = podPriority
605+ p .Spec .PriorityClassName = podPriorityClassName
606+
597607 // TLS keyfile secret mount (if any)
598608 if tlsKeyfileSecretName != "" {
599609 vol := v1.Volume {
0 commit comments