@@ -769,28 +769,40 @@ var _ = Describe("Operator smoke test", func() {
769769 })
770770
771771 It ("Check init job with additional volumes and GRPCS enabled" , func () {
772- By ("create storage tls secret ..." )
772+ By ("create stls secrets ..." )
773773 storageCert := testobjects .StorageCertificate ()
774+
775+ secret := storageCert .DeepCopy ()
776+ secret .Name = "another-secret"
777+
774778 Expect (k8sClient .Create (ctx , storageCert )).Should (Succeed ())
779+ Expect (k8sClient .Create (ctx , secret )).Should (Succeed ())
775780
776781 By ("create storage..." )
777782 storage := testobjects .DefaultStorage (filepath .Join (".." , "data" , "storage-mirror-3-dc-config-tls.yaml" ))
778783
779- secretName := testobjects .StorageCertificateSecretName
780- secretPath := fmt .Sprintf ("%s/%s" , v1alpha1 .AdditionalSecretsDir , secretName )
784+ storage .Spec .Service .GRPC .TLSConfiguration = testobjects .TLSConfiguration (
785+ testobjects .StorageCertificateSecretName ,
786+ )
787+
788+ storage .Spec .Secrets = []* corev1.LocalObjectReference {
789+ {
790+ Name : secret .Name ,
791+ },
792+ }
781793
782- storage . Spec . Service . GRPC . TLSConfiguration = testobjects . TLSConfiguration ( secretName )
794+ mountPath := fmt . Sprintf ( "%s/%s" , v1alpha1 . AdditionalSecretsDir , secret . Name )
783795
784796 storage .Spec .InitContainers = []corev1.Container {
785797 {
786798 Name : "init-container" ,
787799 Image : storage .Spec .Image .Name ,
788800 Command : []string {"bash" , "-xc" },
789- Args : []string {fmt .Sprintf ("ls -la %s" , secretPath )},
801+ Args : []string {fmt .Sprintf ("ls -la %s" , mountPath )},
790802 VolumeMounts : []corev1.VolumeMount {
791803 {
792- Name : resources . GRPCTLSVolumeName ,
793- MountPath : secretPath ,
804+ Name : secret . Name ,
805+ MountPath : mountPath ,
794806 ReadOnly : true ,
795807 },
796808 },
0 commit comments