From d1ea7e0e6ad7fea9508900a8c6a52c631518bc92 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 12 Oct 2022 15:11:04 +0300 Subject: [PATCH] [#31] fix delete unused volumes --- internal/domain_logic/containers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/domain_logic/containers.go b/internal/domain_logic/containers.go index 308a47bc..9914ba5a 100644 --- a/internal/domain_logic/containers.go +++ b/internal/domain_logic/containers.go @@ -81,6 +81,8 @@ func (l *Logic) ApplyContainersVolumes( if len(pvc.UID) == 0 { _, err = l.KuberClient.CreatePersistentVolumeClaim(namespace, pvc) + + log.Printf("%v/pvc %v was created\n", namespace, pvcName) } if err != nil { @@ -102,6 +104,7 @@ func (l *Logic) ApplyContainersVolumes( func (l *Logic) RemoveUnusedContainersVolumes(namespace string, containerList domainTypes.ContainerList) error { uniqVolumes := containerList.GetUniqNamedVolumes() uniqVolumes = append(uniqVolumes, containerList.GetUniqAnonymousVolumes()...) + uniqVolumes = append(uniqVolumes, containerList.GetUniqHostVolumes()...) newPersistentVolumeClaimNames := []string{} for _, volume := range uniqVolumes {