Skip to content

[Disconnected env] Could we replace tag for hardcoded busybox image by digest to make it work in disconnected env?  #5285

@tkrishtop

Description

@tkrishtop

Bug Report

In disconnected environment image pull by tag doesn't work. The mirroring could be done using digest but not tag because we have no access to remote registry to resolve the tag.

The problem is that scorecard code contains image hardcoded by tag. As a result, scorecard pod doesn't start because it tries to pull an image hardcoded by tag here.

$ oc describe pod scorecard-test-l5k6

Events:
  Type     Reason          Age                 From               Message
  ----     ------          ----                ----               -------
  Normal   Scheduled       114s                default-scheduler  Successfully assigned default/scorecard-test-l5k6 to worker-3
  Warning  Failed          52s                 kubelet            Failed to pull image "docker.io/busybox:1.33.0": rpc error: code = Unknown desc = error pinging docker registry registry-1.docker.io: Get "https://registry-1.docker.io/v2/": dial tcp 3.209.182.229:443: i/o timeout
  Warning  Failed          52s                 kubelet            Error: ErrImagePull
  Normal   BackOff         51s                 kubelet            Back-off pulling image "docker.io/busybox:1.33.0"
  Warning  Failed          51s                 kubelet            Error: ImagePullBackOff
  Normal   Pulling         40s (x2 over 112s)  kubelet            Pulling image "docker.io/busybox:1.33.0"

The solution would be to replace a reference by tag docker.io/busybox:1.33.0 by a digest reference with sha.

What did you do?

I run scorecard in disconnected environment

operator-sdk scorecard --output json --selector=test=basic-check-spec-test --kubeconfig path/to/kubeconfig --namespace scorecard-testing --service-account default --config /tmp/ansible.1p913asescorecard_tmp_dir/artifacts/scorecard-test-config.yaml --verbose --wait-time 300s "/tmp/ansible.1p913asescorecard_tmp_dir/scorecard_operator_dir"

level=debug msg="Debug logging is set"
Error: error running tests context deadline exceeded

Environment

$ operator-sdk version

quay.io/operator-framework/scorecard-test:v1.13

Possible Solution

The solution would be to replace a reference by tag docker.io/busybox:1.33.0 by a digest reference with sha.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions