File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 9
9
# Dockerfile: https://github.com/GoogleCloudPlatform/marketplace-testrunner/blob/master/Dockerfile
10
10
FROM python:alpine
11
11
12
- RUN apk add curl patch
12
+ RUN apk add curl patch bash
13
13
RUN pip3 install cram
14
- RUN curl -L https://github.com/stern/stern/releases/download/v1.19.0/stern_1.19.0_linux_amd64.tar.gz | tar xz -C /tmp \
15
- && mv /tmp/stern_1.19.0_linux_amd64/stern /usr/local/bin \
16
- && curl -L https://storage.googleapis.com/kubernetes-release/release/v1.19.6/bin/linux/amd64/kubectl --output-dir /usr/local/bin -O \
14
+ RUN curl -L https://storage.googleapis.com/kubernetes-release/release/v1.19.6/bin/linux/amd64/kubectl --output-dir /usr/local/bin -O \
17
15
&& chmod 755 /usr/local/bin/kubectl
18
16
19
17
WORKDIR /opt
@@ -24,4 +22,4 @@ ENV NAMESPACE=test
24
22
# We don't use "kubectl logs" because we need to know to which container each
25
23
# logs comes from. Also, stern follows logs and never returns, so we do the
26
24
# pause trick.
27
- CMD ["sh" , "-c" , "cram smoke-test.t || (stern -A -l app.kubernetes.io/name=jetstack-secure-gcm & (sleep 5; exit 1)) " ]
25
+ CMD ["sh" , "-c" , "cram smoke-test.t" ]
Original file line number Diff line number Diff line change @@ -7,7 +7,22 @@ test suite. This image is used in a Job in data-test. mpdev verify detects the
7
7
presence of this Job thanks to the annotation
8
8
" marketplace.cloud.google.com/verification: test"
9
9
10
- First, let us create a self-signed Issuer and a Certificate. This is a good way
10
+ Let's make sure the cert-manager API is actually ready. We do 2 >/ dev/ null due to
11
+ the fact that this command outputs an unknown number of lines , which is
12
+ something I don't know how to express in cram syntax.
13
+
14
+ $ timeout 5 m bash -c " until kubectl apply --dry-run=server -f- <<<$'kind: Issuer\n apiVersion: cert-manager.io/v1\n metadata:\n name: a\n spec:\n selfSigned: { } ' 2>/dev/null >&2; do sleep 10s; done"
15
+ $ kubectl apply -- dry-run= server -f- << EOF
16
+ > kind: Issuer
17
+ > apiVersion: cert-manager. io/ v1
18
+ > metadata:
19
+ > name : a
20
+ > spec:
21
+ > selfSigned: {}
22
+ > EOF
23
+ issuer. cert-manager. io/ a created (server dry run )
24
+
25
+ Let us create a self-signed Issuer and a Certificate. This is a good way
11
26
to spot webhook misconfigurations.
12
27
13
28
$ kubectl apply -n $ {NAMESPACE} -f - << EOF
You can’t perform that action at this time.
0 commit comments