Open sblair-metrostar opened 3 years ago
Actually just occurred to me after submitting this bug that using 127.0.0.1 might be another viable workaround. I'll give that a try and see how it goes.
I think we can add a check specifically for localhost
to solve for this scenario.
What happened: I tried mapping docker.io to my local Harbor pull cache project, which resulted in the mapped host appearing twice in the pod container image.
What you expected to happen: The substitution should only happen once.
How to reproduce it (as minimally and precisely as possible): I don't believe the port is relevant here, but still using the locally hacked version to get around that until the next release with the
::
change.Anything else we need to know?: I figured maybe adding an empty entry for
localhost:
would have been enough to override the second pass which was apparently triggered according to the logs, but that didn't work. Looks like this will happen for any target host that doesn't have a.
in it, just not sure that will ever be an issue for anything other than localhost. I was able to get a hack working to bypass the issue for now.https://github.com/phenixblue/imageswap-webhook/blob/d7d8d650e213239a0bafc22f57531f912d5dd116/app/imageswap/imageswap.py#L262
Environment:
kubectl version
): 1.20