You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Image was specified as: rabbitmq:3.8.18-management
Image was replaced with: harbor-repo.vmware.com/dockerhub-proxy-cache
Logs:
[2021-07-29 20:27:32,808] INFO in imageswap: Processing container: default/hello-world-server-0
[2021-07-29 20:27:32,811] INFO in imageswap: ImageSwap Webhook running in "MAPS" mode
[2021-07-29 20:27:32,812] DEBUG in imageswap: No Swap map for "rabbitmq" detected, using default map
[2021-07-29 20:27:32,812] DEBUG in imageswap: Swap Map = "default" : "harbor-repo.vmware.com/dockerhub-proxy-cache"
[2021-07-29 20:27:32,813] INFO in imageswap: External image definition detected: rabbitmq:3.8.18-management
[2021-07-29 20:27:32,813] INFO in imageswap: External image updated to Internal image: harbor-repo.vmware.com/dockerhub-proxy-cache
[2021-07-29 20:27:32,813] INFO in imageswap: Processing init-container: default/hello-world-server-0
[2021-07-29 20:27:32,813] INFO in imageswap: ImageSwap Webhook running in "MAPS" mode
[2021-07-29 20:27:32,816] DEBUG in imageswap: No Swap map for "rabbitmq" detected, using default map
[2021-07-29 20:27:32,816] DEBUG in imageswap: Swap Map = "default" : "harbor-repo.vmware.com/dockerhub-proxy-cache"
[2021-07-29 20:27:32,816] INFO in imageswap: External image definition detected: rabbitmq:3.8.18-management
[2021-07-29 20:27:32,817] INFO in imageswap: External image updated to Internal image: harbor-repo.vmware.com/dockerhub-proxy-cache
[2021-07-29 20:27:32,817] DEBUG in imageswap: Needs patch
[2021-07-29 20:27:32,818] INFO in imageswap: Diffing original request to modified request and generating JSONPatch
[2021-07-29 20:27:32,819] DEBUG in imageswap: JSON Patch: [{"op": "replace", "path": "/spec/containers/0/image", "value": "harbor-repo.vmware.com/dockerhub-proxy-cache"}, {"op": "replace", "path": "/spec/initContainers/0/image", "value": "harbor-repo.vmware.com/dockerhub-proxy-cache"}]
What you expected to happen:
Image should have been: harbor-repo.vmware.com/dockerhub-proxy-cache/rabbitmq:3.8.18-management
How to reproduce it (as minimally and precisely as possible):
Clean kind cluster, above map:
Anything else we need to know?:
It looks like swap_image() in imageswap.py splits on / and then assumes that if there's a . in the first component, it's a registry. For a single-component (no /), this is incorrect...the . in this case is in the image tag, not part of a hostname.
What happened:
imageswap-maps was specified as:
Image was specified as:
rabbitmq:3.8.18-management
Image was replaced with:
harbor-repo.vmware.com/dockerhub-proxy-cache
Logs:
What you expected to happen:
Image should have been:
harbor-repo.vmware.com/dockerhub-proxy-cache/rabbitmq:3.8.18-management
How to reproduce it (as minimally and precisely as possible):
Clean kind cluster, above map:
Anything else we need to know?:
It looks like
swap_image()
inimageswap.py
splits on / and then assumes that if there's a . in the first component, it's a registry. For a single-component (no /), this is incorrect...the . in this case is in the image tag, not part of a hostname.Environment:
kind cluster:
kubectl version
):The text was updated successfully, but these errors were encountered: