Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare cli-go to accept --kubeconfig setting #3107

Merged

Conversation

corneliusweig
Copy link
Contributor

@corneliusweig corneliusweig commented Oct 21, 2019

Relates to #2699

Should merge before : #3100

Should merge after : n/a

Description

This introduces yet another global state in context.go. An alternative could be to
load the kubeconfig eagerly, when ConfigureKubeConfig is called. However,
this would require to call this setup method in all tests which make use
of the k8s rest client, which is a severe disadvantage.

User facing changes

n/a

Next PRs.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Mentions any output changes.
  • Adds documentation as needed: user docs, YAML reference, CLI reference.
  • Adds integration tests if needed.

Reviewer Notes

  • The code flow looks good.
  • Unit test added.
  • User facing changes look good.

This prepares for upcoming commits which introduce the `--kubeconfig`
flag.
@codecov
Copy link

codecov bot commented Oct 21, 2019

Codecov Report

Merging #3107 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted Files Coverage Δ
pkg/skaffold/config/options.go 100% <ø> (ø) ⬆️
pkg/skaffold/kubernetes/context/context.go 100% <100%> (ø) ⬆️
cmd/skaffold/app/cmd/runner.go 70% <100%> (ø) ⬆️

This introduces yet another global state. An alternative could be to
load the kubeconfig eagerly, when ConfigureKubeConfig is called. However,
this would require to call this setup method in all tests which make use
of the k8s rest client, which is a severe disadvantage.

Signed-off-by: Cornelius Weig <[email protected]>
@tejal29 tejal29 added the kokoro:run runs the kokoro jobs on a PR label Oct 23, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Oct 23, 2019
@corneliusweig
Copy link
Contributor Author

The kokoro failure seems unrelated:

helper.go:169: skaffold build: exit status 1, Generating tags...
         - gcr.io/k8s-skaffold/gke-loadbalancer -> gcr.io/k8s-skaffold/gke-loadbalancer:v0.40.0-88-g2790ddf
        Tags generated in 19.478275ms
        Checking cache...
         - gcr.io/k8s-skaffold/gke-loadbalancer: Not found. Building
        Cache check complete in 2.182380707s
        Starting build...
        Building [gcr.io/k8s-skaffold/gke-loadbalancer]...
        Sending build context to Docker daemon  3.072kB

        Step 1/6 : FROM golang:1.12.9-alpine3.10 as builder
        1.12.9-alpine3.10: Pulling from library/golang
        9d48c3bd43c5: Pulling fs layer
        7f94eaf8af20: Pulling fs layer
        9fe9984849c1: Pulling fs layer
        cf0db633a67d: Pulling fs layer
        0f7136d71739: Pulling fs layer
        cf0db633a67d: Waiting
        0f7136d71739: Waiting
        7f94eaf8af20: Verifying Checksum
        7f94eaf8af20: Download complete
        9fe9984849c1: Verifying Checksum
        9fe9984849c1: Download complete
        0f7136d71739: Verifying Checksum
        0f7136d71739: Download complete
        9d48c3bd43c5: Verifying Checksum
        9d48c3bd43c5: Download complete
        9d48c3bd43c5: Pull complete
        7f94eaf8af20: Pull complete
        9fe9984849c1: Pull complete
    panic.go:406: time="2019-10-23T19:54:47Z" level=fatal msg="build failed: build failed: building [gcr.io/k8s-skaffold/gke-loadbalancer]: build artifact: unable to stream build output: error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/e0/e0d64652399115816bb8c0b5bb008fa4166bda4d6e06ebf3c0196a5adfc87a66/data?verify=1571863475-hvgFT055hjSkmypZHN8J1udoivU%!D(MISSING): net/http: TLS handshake timeout"

@tejal29 tejal29 merged commit 2c990cb into GoogleContainerTools:master Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants