Skip to content

Fix the smoke-test tester image #29

@maelvls

Description

@maelvls

While reviewing the Jetstack Secure for cert-manager solution, Google bumped into an issue:

LAST SEEN   TYPE      REASON                 OBJECT                          MESSAGE
2s          Warning   BackoffLimitExceeded   job/apptest-4v6dctp1-deployer   Job has reached the specified backoff limit
3m41s       Warning   Failed                 pod/smoke-test-pod              Failed to pull image "gcr.io/jetstack-mael-valais/jetstack-secure-for-cert-manager/smoke-test:1.1.0-gcm.1": rpc error: code = Unknown desc = Error response from daemon: pull access denied for gcr.io/jetstack-mael-valais/jetstack-secure-for-cert-manager/smoke-test, repository does not exist or may require 'docker login': denied: Permission denied for "1.1.0-gcm.1" from request "/v2/jetstack-mael-valais/jetstack-secure-for-cert-manager/smoke-test/manifests/1.1.0-gcm.1".
3m41s       Warning   Failed                 pod/smoke-test-pod              Error: ErrImagePull
3m26s       Warning   Failed                 pod/smoke-test-pod              Error: ImagePullBackOff

The "tester image" mentioned in the above logs is the image used by the "tester pod" as described in verification-integration.md. The tester image is built and pushed as part of our cloud-build.yaml.

In the above error, the tester pod seems to be using the wrong image:

gcr.io/jetstack-mael-valais/jetstack-secure-for-cert-manager/smoke-test:1.1.0-gcm.1

Instead, it should show:

gcr.io/jetstack-public/jetstack-secure-for-cert-manager/smoke-test:1.1.0-gcm.1

It seems like the helm value smokeTestImage is hardcoded into the deployer:1.1.0-gcm.1 image, which is something I did not think about when I used envsubst at cloudbuild.yaml#L176. The idea is to set the correct tester image in data-test/schema.yaml:

# data-test/schema.yaml
properties:
  smokeTestImage:   # used as "{{.Values.smokeTestImage}}" in tester.yaml
    type: string
    default: $IMAGE.  # ← envsubt'd
    x-google-property:
      type: IMAGE

What I did not realize at the time is that the the deployer:1.1.0-gcm.1 image would end up with:

# data-test/schema.yaml
properties:
  smokeTestImage:
    type: string
    default: gcr.io/jetstack-mael-valais/jetstack-secure-for-cert-manager/smoke-test:1.1.0-gcm.1
    x-google-property:
      type: IMAGE

The whole issue is that the deployer:1.1.0-gcm.1 has not been built directly from the jetstack-public project.

Solutions:

  1. Use x-google-marketplace.images.smoke-test instead of properties.smokeTestImage.
  2. Use the jetstack-public project in order to build the deployer:1.1.0-gcm.1 image. Until today, I wasn't able to use it because of missing permissions, so I ended up using my own project jetstack-mael-valais.

Since (1) does not seem possible as detailed in the below #29 (comment)). We could ask Google if that is intentional or not.

In the meantime, I propose that we go with the solution (2). I will investigate what permissions are missing and report as a comment to this issue.

cc @james-w

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions