GoogleContainerTools/skaffold

Skaffold push always HTTPS despite insecure-registry flags

开放

#4,310 创建于 2020年6月11日

 (10 条评论) (0 个反应) (0 位负责人)Go (1,416 个派生)batch import
area/registryhelp wantedkind/bugpriority/p3

仓库指标

星标
 (12,822 个星标)
PR 合并指标
 (平均合并 3天 6小时) (30 天内合并 16 个 PR)

描述

As part of a CI pipeline, I'm running a local registry, which is by default insecure: docker run -d --name registry.localhost -v local_registry:/var/lib/registry --rm -p 5000:5000 registry:2

I'm definitely able to resolve the registry (eg my /etc/hosts mappings are all good), however passing:

SKAFFOLD_DEFAULT_REPO="registry.localhost:5000"  skaffold build --insecure-registry=registry.localhost --insecure-registry=registry.localhost:5000 --cache-artifacts=false

Gives me:

couldn't build "blah": could not push image "registry.localhost:5000/blah:7d38d94d5b9-dirty": Get https://registry.localhost:5000/v2/: Service Unavailable

Expected behavior

At the very least, I'd have expected it to try and push to the http endpoint - http://registry.localhost:5000/v2

Actual behavior

It tries to push to https://registry.localhost:5000/v2

Information

  • Skaffold version: v1.10.1
  • Operating system: OSX

What might I be missing here? I've also tried the environment variable way of specifying the insecure registries. Does this only work with skaffold dev perhaps?

贡献者指南