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

Add ability to specify your own image address #744

Open
4 tasks
boniek83 opened this issue Sep 20, 2024 · 3 comments
Open
4 tasks

Add ability to specify your own image address #744

boniek83 opened this issue Sep 20, 2024 · 3 comments

Comments

@boniek83
Copy link

What

I'm deploying moco mysql in air gapped environment with container image proxy. Ideally I want to specify my own repository for images inside CRD.

How

Either allow overriding image or add new field to CRD imageRepository eg:
imageRepository: harbor.local/ghcr.io
turns image field into eg:
harbor.local/ghcr.io/cybozu-go/moco-agent:0.12.1

Checklist

  • Finish implementation of the issue
  • Test all functions
  • Have enough logs to trace activities
  • Notify developers of necessary actions
@boniek83 boniek83 changed the title Add ability to specify your own image adress Add ability to specify your own image address Sep 20, 2024
@morimoto-cybozu
Copy link
Contributor

@boniek83
Thank you for your comment.
You can specify the image addresses not in a MySQLCluster object but as options of moco-controller.
You can use --agent-image, --backup-image, --fluent-bit-image, and --mysql-exporter-image` options.
https://github.com/cybozu-go/moco/blob/v0.24.1/docs/moco-controller.md
I hope this helps.

@boniek83
Copy link
Author

This is better than nothing, but ideally I don't want to specify the whole image url. I imagine tags will change often with helm chart updates prompting me to basically maintain these changes if done this way. Changing repository by itself would give me what I need without additional maintenance burden.

@morimoto-cybozu
Copy link
Contributor

@boniek83
I agree that tags will change often and it would be good to keep track of version updates automatically. But I don't think we can provide a generalized feature in CRD to transform image name strings.
In your use case harbor.local/ghcr.io is a user-given input and harbor.local/ghcr.io/cybozu-go/moco-agent:0.12.1 is a desired result. Some may want to retrieve harbor.local/ghcr.io/moco-agent:0.12.1. Some may give harbor.local (without ghcr.io) and want to get harbor.local/ghcr.io/moco-agent:0.12.1. The rule of string conversion would vary depending on the user.
It would be better to provide this type of feature in Helm charts. You could give harbor.local/ghcr.io as an argument or you may need to combine strings by yourself before giving an argument harbor.local/ghcr.io/cybozu-go/moco-agent:0.12.1. It depends on the design.

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

No branches or pull requests

2 participants