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

Support wildcard * in image pattern(image hint) #157

Open
panpan0000 opened this issue Jul 11, 2022 · 0 comments
Open

Support wildcard * in image pattern(image hint) #157

panpan0000 opened this issue Jul 11, 2022 · 0 comments

Comments

@panpan0000
Copy link

panpan0000 commented Jul 11, 2022

Most helm charts have many components / dependent charts.
just like mariaDB helm chart example :
https://github.com/vmware-tanzu/asset-relocation-tool-for-kubernetes/blob/main/examples/simple-chart/image-hints.yaml

If there're many components/ dependent charts under that helm chart, Then it will very troublesome to write an image hint for each component one by one .
How about adding * to match all components ?

the original image hint:

- "{{ .image.registry }}/{{ .image.repository }}:{{ .image.tag }}"
- "{{ .metrics.image.registry }}/{{ .metrics.image.repository }}:{{ .metrics.image.tag }}"
- "{{ .volumePermissions.image.registry }}/{{ .volumePermissions.image.repository }}:{{ .volumePermissions.image.tag }}"

the proposed image hint will only have 2 lines : one line for 1 level depth pattern , and another for 2 level depth pattern.

- "{{ .image.registry }}/{{ .image.repository }}:{{ .image.tag }}"
- "{{ .*.image.registry }}/{{ .*.image.repository }}:{{ .*.image.tag }}"

If the 3rd level depth, just add .*.*.image.registry

More over , we can use this magical image.hint file to apply to/reuse for many many community helm charts without writing hint file for each helm chart !!!

By this way, I believe this tool will earn thousands of stars :-) Woo~

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
@panpan0000 and others