1. 20 Apr, 2018 1 commit
  2. 02 Apr, 2018 4 commits
  3. 01 Apr, 2018 4 commits
    • Kubernetes Submit Queue's avatar
      Merge pull request #61990 from CaoShuFeng/RequestToken-flag · 03c154a1
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      fix flag message about TokenRequest
      
      fix help message about TokenRequest flags
      
      
      
      **What this PR does / why we need it**:
      
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      Fixes #
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      03c154a1
    • Guangya Liu's avatar
      Updated README for ipvs. · 0dd857e0
      Guangya Liu authored
      0dd857e0
    • Kubernetes Submit Queue's avatar
      Merge pull request #61988 from nikhiljindal/nilAnnotations · 11d28128
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      init annotations if it is nil to fix kubemci e2e test failures
      
      Initializing ingress.annotations before setting an annotation to fix `assignment to entry in nil map` error.
      
      Logs: https://storage.googleapis.com/kubernetes-jenkins/logs/ci-kubemci-ingress-conformance/1035/build-log.txt
      ```
      I0331 21:01:42.915] [91m[1m•! Panic [43.203 seconds][0m
      I0331 21:01:42.915] [sig-network] Loadbalancing: L7
      I0331 21:01:42.916] [90m/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/framework.go:22[0m
      I0331 21:01:42.916]   GCE [Slow] [Feature:kubemci]
      I0331 21:01:42.916]   [90m/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/ingress.go:578[0m
      I0331 21:01:42.917]     [91m[1mshould create ingress with backend HTTPS [It][0m
      I0331 21:01:42.917]     [90m/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/ingress.go:636[0m
      I0331 21:01:42.917] 
      I0331 21:01:42.918]     [91m[1mTest Panicked[0m
      I0331 21:01:42.918]     [91massignment to entry in nil map[0m
      I0331 21:01:42.918]     /usr/local/go/src/runtime/panic.go:491
      I0331 21:01:42.919] 
      I0331 21:01:42.919]     [91mFull Stack Trace[0m
      I0331 21:01:42.919]     	/usr/local/go/src/runtime/panic.go:491 +0x283
      I0331 21:01:42.920]     k8s.io/kubernetes/test/e2e/framework.(*IngressTestJig).SetUpBacksideHTTPSIngress(0xc420fe6840, 0x63514e0, 0xc42092ec30, 0xc420374da0, 0x17, 0xc4217a7650, 0x2c, 0x0, 0x0, 0x0, ...)
      I0331 21:01:42.920]     	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/ingress_utils.go:1630 +0x86b
      I0331 21:01:42.920]     k8s.io/kubernetes/test/e2e/network.executeBacksideBacksideHTTPSTest(0xc4211d1040, 0xc420fe6840, 0xc4217a7650, 0x2c)
      I0331 21:01:42.921]     	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/ingress.go:746 +0xbe
      I0331 21:01:42.921]     k8s.io/kubernetes/test/e2e/network.glob..func6.4.5()
      I0331 21:01:42.921]     	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/network/ingress.go:637 +0x4b
      I0331 21:01:42.922]     k8s.io/kubernetes/vendor/github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync(0xc4213ad440, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
      I0331 21:01:42.922]     	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/e2e.go:332 +0x219
      I0331 21:01:42.922]     k8s.io/kubernetes/test/e2e.TestE2E(0xc42092e1e0)
      I0331 21:01:42.922]     	/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/e2e_test.go:48 +0x2b
      I0331 21:01:42.923]     testing.tRunner(0xc42092e1e0, 0x41a1c50)
      I0331 21:01:42.923]     	/usr/local/go/src/testing/testing.go:746 +0xd0
      I0331 21:01:42.923]     created by testing.(*T).Run
      I0331 21:01:42.923]     	/usr/local/go/src/testing/testing.go:789 +0x2de
      ```
      
      ```release-note
      NONE
      ```
      
      cc @MrHohn @G-Harmon @csbell
      11d28128
    • Jordan Liggitt's avatar
      3b8a5704
  4. 31 Mar, 2018 18 commits
  5. 30 Mar, 2018 13 commits
    • ravisantoshgudimetla's avatar
      Build files generated · 2aaf85d0
      ravisantoshgudimetla authored
      2aaf85d0
    • ravisantoshgudimetla's avatar
    • Kubernetes Submit Queue's avatar
      Merge pull request #61786 from grayluck/ensureelb-test · 35386768
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 61871, 61890, 61786). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      Add unit testcases for ensureExternalLoadBalancer to make sure it doesn't panic when errors raised.
      
      **What this PR does / why we need it**:
      Add unit testcases for ensureExternalLoadBalancer to make sure it doesn't panic when errors raised. Increase code coverage from 76.5% to 81.5%.
      
      <!--
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      Fixes #
      
      **Special notes for your reviewer**:
      -->
      
      **Release note**: 
      
      ```release-note
      NONE
      ```
      
      \assign @MrHohn
      35386768
    • Kubernetes Submit Queue's avatar
      Merge pull request #61890 from dims/better-specify-dhcp-domain-for-hostname · 7a1e4445
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 61871, 61890, 61786). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      Specify DHCP domain for hostname
      
      **What this PR does / why we need it**:
      
      In 9a8c6db4, we looked at the hostname
      in the metadata service and used '.' as the delimiter to chop off the
      dhcp_domain (specified in nova.conf). However administrators need to
      better control the dhcp domain better as there may be a '.' in the host
      name itself. So let's introduce a config option that we can use and
      default it to what nova uses when dhcp_domain is not specified which is
      "novalocal"
      
      
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      Fixes #
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      new dhcp-domain parameter to be used for figuring out the hostname of a node
      ```
      7a1e4445
    • Kubernetes Submit Queue's avatar
      Merge pull request #61871 from MrHohn/e2e-ingress-gce-shared-test · 718568a9
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      [e2e ingress-gce] Run preshared-cert and backend HTTPS tests with kubemci
      
      **What this PR does / why we need it**:
      
      Make preshared-cert and backside-reencryption tests compatible with kubemci.
      
      Test is currently failing with the symptom described on https://github.com/GoogleCloudPlatform/k8s-multicluster-ingress/issues/131#issuecomment-377098544.
      
      @nikhiljindal @g-harmon 
      /hold
      
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      Fixes #NONE 
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      718568a9
    • Kubernetes Submit Queue's avatar
      Merge pull request #61713 from mountkin/fix-cli-run-panic · 8f7eb4e6
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      kubectl: fix a panic when createGeneratedObject failed
      
      **What this PR does / why we need it**:
      This PR fixed two bugs in the `kubectl run` command.
      The first commit fixed a panic that can be reproduced with the following two commands:
      ```bash
      kubectl run --image=alpine hello -- sleep 1d
      kubectl run --image=alpine --stdin --tty --attach hello -- /bin/sh
      ```
      When the panic happens, the stack trace is as the following: 
      ```
      panic: runtime error: invalid memory address or nil pointer dereference
      [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x12f92e6]
      
      goroutine 1 [running]:
      k8s.io/kubernetes/pkg/kubectl/cmd.RunRun(0x1890d20, 0xc4207f6210, 0x184e700, 0xc42000c010, 0x184e720, 0xc42000c018, 0x184e720, 0xc42000c020, 0xc42052ef00, 0xc42054f980, ...)
      	/home/star/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/run.go:328 +0x10b6
      k8s.io/kubernetes/pkg/kubectl/cmd.NewCmdRun.func1(0xc42052ef00, 0xc42054f980, 0x2, 0x8)
      	/home/star/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/run.go:105 +0x144
      ...
      ```
      The reason for the panic is that the original code didn't handle the error returned by `createGeneratedObject` correctly. See https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/run.go#L281
      If the function `createGeneratedObject` fails, the returned `runObject` will be `nil`.  At https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/run.go#L328 a nil pointer dereference will happen.
      
      The second problem this PR fixed is a resource leak if both `--rm` and `--expose` flags are provided. The original code used a map (https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/run.go#L280) to trace the created objects. But at https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/run.go#L296 the code will overwrite the previously created object with the same key. So at https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/run.go#L348 only the service will be deleted. The deployment will be left behind.
      
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      Fixes #
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      /kind bug
      /sig cli
      8f7eb4e6
    • nikhiljindal's avatar
    • Kubernetes Submit Queue's avatar
      Merge pull request #61091 from Lion-Wei/ipvs-lb · 5658a327
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 60990, 60947, 45275, 60565, 61091). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      fix service loadbalancer source range for ipvs proxy mode
      
      **What this PR does / why we need it**:
      fix service loadbalancer source range for ipvs proxy mode
      
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      Fixes #61090
      
      **Special notes for your reviewer**:
      
      **Release note**:
      ```
      NONE
      ```
      5658a327
    • Kubernetes Submit Queue's avatar
      Merge pull request #60565 from WanLinghao/kubectl_cp_slash · 9ec28601
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 60990, 60947, 45275, 60565, 61091). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      kubectl cp command bug fix
      
      **What this PR does / why we need it**:
      	when copy file from host to pod like this:	
              1.kubectl copy /tmp/test-file test-pod:/
      	2.kubectl copy /tmp/test-file test-pod:
      	example 1 will fail, example 2 will cause a panic.
      	This patch fix bugs above.
      
      
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      Fixes #60564
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      9ec28601
    • Kubernetes Submit Queue's avatar
      Merge pull request #45275 from CaoShuFeng/log-l · cea42846
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 60990, 60947, 45275, 60565, 61091). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      Support multi-container pod for "kubectl logs"
      
      kubectl logs -l will print logs for pods with the same label, however it doesn't support pods with multi containers. This change adds support to it with --all-containers.
      
      Ussage:
      $ kubectl logs my-pod --all-containers
      $ kubectl logs -laa=bb --all-containers
      $ kubectl logs my-pod my-container --all-containers (err: container should not combined with --all-containers)
      
      **Release note**:
      
      ```
      add --all-containers option to "kubectl log"
      ```
      
      Fixes:
      https://github.com/kubernetes/kubectl/issues/371
      cea42846
    • Kubernetes Submit Queue's avatar
      Merge pull request #60947 from fanzhangio/replace · f165ad7c
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 60990, 60947, 45275, 60565, 61091). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      Add conflict detection feature to apply strategy
      
      - Add DetectConflictor interface on Element level. Implemented it for particular elements.
      - If Options.FailOnConflict is enabled, Merge will detect conflict by invoking doConflictDecect for particular element,
        returning ConflictError with details.
      - Add tests, including use case examples and illustration. For example: list, map, and complicated combination.
      
      **What this PR does / why we need it**:
      Apply is being rewritten under pkg/kubectl/apply/strategy based on visitor pattern. The new merge and replace code should check for conflicts between the recorded value and the remote value, and optionally return an error if they do not match with the field and details. A conflict is if the same field is specified in BOTH the recorded and the remote values of an object, but does not match.
      
      **Which issue(s) this PR fixes**:
      Fixes #60945 
      https://github.com/kubernetes/kubectl/issues/97
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      f165ad7c
    • yankaiz's avatar
    • Kubernetes Submit Queue's avatar
      Merge pull request #60990 from bmcstdio/bcustodio/kubectl-edit · a13dee23
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      Ensure reasons end up as comments in kubectl edit.
      
      **What this PR does / why we need it**:
      
      This PR helps making sure that all text in the header of the file is prefixed with `#` when using `kubectl edit` to fix schema validation errors. The problem is best described with an example:
      
      *Before:*
      
      ```yaml
      # Please edit the object below. Lines beginning with a '#' will be ignored,
      # and an empty file will abort the edit. If an error occurs while saving this file will be
      # reopened with the relevant failures.
      #
      # mycrd "example-cr" was not valid:
      # * []: Invalid value: map[string]interface {}{"apiVersion":"example.com/v1alpha1", "kind":"MyCRD", "metadata":map[string]interface {}{"clusterName":"", "creationTimestamp":"2018-03-09T16:16:41Z", "name":"example-cr", "namespace":"default", "resourceVersion":"12399", "selfLink":"", "uid":"4089f5bd-23b5-11e8-a33f-42010aa40081", "generation":0}, "spec":map[string]interface {}{"size":-1}}: validation failure list:
      spec.size in body should be greater than or equal to 1
      #
      apiVersion: example.com/v1alpha1
      kind: MyCRD
      ```
      
      This obviously won't be accepted as input, the user having to manually add a `#` to the line in the header.
      
      *After:*
      
      ```yaml
      # Please edit the object below. Lines beginning with a '#' will be ignored,
      # and an empty file will abort the edit. If an error occurs while saving this file will be
      # reopened with the relevant failures.
      #
      # mycrd "example-cr" was not valid:
      # * []: Invalid value: map[string]interface {}{"apiVersion":"example.com/v1alpha1", "kind":"MyCRD", "metadata":map[string]interface {}{"clusterName":"", "creationTimestamp":"2018-03-09T16:16:41Z", "name":"example-cr", "namespace":"default", "resourceVersion":"12399", "selfLink":"", "uid":"4089f5bd-23b5-11e8-a33f-42010aa40081", "generation":0}, "spec":map[string]interface {}{"size":-1}}: validation failure list:
      # spec.size in body should be greater than or equal to 1
      #
      apiVersion: example.com/v1alpha1
      kind: MyCRD
      ```
      
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      (None that I am aware of)
      
      **Special notes for your reviewer**:
      (None)
      
      **Release note**:
      
      ```release-note
      Ensure reasons end up as comments in `kubectl edit`.
      ```
      a13dee23