asset-relocation-tool-for-kubernetes icon indicating copy to clipboard operation
asset-relocation-tool-for-kubernetes copied to clipboard

Structure and version hints file

Open migmartri opened this issue 3 years ago • 2 comments

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

migmartri avatar Nov 15 '21 11:11 migmartri

This is a good idea.

petewall avatar Nov 30 '21 15:11 petewall

LGTM

josvazg avatar Dec 13 '21 09:12 josvazg