@@ -766,6 +766,81 @@ var _ = Describe("Operator smoke test", func() {
766766 By ("execute simple query with ydb-go-sdk..." )
767767 databasePath := DatabasePathWithDefaultDomain (databaseSample )
768768 ExecuteSimpleTableE2ETestWithSDK (databaseSample .Name , testobjects .YdbNamespace , databasePath )
769+
770+ It ("Check init job has additional volumes" , func () {
771+ By ("create storage tls secret..." )
772+ storageCert := testobjects .StorageCertificate ()
773+ Expect (k8sClient .Create (ctx , storageCert )).Should (Succeed ())
774+
775+ By ("create storage..." )
776+ storage := testobjects .DefaultStorage (filepath .Join (".." , "data" , "storage-mirror-3-dc-config.yaml" ))
777+
778+ secretName := testobjects .StorageCertificateSecretName
779+ secretPath := fmt .Sprintf ("%s/%s" , resources .wellKnownDirForAdditionalSecrets , secretName )
780+
781+ storage .Spec .Secrets = []* corev1.LocalObjectReference {
782+ {
783+ Name : secretName ,
784+ },
785+ }
786+
787+ storage .Spec .InitContainers = []corev1.Container {
788+ {
789+ Name : "init-container" ,
790+ Image : storage .Spec .Image .Name ,
791+ Command : []string {"bash" , "-xc" },
792+ Args : []string {fmt .Sprintf ("ls -la %s" , secretPath )},
793+ VolumeMounts : []corev1.VolumeMount {
794+ {
795+ Name : secretName ,
796+ MountPath : secretPath ,
797+ ReadOnly : true ,
798+ },
799+ },
800+ },
801+ }
802+
803+ Expect (k8sClient .Create (ctx , storage )).Should (Succeed ())
804+ defer DeleteStorageSafely (ctx , k8sClient , storage )
805+
806+ By ("waiting until Storage is ready ..." )
807+ WaitUntilStorageReady (ctx , k8sClient , storage .Name , testobjects .YdbNamespace )
808+ })
809+
810+ It ("Check init job has additional volumes with GRPCS enabled" , func () {
811+ By ("create storage tls secret..." )
812+ storageCert := testobjects .StorageCertificate ()
813+ Expect (k8sClient .Create (ctx , storageCert )).Should (Succeed ())
814+
815+ By ("create storage..." )
816+ storage := testobjects .DefaultStorage (filepath .Join (".." , "data" , "storage-mirror-3-dc-config-tls.yaml" ))
817+
818+ secretName := testobjects .StorageCertificateSecretName
819+ secretPath := fmt .Sprintf ("%s/%s" , resources .wellKnownDirForAdditionalSecrets , secretName )
820+
821+ storage .Spec .Service .GRPC .TLSConfiguration = testobjects .TLSConfiguration (secretName )
822+
823+ storage .Spec .InitContainers = []corev1.Container {
824+ {
825+ Name : "init-container" ,
826+ Image : storage .Spec .Image .Name ,
827+ Command : []string {"bash" , "-xc" },
828+ Args : []string {fmt .Sprintf ("ls -la %s" , secretPath )},
829+ VolumeMounts : []corev1.VolumeMount {
830+ {
831+ Name : resources .grpcTLSVolumeName ,
832+ MountPath : secretPath ,
833+ ReadOnly : true ,
834+ },
835+ },
836+ },
837+ }
838+
839+ Expect (k8sClient .Create (ctx , storage )).Should (Succeed ())
840+ defer DeleteStorageSafely (ctx , k8sClient , storage )
841+
842+ By ("waiting until Storage is ready ..." )
843+ WaitUntilStorageReady (ctx , k8sClient , storage .Name , testobjects .YdbNamespace )
769844 })
770845
771846 AfterEach (func () {
0 commit comments