Skip to content

Commit 270a954

Browse files
committed
Don't read the image to be signed from docker.io
Instead, use an already existing one in the internal registry, and hope that we still have enough free signature slots left. Send the required credentials to the source registry. Also use the injected service CA instead of disabling TLS. I don't know whether it is supposed to work like that (per https://github.com/openshift/openshift-docs/blob/enterprise-4.1/release_notes/ocp-4-1-release-notes.adoc#service-ca-bundle-changes the path is deprecated) but the same path is already assumed to exist by the preceding (oc login). Signed-off-by: Miloslav Trmač <[email protected]>
1 parent 9496c17 commit 270a954

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/extended/images/signatures.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
e2e "k8s.io/kubernetes/test/e2e/framework"
1212

1313
exutil "github.com/openshift/origin/test/extended/util"
14+
"github.com/openshift/origin/test/extended/util/image"
1415
)
1516

1617
var _ = g.Describe("[sig-imageregistry][Serial][Suite:openshift/registry/serial] Image signature workflow", func() {
@@ -98,10 +99,14 @@ var _ = g.Describe("[sig-imageregistry][Serial][Suite:openshift/registry/serial]
9899
"--registries.d", "/this/does/not/exist",
99100

100101
"copy", "--sign-by", "[email protected]",
102+
"--src-creds=" + user + ":" + token,
101103
"--dest-creds=" + user + ":" + token,
102-
// TODO: test with this turned to true as well
103-
"--dest-tls-verify=false",
104-
"docker://docker.io/library/memcached:latest",
104+
105+
// Expect to use /run/secrets/kubernetes.io/serviceaccount/ca.crt
106+
"--src-cert-dir=/run/secrets/kubernetes.io/serviceaccount",
107+
"--dest-cert-dir=/run/secrets/kubernetes.io/serviceaccount",
108+
109+
"docker://" + image.ShellImage(),
105110
"docker://" + signedImage,
106111
}, " "))
107112
fmt.Fprintf(g.GinkgoWriter, "output: %s\n", out)

0 commit comments

Comments
 (0)