-
Couldn't load subscription status.
- Fork 2
Add registry portion to values file #83
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
Conversation
Co-authored-by: Jordan Raychev <[email protected]>
|
I don't quite get the added value. In either case the consumer needs to modify I also don't know if that fits into the OCM localization mechanisms. Maybe @fabianburth can share more details on the OCM localization. |
|
Hi @reshnm You are correct about the Helm standard and The parsing of the above image is done you get four parts: These values then could be injected during runtime in the corresponding paths in values.yaml file. The issue is that if we have only defined The above snippet shows that for the registry portion of our example fully qualified image path, we get that value and substitute in in the corresponding path. The same is done for other rules. Based on our 4 parsed values (registry, repository, image and tag) we cannot substitute anywhere since the values won't be properly interpenetrated and we get gibberish. The Cheers, |
|
@jpraychev I get what you are trying to do. But again, it seems unreasonable to me that a Helm chart, in order to work with OCM localization, has to be modified when it uses Helm de-facto standards (means created by |
|
On a additional note. I would assume that you would want to localize the complete image location and not only the base path. |
|
Not an OCM expert but I would assume that if you like a concrete version to be deployed you would need to specify the tag as well. That is something already supported by OCM and helm values provide such value. If the tag is not specified, there is a default behavior and falls back to The same logic is already present in other projects such as open telemetry collectors - https://github.com/open-telemetry/opentelemetry-helm-charts/blob/4106860b16146f4a696f79b8ba196c8cf683c0ae/charts/opentelemetry-collector/templates/_pod.tpl#L37-L41 Would have been nice for the OCM controller to output directly the registry+repository portion but that is not the case at the moment. Maybe in the future release they could do it, really can't tell. |
No, you don't want the registry/repository portion. You want to localize the value of the OCM image resource access. |
|
What I meant is that if OCM have produced a value for registry+repository (e.g. ghcr.io/openmcp-project/github.com/openmcp-project/metrics-operator/images/metrics-operator) you should be able to substitute the value directly into |
This is what you always want to do. You should always read the the |
|
Correct, but OCM does not support it. You can only read the following four values which does not "fit" into the current values.yaml structure for some project. Another example that we've got is Dynatrace operator. They don't expose separate registry and repository values but they've got the image value in their |
|
Can't you then compine If not, then I would advice to provide the feedback to OCM that the localization is not working with helm charts created with I'm not happy with changing the helm chart because there are limitations in the OCM localization. |
|
I cannot directly combine it, I would need some custom logic to parse the path myself. |
|
Again, to wrap this up. For me it doesn't make sense to merge this pull request. I see that this would be the easy fix for you to progress. But this not the right approach. OCM localization has to work with "standard" helm charts and not the other way around. Therefore I would like to ask to take this back to the OCM project and get localization solution that works out of the box for "standard" helm charts. Chaning Helm charts is not the correct approach, as again, you will not find open ears in other open source projects to make their chart compatible with OCM localization. Your pull request would be closed right away. Therefore, again, this has to be taken care of in OCM localization. |
|
Thanks for the feedback @reshnm. Closing the PR. |
What this PR does / why we need it:
The PR introduces a new variable global.imageRegistry which allows users to separately define the registry where the image is hosted. This is handy when it comes down to building localization rules in OCM. By having the repository containing the registry + repository strings, OCM localization rules cannot simply substitute the corresponding values and users will be required to add additional logic just to separate the two.
The change will basically allow users to either define the image path as:
or
Release note:
Add new registry value