Skip to content

Commit

Permalink
Isolate tests that depend on k8schain
Browse files Browse the repository at this point in the history
  - Enable isolation of blocking tests on HushHouse concourse on gcp
  - concourse/hush-house#66

Signed-off-by: Matthew McNew <[email protected]>
  • Loading branch information
Ashwin Venkatesh authored and matthewmcnew committed Oct 4, 2019
1 parent cd201ff commit 142aef7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/pivotal/kpack/pkg/client/clientset/versioned"
"github.com/pivotal/kpack/pkg/client/informers/externalversions"
"github.com/pivotal/kpack/pkg/cnb"
"github.com/pivotal/kpack/pkg/dockercreds"
"github.com/pivotal/kpack/pkg/dockercreds/k8sdockercreds"
"github.com/pivotal/kpack/pkg/git"
"github.com/pivotal/kpack/pkg/reconciler"
"github.com/pivotal/kpack/pkg/reconciler/v1alpha1/build"
Expand Down Expand Up @@ -85,11 +85,11 @@ func main() {
podInformer := k8sInformerFactory.Core().V1().Pods()

imageFactory := &registry.ImageFactory{
KeychainFactory: dockercreds.NewSecretKeychainFactory(k8sClient),
KeychainFactory: k8sdockercreds.NewSecretKeychainFactory(k8sClient),
}

imageUtilFactory := &cnb.ImageFactory{
KeychainFactory: dockercreds.NewSecretKeychainFactory(k8sClient),
KeychainFactory: k8sdockercreds.NewSecretKeychainFactory(k8sClient),
}

metadataRetriever := &cnb.RemoteMetadataRetriever{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dockercreds
package k8sdockercreds

import (
"github.com/google/go-containerregistry/pkg/authn"
Expand All @@ -8,6 +8,7 @@ import (
k8sclient "k8s.io/client-go/kubernetes"

"github.com/pivotal/kpack/pkg/apis/build/v1alpha1"
"github.com/pivotal/kpack/pkg/dockercreds"
"github.com/pivotal/kpack/pkg/registry"
"github.com/pivotal/kpack/pkg/secret"
)
Expand All @@ -23,7 +24,7 @@ func (f *k8sSecretKeychainFactory) KeychainForSecretRef(ref registry.SecretRef)

annotatedBasicAuthKeychain := &annotatedBasicAuthKeychain{
secretRef: ref,
secretManager: &secret.SecretManager{Client: f.client, AnnotationKey: v1alpha1.DOCKERSecretAnnotationPrefix, Matcher: RegistryMatch},
secretManager: &secret.SecretManager{Client: f.client, AnnotationKey: v1alpha1.DOCKERSecretAnnotationPrefix, Matcher: dockercreds.RegistryMatch},
}

k8sKeychain, err := k8schain.New(f.client, k8schain.Options{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dockercreds
package k8sdockercreds

import (
"encoding/base64"
Expand Down

0 comments on commit 142aef7

Please sign in to comment.