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

Use a single Docker registry #2901

Merged
merged 29 commits into from
May 13, 2020
Merged

Conversation

thbkrkr
Copy link
Contributor

@thbkrkr thbkrkr commented Apr 17, 2020

For the CI, we use 3 different Docker images: for the operator, the E2E tests and the CI build tools. So far we have tried to use the Docker registry provided by the cloud provider which we are testing as much as possible. With expanding the testing to more providers we have to handle the specifities of each one especially for authentication.

This commit simplifies this by using a single Docker registry for all of our uses.

Resolves #2622.

@thbkrkr thbkrkr added justdoit Continuous improvement not related to a specific feature :ci Things related to Continuous Integration, automation and releases labels Apr 17, 2020
@thbkrkr thbkrkr marked this pull request as ready for review April 23, 2020 13:43
@thbkrkr thbkrkr requested a review from david-kow April 23, 2020 13:45
Copy link
Contributor

@david-kow david-kow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, I think it looks good. The only thing I'd add is removing ACR from AKS setup (from default config, settings and aks.go).

Copy link
Contributor

@sebgl sebgl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Makefile Outdated Show resolved Hide resolved
@thbkrkr
Copy link
Contributor Author

thbkrkr commented Apr 30, 2020

We discussed with the team that there is a lack of good support for the development workflow as pointed in this discussion.

We should still be able to use GCR or a different namespace from that used by the CI in the Elastic Docker registry.

Latest commits address that.

@thbkrkr
Copy link
Contributor Author

thbkrkr commented Apr 30, 2020

I found several weaknesses in the implemented solution. Please don't do another code review right away.

@thbkrkr
Copy link
Contributor Author

thbkrkr commented May 7, 2020

I think this is ready for a final review.

Since the last review, there is no fundamental change:

  • Rename REPOSITORY in NAMESPACE
  • Introduce E2E_NAMESPACE and use REGISTRY in E2E_IMG
  • Renamings for the propagation of the CI docker creds
  • Use IMG_SUFFIX instead of IMG_NAME override
  • Add targets to switch between dev and gcr registries
  • Move docker login/push logic in a bash script - not ideal but not worse that we had in the Makefile

One weakness that already exists and that remains is that the content of the .registry.env (e.g.: REGISTRY = eu.gcr.io) can be ignored. If the operator image is defined in the .env (e.g.: OPERATOR_IMAGE = docker.elastic.co/eck-snapshots/eck-operator:1.1.0-2020-05-07-7df50bca), it takes the precedence over and this is the one that is used.

Copy link
Contributor

@sebgl sebgl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think overall it's a great improvement.
I did a few tests locally and I left a few comments in the PR.
I'd be OK with merging and fixing things if they break in CI later.

hack/ci/docker-push.sh Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
hack/ci/docker-push.sh Outdated Show resolved Hide resolved
hack/ci/docker-push.sh Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@thbkrkr thbkrkr merged commit 7d2acdf into elastic:master May 13, 2020
@thbkrkr thbkrkr deleted the use-a-single-registry branch May 13, 2020 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ci Things related to Continuous Integration, automation and releases justdoit Continuous improvement not related to a specific feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cloud-on-k8s-e2e-tests-ocp can no longer push images
4 participants