asset-relocation-tool-for-kubernetes
asset-relocation-tool-for-kubernetes copied to clipboard
Support wildcard * in image pattern(image hint)
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~
Codecov Report
Attention: Patch coverage is 36.36364%
with 7 lines
in your changes are missing coverage. Please review.
Project coverage is 36.89%. Comparing base (
dc8ed92
) to head (77867e3
).
Additional details and impacted files
@@ Coverage Diff @@
## main #241 +/- ##
=======================================
Coverage 36.89% 36.89%
=======================================
Files 20 20
Lines 2174 2174
=======================================
Hits 802 802
Misses 1314 1314
Partials 58 58
Files | Coverage Δ | |
---|---|---|
pkg/ako/values.go | 63.33% <100.00%> (ø) |
|
...config/akodeploymentconfig_controller_avi_phase.go | 20.07% <0.00%> (ø) |
|
...ollers/akodeploymentconfig/user/user_controller.go | 0.00% <0.00%> (ø) |
Not very familiar with the tests, but do we need deleteObjects
when we have ensureObjectsDeleted
? Or is deleteObjects
used in the BeforeEach just in case and not expected to be called?
deleteObjects
is used in the case that we expect the controller to remove the finalizer. EnsureDelete will remove the finalizer on its own