@@ -89,13 +89,13 @@ type Visitor func(name string) (shouldContinue bool)
89
89
// referenced by the pod spec. If visitor returns false, visiting is short-circuited.
90
90
// Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited.
91
91
// Returns true if visiting completed, false if visiting was short-circuited.
92
- func VisitPodSecretNames (pod * api.Pod , visitor Visitor ) bool {
92
+ func VisitPodSecretNames (pod * api.Pod , visitor Visitor , containerType ContainerType ) bool {
93
93
for _ , reference := range pod .Spec .ImagePullSecrets {
94
94
if ! visitor (reference .Name ) {
95
95
return false
96
96
}
97
97
}
98
- VisitContainers (& pod .Spec , AllContainers , func (c * api.Container , containerType ContainerType ) bool {
98
+ VisitContainers (& pod .Spec , containerType , func (c * api.Container , containerType ContainerType ) bool {
99
99
return visitContainerSecretNames (c , visitor )
100
100
})
101
101
var source * api.VolumeSource
@@ -177,8 +177,8 @@ func visitContainerSecretNames(container *api.Container, visitor Visitor) bool {
177
177
// referenced by the pod spec. If visitor returns false, visiting is short-circuited.
178
178
// Transitive references (e.g. pod -> pvc -> pv -> secret) are not visited.
179
179
// Returns true if visiting completed, false if visiting was short-circuited.
180
- func VisitPodConfigmapNames (pod * api.Pod , visitor Visitor ) bool {
181
- VisitContainers (& pod .Spec , AllContainers , func (c * api.Container , containerType ContainerType ) bool {
180
+ func VisitPodConfigmapNames (pod * api.Pod , visitor Visitor , containerType ContainerType ) bool {
181
+ VisitContainers (& pod .Spec , containerType , func (c * api.Container , containerType ContainerType ) bool {
182
182
return visitContainerConfigmapNames (c , visitor )
183
183
})
184
184
var source * api.VolumeSource
0 commit comments