GoogleContainerTools/skaffold

insecure registry regression ?

Open

#3,890 opened on Mar 30, 2020

View on GitHub
 (9 comments) (0 reactions) (0 assignees)Go (1,416 forks)batch import
area/registryhelp wantedkind/bugpriority/p3

Repository metrics

Stars
 (12,822 stars)
PR merge metrics
 (Avg merge 3d 6h) (16 merged PRs in 30d)

Description

skaffold doesn't seem to take into account the insecure registry in its latest version, is it a regression or something misconfigured?

apiVersion: skaffold/v2beta1
kind: Config
build:
  insecureRegistries: 
  - nexus.foo.net
  tagPolicy:
    sha256: {}
  artifacts:
  - context: .
    image: go-hello-world
  local:
    push: true 
deploy:
  kubectl:
    manifests:
    - kubernetes-manifests/**

skaffold run  -v debug --filename skaffold.yaml --default-repo nexus.foo.net/foo --insecure-registry nexus.foo.net 
INFO[0000] Skaffold &{Version:v1.6.0-docs ConfigVersion:skaffold/v2beta1 GitVersion: GitCommit:b74e2f94f628b16a866abddc2ba8f05ce0bf956c GitTreeState:clean BuildDate:2020-03-25T00:09:12Z GoVersion:go1.14 Compiler:gc Platform:linux/amd64} 
DEBU[0000] found config for context "minikube"          
DEBU[0000] validating yamltags of struct SkaffoldConfig 
DEBU[0000] validating yamltags of struct Metadata       
DEBU[0000] validating yamltags of struct Pipeline       
DEBU[0000] validating yamltags of struct BuildConfig    
DEBU[0000] validating yamltags of struct Artifact       
DEBU[0000] validating yamltags of struct ArtifactType   
DEBU[0000] validating yamltags of struct DockerArtifact 
DEBU[0000] validating yamltags of struct TagPolicy      
DEBU[0000] validating yamltags of struct ShaTagger      
DEBU[0000] validating yamltags of struct BuildType      
DEBU[0000] validating yamltags of struct LocalBuild     
DEBU[0000] validating yamltags of struct DeployConfig   
DEBU[0000] validating yamltags of struct DeployType     
DEBU[0000] validating yamltags of struct KubectlDeploy  
DEBU[0000] validating yamltags of struct KubectlFlags   
INFO[0000] Using kubectl context: minikube              
DEBU[0000] Using builder: local                         
DEBU[0000] Running command: [minikube docker-env --shell none] 
DEBU[0000] Command output: [DOCKER_TLS_VERIFY=1
DOCKER_HOST=tcp://192.168.99.102:2376
DOCKER_CERT_PATH=/home/foo/.minikube/certs
MINIKUBE_ACTIVE_DOCKERD=minikube
] 
DEBU[0000] setting Docker user agent to skaffold-v1.6.0-docs 
Generating tags...
 - go-hello-world -> nexus.foo.net/foo/go-hello-world:latest
INFO[0000] Tags generated in 64.344µs                   
Checking cache...
DEBU[0000] Found dependencies for dockerfile: [{go.mod /src/hello-world true} {go.sum /src/hello-world true} {. /src/hello-world true}] 
 - go-hello-world: Not found. Building
INFO[0000] Cache check complete in 1.802348ms           
Found [minikube] context, using local docker daemon.
Building [go-hello-world]...
DEBU[0000] Running command: [docker build . --file /home/foo/kubernetes/golang/go-hello-world/Dockerfile -t nexus.foo.net/foo/go-hello-world:latest] 
Sending build context to Docker daemon  60.42kB
Step 1/7 : FROM golang:1.14
 ---> 374d57ff6662
Step 2/7 : WORKDIR /src/hello-world
 ---> Using cache
 ---> 6bf66efe1427
Step 3/7 : COPY go.mod go.sum ./
 ---> Using cache
 ---> 7ca0b4bcc8f9
Step 4/7 : RUN go mod download
 ---> Using cache
 ---> 393f43ee8bd8
Step 5/7 : COPY . ./
 ---> Using cache
 ---> fd357c8a75d7
Step 6/7 : RUN go build -o /app -v ./cmd/hello-world
 ---> Using cache
 ---> af198b2dadf5
Step 7/7 : ENTRYPOINT ["/app"]
 ---> Using cache
 ---> c52e6c26b703
Successfully built c52e6c26b703
Successfully tagged nexus.foo.net/foo/go-hello-world:latest
The push refers to repository [nexus.foo.net/foo/go-hello-world]
FATA[0001] failed to build: build failed: building [go-hello-world]: build artifact: Get https://nexus.foo.net/v2/: dial tcp 10.196.80.185:443: connect: connection refused 

Contributor guide