asset-relocation-tool-for-kubernetes
asset-relocation-tool-for-kubernetes copied to clipboard
Structure and version hints file
Currently, the hints file format is a flat list of images. That does not leave any room for additional metadata such as the version of the schema/templating mechanism used.
Having the possibility of indicating the version of the file format is important since it's likely this file format might evolve in the future
My proposal is to change the schema to
message hintsFile {
string version = 1; // optional, we can assume for now that's v1
repeated string images = 2
}
In practice this means that images need to be inside a :images property
So a hints file would go from
- "{{ .image.registry }}/{{ .image.repository }}:{{ .image.tag }}"
- "{{ .metrics.image.registry }}/{{ .metrics.image.repository }}:{{ .metrics.image.tag }}"
- "{{ .volumePermissions.image.registry }}/{{ .volumePermissions.image.repository }}:{{ .volumePermissions.image.tag }}"
to
images:
- "{{ .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 implementation of the new format should be retro-compatible with the current one.
What do you think?
cc/ @tompizmor @josvazg @petewall
This is a good idea.
LGTM