Refactoring map of updated secrets to include secret

This commit is contained in:
jillianwilson
2021-02-26 10:45:30 -04:00
parent 10b7db3057
commit 0824aa0837
11 changed files with 47 additions and 37 deletions

View File

@@ -1,8 +1,11 @@
package onepassword
import appsv1 "k8s.io/api/apps/v1"
import (
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
)
func IsDeploymentUsingSecrets(deployment *appsv1.Deployment, secrets map[string]bool) bool {
func IsDeploymentUsingSecrets(deployment *appsv1.Deployment, secrets map[string]*corev1.Secret) bool {
volumes := deployment.Spec.Template.Spec.Volumes
containers := deployment.Spec.Template.Spec.Containers
containers = append(containers, deployment.Spec.Template.Spec.InitContainers...)