From 4c4381b834bc85b460a5e459c80e1b15bda39f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Badst=C3=BCbner?= Date: Sat, 16 Nov 2024 18:20:19 +0100 Subject: [PATCH] feat(dao,used-by-cmd): check imagePullSecrets as well (#2964) --- internal/dao/dp.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/dao/dp.go b/internal/dao/dp.go index 600ee6c1a7..ea207028a1 100644 --- a/internal/dao/dp.go +++ b/internal/dao/dp.go @@ -334,6 +334,12 @@ func hasSecret(f Factory, spec *v1.PodSpec, ns, name string, wait bool) (bool, e } } + for _, imagePullSecret := range spec.ImagePullSecrets { + if imagePullSecret.Name == name { + return true, nil + } + } + saName := spec.ServiceAccountName if saName != "" { o, err := f.Get("v1/serviceaccounts", client.FQN(ns, saName), wait, labels.Everything())