Skip to content

Commit b03c64d

Browse files
committed
apend secrets and volumes from storage spec to init-job volumes
1 parent 97f0b97 commit b03c64d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

internal/resources/storage_init_job.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,21 @@ func (b *StorageInitJobBuilder) buildInitJobVolumes() []corev1.Volume {
153153
})
154154
}
155155

156+
for _, secret := range b.Spec.Secrets {
157+
volumes = append(volumes, corev1.Volume{
158+
Name: secret.Name,
159+
VolumeSource: corev1.VolumeSource{
160+
Secret: &corev1.SecretVolumeSource{
161+
SecretName: secret.Name,
162+
},
163+
},
164+
})
165+
}
166+
167+
for _, volume := range b.Spec.Volumes {
168+
volumes = append(volumes, *volume)
169+
}
170+
156171
if b.AnyCertificatesAdded() {
157172
volumes = append(volumes, corev1.Volume{
158173
Name: systemCertsVolumeName,

0 commit comments

Comments
 (0)