-
Notifications
You must be signed in to change notification settings - Fork 697
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
Allow users to specify custom repo when specifying CONTAINER_REPOSITORY
for Elastic Operator
#6643
Comments
Could you use So, you would start the operator with
Note: here are the image names to follow: cloud-on-k8s/pkg/controller/common/container/container.go Lines 31 to 42 in 4f9fa13
|
That was my first thought as well, but I'm not able to do that with the way our registry is configured. I can also see the use case where a user may be restricted to pulling their images through Docker Hub, which has all Elastic's images in the |
I have this exact problem. We only have dockerhub mirrored and the paths to the container images are different. Without the ability to change the image name, we can't use the operator. |
See my original post. There is a workaround for this so that you can use the operator anyway. It works, but it's not a good solution because you end up having to define the agent version in multiple locations within your deployment, so you risk not upgrading it when you intend to. |
Custom images are documented on the website, but not anywhere in the repo READMEs or example charts . I have linked it here for reference. I this means no fix is needed as there is a way to override the images in the spec of the ES resource. |
I disagree, as including the image is an antipattern:
I can certainly manage this using the workaround for as long as I need to, but this is something that Elastic Operator should handle. I've looked at the code and it doesn't appear that it should be difficult to specify the repo, but I'm not sufficiently proficient with Go to fork the repo and make the update myself. |
We discussed and we are going to accept this enhancement and add a new flag |
Thank you! |
Use Case
As my company's Elastic Administrator, I need to be able to specify a custom respository within my local
CONTAINER_REGISTRY
.Details
Elastic Operator version: 2.6.1
I am required to use my company's local registry to pull images from in our environment. Because of conventions, I am also required to use a specific naming schema for images within the registry:
When deploying the Elastic Operator, I am able to specify a default container registry, e.g.:
The issue is that Elastic Operator appears to have the image naming schema hardcoded. E.g., when I deploy Elastic Agent with my custom registry and repository, Elastic Operator attempts to pull:
As a workaround, I can specify the image in my deployment:
However, this partially defeats the purpose of using the Elastic Operator, which is to allow Elastic Operator to manage the image source.
Solution
Either require the
CONTAINER_REGISTRY
to contain both registry and repository (registry.example.com/team
in this example) or add another configuration optionCONTAINER_REPOSITORY
, which would default to the current value (beats
in this example), which would mirror current behavior when pulling an image from the default registry (docker.elastic.co
).Since requiring
CONTAINER_REGISTRY
to contain the full registry and repository name would likely be a breaking change for users who pull their images directly from Elastic, the latter option would be better.The text was updated successfully, but these errors were encountered: