Skip to content

Specifying a TCP port results in InvalidImageRegistryServer #573

Open
@CVanF5

Description

@CVanF5

Describe the Issue

Creating an imagePullSecret while specifying a port number results in an incorrect message about the protocol not being supported.

Steps To Reproduce
Create a dockerconfigjson secret with a hostname and a port. Example gitlab.com:443

Result

      RESPONSE 400: 400 Bad Request
      ERROR CODE: InvalidImageRegistryServer
      --------------------------------------------------------------------------------
      {
        "error": {
          "code": "InvalidImageRegistryServer",
          "message": "The server 'gitlab.com:443' in the 'imageRegistryCredentials' of container group 'nginx-k8s-virtual-amd64-small-runner-runner-qihb8krj-project-33599309-concurrent-0-ismfnyon' is invalid. It should be a valid host name without protocol."
        }
      }

Expected behavior
Virtual kubelet pulls an from the specified registry using the specified port

Virtual-kubelet version
v1.25.0-vk-azure-aci-1.6.0
Kubernetes version
1.26.6

Additional context

The message isn't correct, I am not specifying a protocol, I'm specifying a port which is supported by Docker and Kubernetes. It should be supported by virtual-kubelet as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions