Skip to content

Commit

Permalink
Add secret discovery for pod.spec.containers.envFrom (#23)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew DeVenny <[email protected]>
  • Loading branch information
matthewdevenny authored Oct 20, 2021
1 parent fdc0b6a commit 62d44a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/webhook/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,11 @@ func getSecretsSetFromPodSpec(podSpec corev1.PodSpec) []string {
secretSet[env.ValueFrom.SecretKeyRef.Name] = member
}
}
for _, envSource := range container.EnvFrom {
if envSource.SecretRef != nil {
secretSet[envSource.SecretRef.Name] = member
}
}
}

for _, volume := range podSpec.Volumes {
Expand Down

0 comments on commit 62d44a3

Please sign in to comment.