Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image pull backoff in OC4.5 because image url is external when using start.sh #160

Open
hughsaunders opened this issue Nov 26, 2020 · 1 comment

Comments

@hughsaunders
Copy link
Contributor

hughsaunders commented Nov 26, 2020

Summary

When deploying a follower to openshift 4.5 via start.sh, the follower deployment is created referring to the seedfetcher image by it's external url. This causes the follower pod to fail to start as it cannot pull the image for it's first init container.

Detail

The following logic determines if an internal or external url is generated:

    if ! [ -z ${TEST_PLATFORM+x} ] && [[ $TEST_PLATFORM =~ ^openshift4 ]] && [[ "$internal" == "true" ]]; then
      echo "image-registry.openshift-image-registry.svc:5000/$CONJUR_NAMESPACE_NAME/$1:$CONJUR_NAMESPACE_NAME"
    else
      echo "$DOCKER_REGISTRY_PATH/$CONJUR_NAMESPACE_NAME/$1:$CONJUR_NAMESPACE_NAME"
    fi

From: https://github.com/cyberark/kubernetes-conjur-deploy/blob/master/utils.sh#L48

TEST_PLAFORM is only set in test.sh and test.sh is only called from the Jenkinsfile. So when a user's entrypoint is start.sh, an internal url will not be generated.

Workaround

Add the following to bootstrap.env when using openshift 4x

TEST_PLATFORM=openshift4.5
@hughsaunders hughsaunders changed the title External image url for seedfetcher image in openshift 4.5 when using start.sh Image pull backoff in OC4.5 because image url is external when using start.sh Nov 26, 2020
@izgeri
Copy link
Contributor

izgeri commented Dec 29, 2020

@hughsaunders the method signature has changed since you filed this, and I think it should now be OPENSHIFT_VERSION that you set, e.g. to '4.5'.

if ! [ -z ${OPENSHIFT_VERSION+x} ] && [[ $OPENSHIFT_VERSION =~ ^4 ]] && [[ "$internal" == "true" ]]; then

do you want to put up a PR to add this to boostrap.env?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants