@@ -530,7 +530,7 @@ func CreateArangodPod(kubecli kubernetes.Interface, developmentMode bool, deploy
530530 args []string , env map [string ]EnvValue , finalizers []string ,
531531 livenessProbe * HTTPProbeConfig , readinessProbe * HTTPProbeConfig , tolerations []v1.Toleration , serviceAccountName string ,
532532 tlsKeyfileSecretName , rocksdbEncryptionSecretName string , clusterJWTSecretName string , nodeSelector map [string ]string ,
533- podPriorityClassName string , resources v1.ResourceRequirements , exporter * ArangodbExporterContainerConf ) error {
533+ podPriorityClassName string , resources v1.ResourceRequirements , exporter * ArangodbExporterContainerConf , sidecars []v1. Container ) error {
534534 // Prepare basic pod
535535 p := newPod (deployment .GetName (), deployment .GetNamespace (), role , id , podName , finalizers , tolerations , serviceAccountName , nodeSelector )
536536 terminationGracePeriodSeconds := int64 (math .Ceil (terminationGracePeriod .Seconds ()))
@@ -579,6 +579,11 @@ func CreateArangodPod(kubecli kubernetes.Interface, developmentMode bool, deploy
579579 p .Labels [LabelKeyArangoExporter ] = "yes"
580580 }
581581
582+ // Add sidecars
583+ if len (sidecars ) > 0 {
584+ p .Spec .Containers = append (p .Spec .Containers , sidecars ... )
585+ }
586+
582587 // Add priorityClassName
583588 p .Spec .PriorityClassName = podPriorityClassName
584589
@@ -680,7 +685,7 @@ func CreateArangodPod(kubecli kubernetes.Interface, developmentMode bool, deploy
680685func CreateArangoSyncPod (kubecli kubernetes.Interface , developmentMode bool , deployment APIObject , role , id , podName , image , lifecycleImage string , imagePullPolicy v1.PullPolicy ,
681686 terminationGracePeriod time.Duration , args []string , env map [string ]EnvValue , livenessProbe * HTTPProbeConfig , tolerations []v1.Toleration , serviceAccountName string ,
682687 tlsKeyfileSecretName , clientAuthCASecretName , masterJWTSecretName , clusterJWTSecretName , affinityWithRole string , nodeSelector map [string ]string ,
683- podPriorityClassName string , resources v1.ResourceRequirements ) error {
688+ podPriorityClassName string , resources v1.ResourceRequirements , sidecars []v1. Container ) error {
684689 // Prepare basic pod
685690 p := newPod (deployment .GetName (), deployment .GetNamespace (), role , id , podName , nil , tolerations , serviceAccountName , nodeSelector )
686691 terminationGracePeriodSeconds := int64 (math .Ceil (terminationGracePeriod .Seconds ()))
@@ -721,6 +726,11 @@ func CreateArangoSyncPod(kubecli kubernetes.Interface, developmentMode bool, dep
721726 }
722727 p .Spec .Containers = append (p .Spec .Containers , c )
723728
729+ // Add sidecars
730+ if len (sidecars ) > 0 {
731+ p .Spec .Containers = append (p .Spec .Containers , sidecars ... )
732+ }
733+
724734 // Add priorityClassName
725735 p .Spec .PriorityClassName = podPriorityClassName
726736
0 commit comments