Skip to content

Commit

Permalink
remove log statements
Browse files Browse the repository at this point in the history
  • Loading branch information
abe garcia committed Feb 28, 2024
1 parent 33677bf commit ef04669
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/kubernetes/artifact.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package kubernetes

import (
"log"
"strings"

"github.com/homedepot/go-clouddriver/internal/artifact"
Expand Down Expand Up @@ -89,7 +88,6 @@ func BindArtifacts(u *unstructured.Unstructured,
artifacts []clouddriver.Artifact, account string) {
for _, a := range artifacts {
if !isBindable(a, account) {
log.Println("not bindable", a, account)
continue
}

Expand All @@ -100,7 +98,6 @@ func BindArtifacts(u *unstructured.Unstructured,
bindArtifact(u.Object, a, iterables(jsonPathDockerImageInitContainers)...)
bindArtifact(u.Object, a, iterables(jsonPathDockerImageInitContainersPod)...)
case artifact.TypeKubernetesConfigMap:
log.Println("is bindable ", u.Object, a)
bindArtifact(u.Object, a, iterables(jsonPathConfigMapVolume)...)
bindArtifact(u.Object, a, iterables(jsonPathConfigMapPodVolume)...)
bindArtifact(u.Object, a, iterables(jsonPathConfigMapProjectedVolume)...)
Expand Down Expand Up @@ -195,6 +192,8 @@ func bindArtifact(obj map[string]interface{}, a clouddriver.Artifact, paths ...s
}

func isBindable(artifact clouddriver.Artifact, account string) bool {
// If the artifact fails to provide an account,
// assume this was unintentional and match anyways
return artifact.Metadata.Account == "" || artifact.Metadata.Account == account
}

Expand Down

0 comments on commit ef04669

Please sign in to comment.