Commit e0784f2e authored by Wojciech Tyczynski's avatar Wojciech Tyczynski

Propage secret volumes in secret manager

parent bf713865
......@@ -212,8 +212,6 @@ func (c *cachingSecretManager) GetSecret(namespace, name string) (*v1.Secret, er
return c.secretStore.Get(namespace, name)
}
// TODO: Before we will use secretManager in other places (e.g. for secret volumes)
// we should update this function to also get secrets from those places.
func getSecretNames(pod *v1.Pod) sets.String {
result := sets.NewString()
for _, reference := range pod.Spec.ImagePullSecrets {
......@@ -226,6 +224,11 @@ func getSecretNames(pod *v1.Pod) sets.String {
}
}
}
for i := range pod.Spec.Volumes {
if source := pod.Spec.Volumes[i].Secret; source != nil {
result.Insert(source.SecretName)
}
}
return result
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment