File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -93,17 +93,19 @@ func GetVolumes(
9393
9494 volumes = append (volumes , keysVolume )
9595
96- keysVolume = corev1.Volume {
97- Name : "workload-ssh-secret" ,
98- VolumeSource : corev1.VolumeSource {
99- Secret : & corev1.SecretVolumeSource {
100- SecretName : workflowOverrideParams ["WorkloadSSHKeySecretName" ],
101- DefaultMode : & privateKeyMode ,
96+ if workflowOverrideParams ["WorkloadSSHKeySecretName" ] != "" {
97+ keysVolume = corev1.Volume {
98+ Name : "workload-ssh-secret" ,
99+ VolumeSource : corev1.VolumeSource {
100+ Secret : & corev1.SecretVolumeSource {
101+ SecretName : workflowOverrideParams ["WorkloadSSHKeySecretName" ],
102+ DefaultMode : & privateKeyMode ,
103+ },
102104 },
103- },
104- }
105+ }
105106
106- volumes = append (volumes , keysVolume )
107+ volumes = append (volumes , keysVolume )
108+ }
107109
108110 for _ , exv := range instance .Spec .ExtraMounts {
109111 for _ , vol := range exv .Propagate (svc ) {
You can’t perform that action at this time.
0 commit comments