From 1d5dea6df5e4e6090ffe9ade155e8b70b390da9f Mon Sep 17 00:00:00 2001 From: Xiao Wei Date: Tue, 13 Oct 2020 19:32:26 +0800 Subject: [PATCH] FIX: Statefulset's PVC's name is - --- internal/dao/sts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/dao/sts.go b/internal/dao/sts.go index b0ea2b0a..8a0d547a 100644 --- a/internal/dao/sts.go +++ b/internal/dao/sts.go @@ -199,7 +199,7 @@ func (s *StatefulSet) Scan(ctx context.Context, gvr, fqn string, wait bool) (Ref }) case "v1/persistentvolumeclaims": for _, v := range sts.Spec.VolumeClaimTemplates { - if !strings.HasPrefix(n, v.Name) { + if !strings.HasPrefix(n, v.Name+"-"+sts.Name) { continue } refs = append(refs, Ref{