This PR adds additional logic to handle :<port> style registry syntax for the key or value portions of a map definition.
Example:
registry.waldo.com:8443::registry.garply.com # Swap map key that includes a port
registry.foo.com::localhost:30003/foo # Swap map value that includes a port
registry.bar.com:8443::registry.baz.com:30003/bar # Swap map key & value that include a port
This adds a new separator type for map definitions: :: instead of :
Going forward the :: syntax will be the default, but for now the existing : will work for any map definitions that don't include a port in the key or value.
Additional logic has also been added to handle the case where a map definition includes a port in the key or value with/without the new separator.
Warning messages will be logged for maps using the old style separator or when a port is specified with the incorrect syntax.
Which issue(s) this PR fixes:
Fixes #49
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
- The existing separator syntax for maps (ie `:`) has been deprecated. A new separator syntax has been added for map definitions. Please use `::` instead of `:` from now on.
- Logic has been added to filter out lines of the map file with incorrect syntax. While this shouldn't interfere with backwards compatibility, not all possible combinations of characters have been tested. Check the logs of the ImageSwap pods if you experience issues and open an issue if necessary.
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR adds additional logic to handle
:<port>
style registry syntax for the key or value portions of a map definition.Example:
This adds a new separator type for map definitions:
::
instead of:
Going forward the
::
syntax will be the default, but for now the existing:
will work for any map definitions that don't include a port in the key or value.Additional logic has also been added to handle the case where a map definition includes a port in the key or value with/without the new separator.
Warning messages will be logged for maps using the old style separator or when a port is specified with the incorrect syntax.
Which issue(s) this PR fixes:
Fixes #49
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., usage docs, etc.: