Skip to content

Commit 08cc8b6

Browse files
committed
fix(expand CRDs): Incorrect conditional check
1 parent c2ad8fb commit 08cc8b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vault.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ func appendVolumeMountIfMissing(slice []corev1.VolumeMount, v corev1.VolumeMount
209209

210210
// Conditionally set Lifecycle if it exists in containerSpec
211211
func addLifecycleHook(container corev1.Container, containerSpec v1alpha1.Container) corev1.Container {
212-
if container.Lifecycle != nil {
212+
213+
emptyLifecycle := corev1.Lifecycle{}
214+
if containerSpec.Lifecycle != emptyLifecycle {
213215
container.Lifecycle = &containerSpec.Lifecycle
214216
}
215217
// TODO: Fix support for initcontainer's Lifecycle hooks ( Go dep to be updated )

0 commit comments

Comments
 (0)