1. 24 Apr, 2018 6 commits
  2. 23 Apr, 2018 27 commits
    • Kubernetes Submit Queue's avatar
      Merge pull request #62947 from fabriziopandini/kubeadm-ha-ControlPlaneEndpoint2 · d23ad1f8
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 62464, 62947). 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>.
      
      make API.ControlPlaneEndpoint accept IP
      
      **What this PR does / why we need it**:
      This PR implements one of the actions defined by https://github.com/kubernetes/kubeadm/issues/751 (checklist form implementing HA in kubeadm).
      
      With this PR, the `API.ControlPlaneEndpoint` value in the kubeadm MasterConfiguration file now accepts both DNS and IP.
      
      The `API.ControlPlaneEndpoint` should be used to set a stable IP address for the control plane; in an HA configuration, this should be the load balancer address (no matter if identified by a DNS name or by a stable IP).
      
      **Special notes for your reviewer**:
      /CC @timothysc 
      This PR is the same of https://github.com/kubernetes/kubernetes/pull/62667, that I closed by error 😥
      
      **Release note**:
      ```release-note
      NONE
      ```
      Nb. first https://github.com/kubernetes/kubernetes/pull/62667 already has the release note
      d23ad1f8
    • Kubernetes Submit Queue's avatar
      Merge pull request #62464 from choury/fix-double-rlock-in-cpumanger · fca65dcd
      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>.
      
      avoid dobule RLock() in cpumanager
      
      **What this PR does / why we need it**:
      
      We met a deadlock when removing pod.
      kubelet keeps logging:
      ```
      Pod "xxxx" is terminated, but some containers are still running 
      ```
      After debug, we found it stuck in `SetDefaultCPUSet` [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/cm/cpumanager/policy_static.go#L184)  while another goroutine are calling `GetCPUSetOrDefault` [here](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/cm/cpumanager/cpu_manager.go#L256).
      
      According  golang/go#15418, It is not safe to double RLock a RWMutex.
      
      **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
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      removed unsafe double RLock in cpumanager
      ```
      fca65dcd
    • Kubernetes Submit Queue's avatar
      Merge pull request #62860 from mikedanese/rawpprof · 316b76f0
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 63007, 62919, 62669, 62860). 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: save raw profiles too
      
      #62808
      
      ```release-note
      NONE
      ```
      316b76f0
    • Kubernetes Submit Queue's avatar
      Merge pull request #62669 from immutableT/deploy_helper_test · eea406c1
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 63007, 62919, 62669, 62860). 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 test for configure-helper.sh.
      
      **What this PR does / why we need it**:
      Add a framework for unit-testing configure-helper.sh.
      configure-helper.sh plays a critical role in initializing clusters both on GCE and GKE. It is currently, over 2K lines of code, yet it has no unit test coverage.
      This PR proposes a framework/approach on how to provide test coverage for this component.
      Notes: 
      1. Changes to configure-helper.sh itself were necessary to enable sourcing of this script for the purposes of testing.
      2. As POC api_manifest_test.go covers the logic related to the initialization of apiserver when integration with KMS was requested. The hope is that the same approach could be extended to the rest of the script.
      
      **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
      ```
      eea406c1
    • Kubernetes Submit Queue's avatar
      Merge pull request #62919 from vmware/backward_comp · 5752d1fa
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 63007, 62919, 62669, 62860). 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 vSphere Cloud Provider to handle upgrade from k8s version less than v1.9.4 to v1.9.4+
      
      **What this PR does / why we need it**:
      vSphere Cloud Provider in kubernetes master v1.9.4+ is not able to identify the kubernetes nodes of version less than 1.9.4. Hence, volume operations fail in this case. This PR fixes this.
      
      **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 #62435
      
      **Special notes for your reviewer**:
      Internally reviewed here: https://github.com/vmware/kubernetes/pull/477
      
      **Release note**:
      
      ```release-note
      None
      ```
      5752d1fa
    • Kubernetes Submit Queue's avatar
      Merge pull request #63007 from Cynerva/gkk/update-gcr-url · 6726844c
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 63007, 62919, 62669, 62860). 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>.
      
      juju: Use k8s.gcr.io url for arm64 ingress image
      
      **What this PR does / why we need it**:
      
      This updates the kubernetes-worker charm to point to k8s.gcr.io for the nginx-ingress-controller-arm64 image. This should have no impact on functionality today, but as I understand it, we're all standardizing on k8s.gcr.io to allow for future changes.
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      6726844c
    • Zihong Zheng's avatar
    • Mike Danese's avatar
      e2e: save raw profiles too · 9d9e588c
      Mike Danese authored
      9d9e588c
    • Kubernetes Submit Queue's avatar
      Merge pull request #62810 from liggitt/request-mapper · a0f94123
      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>.
      
      Remove request context mapper
      
      http.Request now allows setting/retrieving a per-request context, which removes the need for plumbing a request-context mapper throughout the stack
      
      In addition to being way simpler, this has the benefit of removing a potentially contentious lock object from the handling path
      
      This PR:
      * removes RequestContextMapper
      * converts context fetchers to use `req.Context()`
      * converts context setters to use `req = req.WithContext(...)`
      * updates filter plumbing in two places (audit and timeout) to properly return the request with modified context
      * updates tests that used a fake context mapper to set the context in the request instead
      
      Fixes https://github.com/kubernetes/kubernetes/issues/62796
      
      ```release-note
      NONE
      ```
      a0f94123
    • Kubernetes Submit Queue's avatar
      Merge pull request #61950 from grayluck/llb-test · e52e68a0
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 63001, 62152, 61950). 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>.
      
      Unit test for internal load balancer
      
      **What this PR does / why we need it**:
      Unit tests for internal load balancer. Coverage increases from 76.7% to 91.0%.
      
      Fix the volatile fakeApiService issue. Now tests should use GetApiService to get a copy of fakeApiService to prevent testcase interferences.
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      e52e68a0
    • Kubernetes Submit Queue's avatar
      Merge pull request #62152 from smarterclayton/use_client_store · 939c0783
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 63001, 62152, 61950). 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>.
      
      When bootstrapping a client cert, store it with other client certs
      
      The kubelet uses two different locations to store certificates on
      initial bootstrap and then on subsequent rotation:
      
      * bootstrap: certDir/kubelet-client.(crt|key)
      * rotation:  certDir/kubelet-client-(DATE|current).pem
      
      Bootstrap also creates an initial node.kubeconfig that points to the
      certs. Unfortunately, with short rotation the node.kubeconfig then
      becomes out of date because it points to the initial cert/key, not the
      rotated cert key.
      
      Alter the bootstrap code to store client certs exactly as if they would
      be rotated (using the same cert Store code), and reference the PEM file
      containing cert/key from node.kubeconfig, which is supported by kubectl
      and other Go tooling. This ensures that the node.kubeconfig continues to
      be valid past the first expiration.
      
      Example:
      
      ```
      bootstrap:
        writes to certDir/kubelet-client-DATE.pem and symlinks to certDir/kubelet-client-current.pem
        writes node.kubeconfig pointing to certDir/kubelet-client-current.pem
      rotation:
        writes to certDir/kubelet-client-DATE.pem and symlinks to certDir/kubelet-client-current.pem
      ```
      
      This will also allow us to remove the wierd "init store with bootstrap cert" stuff, although I'd prefer to do that in a follow up.
      
      @mikedanese @liggitt as per discussion on Slack today
      
      ```release-note
      The `--bootstrap-kubeconfig` argument to Kubelet previously created the first bootstrap client credentials in the certificates directory as `kubelet-client.key` and `kubelet-client.crt`.  Subsequent certificates created by cert rotation were created in a combined PEM file that was atomically rotated as `kubelet-client-DATE.pem` in that directory, which meant clients relying on the `node.kubeconfig` generated by bootstrapping would never use a rotated cert.  The initial bootstrap certificate is now generated into the cert directory as a PEM file and symlinked to `kubelet-client-current.pem` so that the generated kubeconfig remains valid after rotation.
      ```
      939c0783
    • Kubernetes Submit Queue's avatar
      Merge pull request #63001 from chuckha/kube-dns · 56fcfe3b
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 63001, 62152, 61950). 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>.
      
      Bump kube-dns version for kubeadm upgrade
      Signed-off-by: 's avatarChuck Ha <ha.chuck@gmail.com>
      
      **What this PR does / why we need it**: This PR bumps the version of kube-dns to the correct version for the kubeadm upgrade path.
      
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      Related to kubernetes/kubeadm#739 although that is a different ticket, the bug was reported there.
      
      **Special notes for your reviewer**:
      
      This should also be cherry picked to the 1.9 release since the kube-dns was also cherry picked.
      
      related PR
      https://github.com/kubernetes/kubernetes/pull/62678
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      /cc @kubernetes/sig-cluster-lifecycle-pr-reviews
      56fcfe3b
    • immutablet's avatar
      Add unit test for configure-helper. · dc78d72f
      immutablet authored
      dc78d72f
    • Kubernetes Submit Queue's avatar
      Merge pull request #63013 from rramkumar1/patch-10 · bbfa2992
      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>.
      
      Update upgrade/downgrade images for ingress-gce
      
      /assign @MrHohn 
      
      **Release note**:
      
      ```release-note
      None
      ```
      bbfa2992
    • Bobby (Babak) Salamat's avatar
    • Bobby (Babak) Salamat's avatar
      Added test for scheduler informers · 719a56fa
      Bobby (Babak) Salamat authored
      719a56fa
    • Kubernetes Submit Queue's avatar
      Merge pull request #62728 from php-coder/psp_update_addons_manifests · 5f1793e3
      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>.
      
      Update addon manifests to use policy/v1beta1
      
      **What this PR does / why we need it:**
      This is a part of the PSP migration from extensions to policy API group. This PR updates addon manifests to use policy/v1beta1 and grant permissions in policy API group.
      
      **Which issue(s) this PR fixes:**
      Addressed to https://github.com/kubernetes/features/issues/5
      5f1793e3
    • Chuck Ha's avatar
      Bump kube-dns version for kubeadm upgrade · 3cbb2833
      Chuck Ha authored
      Signed-off-by: 's avatarChuck Ha <ha.chuck@gmail.com>
      3cbb2833
    • Kubernetes Submit Queue's avatar
      Merge pull request #62543 from ingvagabund/timeout-on-cloud-provider-request · 5b779964
      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>.
      
      Timeout on instances.NodeAddresses cloud provider request
      
      **What this PR does / why we need it**:
      
      In cases the cloud provider does not respond before the node gets evicted.
      
      **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
      stop kubelet to cloud provider integration potentially wedging kubelet sync loop
      ```
      5b779964
    • Rohit Ramkumar's avatar
      f3cce76d
    • Clayton Coleman's avatar
      When bootstrapping a client cert, store it with other client certs · 36895934
      Clayton Coleman authored
      The kubelet uses two different locations to store certificates on
      initial bootstrap and then on subsequent rotation:
      
      * bootstrap: certDir/kubelet-client.(crt|key)
      * rotation:  certDir/kubelet-client-(DATE|current).pem
      
      Bootstrap also creates an initial node.kubeconfig that points to the
      certs. Unfortunately, with short rotation the node.kubeconfig then
      becomes out of date because it points to the initial cert/key, not the
      rotated cert key.
      
      Alter the bootstrap code to store client certs exactly as if they would
      be rotated (using the same cert Store code), and reference the PEM file
      containing cert/key from node.kubeconfig, which is supported by kubectl
      and other Go tooling. This ensures that the node.kubeconfig continues to
      be valid past the first expiration.
      36895934
    • George Kraft's avatar
      408c2c30
    • Jan Chaloupka's avatar
    • Kubernetes Submit Queue's avatar
      Merge pull request #62909 from kawych/master · 9b7439d7
      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>.
      
      Manage Metadata Agent Config with Addon Manager
      
      **What this PR does / why we need it**:
      Fixes error where config map for Metadata Agent was not created by addon manager.
      
      **Release note**:
      ```release-note
      Fix error where config map for Metadata Agent was not created by addon manager.
      ```
      9b7439d7
    • Kubernetes Submit Queue's avatar
      Merge pull request #62856 from liggitt/node-authorizer-contention-benchmark · f0b207df
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 62409, 62856). 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 node authorizer contention benchmark
      
      * Makes the node authorization benchmark run in parallel
      * Runs the tests a second time with a background goroutine pushing graph modifications at a rate of 100x per second (to test authorization performance with contention on the graph lock).
      
      Graph modifications come from the informers watching objects relevant to node authorization, and only fire when a relevant change is made (for example, most node updates do not trigger a graph modification, only ones which change the node's config source configmap reference; most pod updates do not trigger a graph modification, only ones that set the pod's nodeName or uid)
      
      The results do not indicate bottlenecks in the authorizer, even under higher-than-expected write contention.
      
      ```
      $ go test ./plugin/pkg/auth/authorizer/node/ -run foo -bench 'Authorization' -benchmem -v
      goos: darwin
      goarch: amd64
      pkg: k8s.io/kubernetes/plugin/pkg/auth/authorizer/node
      BenchmarkAuthorization/allowed_node_configmap-8                                 596 ns/op   529 B/op   11 allocs/op    3000000
      BenchmarkAuthorization/allowed_configmap-8                                      609 ns/op   529 B/op   11 allocs/op    3000000
      BenchmarkAuthorization/allowed_secret_via_pod-8                                 586 ns/op   529 B/op   11 allocs/op    3000000
      BenchmarkAuthorization/allowed_shared_secret_via_pod-8                        18202 ns/op   542 B/op   11 allocs/op     100000
      BenchmarkAuthorization/disallowed_node_configmap-8                              900 ns/op   691 B/op   17 allocs/op    2000000
      BenchmarkAuthorization/disallowed_configmap-8                                   868 ns/op   693 B/op   17 allocs/op    2000000
      BenchmarkAuthorization/disallowed_secret_via_pod-8                              875 ns/op   693 B/op   17 allocs/op    2000000
      BenchmarkAuthorization/disallowed_shared_secret_via_pvc-8                      1215 ns/op   948 B/op   22 allocs/op    1000000
      BenchmarkAuthorization/disallowed_pvc-8                                         912 ns/op   693 B/op   17 allocs/op    2000000
      BenchmarkAuthorization/disallowed_pv-8                                         1137 ns/op   834 B/op   19 allocs/op    2000000
      BenchmarkAuthorization/disallowed_attachment_-_no_relationship-8                892 ns/op   677 B/op   16 allocs/op    2000000
      BenchmarkAuthorization/disallowed_attachment_-_feature_disabled-8               236 ns/op   208 B/op    2 allocs/op   10000000
      BenchmarkAuthorization/allowed_attachment_-_feature_enabled-8                   723 ns/op   593 B/op   12 allocs/op    2000000
      
      BenchmarkAuthorization/contentious_allowed_node_configmap-8                     726 ns/op   529 B/op   11 allocs/op    2000000
      BenchmarkAuthorization/contentious_allowed_configmap-8                          698 ns/op   529 B/op   11 allocs/op    2000000
      BenchmarkAuthorization/contentious_allowed_secret_via_pod-8                     778 ns/op   529 B/op   11 allocs/op    2000000
      BenchmarkAuthorization/contentious_allowed_shared_secret_via_pod-8            21406 ns/op   638 B/op   13 allocs/op     100000
      BenchmarkAuthorization/contentious_disallowed_node_configmap-8                 1135 ns/op   692 B/op   17 allocs/op    1000000
      BenchmarkAuthorization/contentious_disallowed_configmap-8                      1239 ns/op   691 B/op   17 allocs/op    1000000
      BenchmarkAuthorization/contentious_disallowed_secret_via_pod-8                 1043 ns/op   692 B/op   17 allocs/op    1000000
      BenchmarkAuthorization/contentious_disallowed_shared_secret_via_pvc-8          1404 ns/op   950 B/op   22 allocs/op    1000000
      BenchmarkAuthorization/contentious_disallowed_pvc-8                            1177 ns/op   693 B/op   17 allocs/op    1000000
      BenchmarkAuthorization/contentious_disallowed_pv-8                             1295 ns/op   834 B/op   19 allocs/op    1000000
      BenchmarkAuthorization/contentious_disallowed_attachment_-_no_relationship-8   1170 ns/op   676 B/op   16 allocs/op    1000000
      BenchmarkAuthorization/contentious_disallowed_attachment_-_feature_disabled-8   262 ns/op   208 B/op    2 allocs/op   10000000
      BenchmarkAuthorization/contentious_allowed_attachment_-_feature_enabled-8       790 ns/op   593 B/op   12 allocs/op    2000000
      
      --- BENCH: BenchmarkAuthorization
         node_authorizer_test.go:592: graph modifications during non-contention test: 0
         node_authorizer_test.go:589: graph modifications during contention test: 6301
         node_authorizer_test.go:590: <1ms=5507, <10ms=128, <25ms=43, <50ms=65, <100ms=135, <250ms=328, <500ms=93, <1000ms=2, >1000ms=0
      PASS
      ok     k8s.io/kubernetes/plugin/pkg/auth/authorizer/node   112.616s
      ```
      
      ```release-note
      NONE
      ```
      f0b207df
    • Kubernetes Submit Queue's avatar
      Merge pull request #62409 from rajansandeep/corednsscaler · 77f53242
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 62409, 62856). 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>.
      
      DNS-Autoscaler support for CoreDNS
      
      **What this PR does / why we need it**:
      This PR provides the dns-horizontal autoscaler for CoreDNS in kube-up, enabling the tests to pass once CoreDNS is the default. 
      
      **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 #61176 
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      77f53242
    • choury's avatar
      avoid dobule RLock() in cpumanager · c1b19fce
      choury authored
      c1b19fce
  3. 22 Apr, 2018 3 commits
  4. 21 Apr, 2018 4 commits