Skip to content

Commit de4bd45

Browse files
committed
some fixes
1 parent 33f7ab7 commit de4bd45

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

BUILD_TEST.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Building gesher
2+
3+
docker build -t quay.io/spotter/gesher:test -f Dockerfile .
4+
docker push quay.io/spotter/gesher:test
5+
6+
one would need to modify the tag and the integration test to use the proper image
7+
8+
# Building admission-test admisson controller
9+
10+
docker build -t quay.io/spotter/gesher-admisison-test:test -f Dockerfile.admission-test .
11+
docker push quay.io/spotter/gesher-admisison-test:test
12+
13+
one would need to modify the tag and the integration test to use the proper image
14+
15+
# Building and running integration tests
16+
17+
docker build -t quay.io/spotter/gesher-integration-test:test -f Dockerfile.integration-test .
18+
19+
docker run -it --rm -v ~/.kube/config:/kubeconfig -e KUBECONFIG=/kubeconfig quay.io/spotter/gesher-integration-test:test ginkgo -v integration-tests/...
20+

pkg/controller/proxyvalidatingtype/data.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
var (
1515
proxyTypeData = &ProxyTypeData{}
16+
caBundle []byte
1617
)
1718

1819
type typeInstanceMap map[types.UID]bool
@@ -241,6 +242,6 @@ func selfConfig() v1beta1.WebhookClientConfig {
241242
Name: "test",
242243
Path: &path,
243244
},
244-
CABundle: nil,
245+
CABundle: caBundle,
245246
}
246247
}

pkg/controller/proxyvalidatingtype/proxyvalidatingtype_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var log = logf.Log.WithName("controller_proxyvalidatingtype")
2424
func Add(mgr manager.Manager) error {
2525
var err error
2626

27-
_, err = ioutil.ReadFile(filepath.Join(common.CertDir, common.CertPem))
27+
caBundle, err = ioutil.ReadFile(filepath.Join(common.CertDir, common.CertPem))
2828
if err != nil {
2929
return err
3030
}

0 commit comments

Comments
 (0)