-
Notifications
You must be signed in to change notification settings - Fork 67
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
cloud-provider-e2e: Use test image-reflector build #287
Conversation
Run the test with `make test-*`: | ||
Ensure the image-reflector-controller container image to be tested is built and | ||
ready for testing. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a small note here on how to build the image-controller-image
and what extra steps to make it ready for testing?
We might also add (for those who don't want to build the image) that they can pull the fluxcd one to their local machine and use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a brief pointer to the Makefile at the root of the repo would be good.
I was also thinking of adding a check if the given TEST_IMG
exists in the local docker image store and if not, fail. If we do that, I think then we can put a default value for TEST_IMG
, and print a message that it doesn't exist when it's not explicitly set.
Sure, we can also add some instructions about testing a stable release image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also thinking of adding a check if the given TEST_IMG exists in the local docker image store and if not, fail.
This is a good idea. Right now, it fails after the terraform infrastructure has already been created. We can add the check much earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a docker image inspect command to check if the image already exists.
$ make test-gcp
# Check if the image exists locally.
docker image inspect fluxcd/image-reflector-controller:dev >/dev/null
Error: No such image: fluxcd/image-reflector-controller:dev
make[1]: *** [Makefile:22: test] Error 1
@@ -38,10 +38,14 @@ deleted manually. | |||
Copy `.env.sample` to `.env`, put the respective provider configurations in the | |||
environment variables and source it, `source .env`. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The different variables for each provider in .env.sample
are commented out.
We can remind users here to uncomment it (or change the .env.sample
so that they aren't commented).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put the respective provider configurations in the environment variables and source it
should mean the same as it's talking about sourcing env vars.
Update the test suite to take the image-reflector-controller build to be tested using the variable TEST_IMG. This test image must be built locally before running the e2e tests. In the e2e tests, this local image is retagged and pushed into a remote registry and is used in flux deployment. For Google Artifact Registry and Azure Container Registry, the previously created test registries are reused to push the image-reflector image. But for ECR, a new repository is created due to lack of support for dynamic repositories. Signed-off-by: Sunny <darkowlzz@protonmail.com>
8d7e2c8
to
d4c31fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Update the cloud provider e2e test suite to take the image-reflector-controller
build to be tested using the variable
TEST_IMG
. This test image must bebuilt locally before running the e2e tests. In the e2e tests, this local image
is re-tagged and pushed into a remote registry and is used in flux deployment.
For Google Artifact Registry and Azure Container Registry, the
previously created test registries are reused to push the
image-reflector image. But for ECR, a new repository is created due to
lack of support for dynamic repositories.