1. 24 May, 2017 3 commits
    • Kubernetes Submit Queue's avatar
      Merge pull request #42042 from perotinus/svcaccounts · f30443ca
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 42042, 46139, 46126, 46258, 46312)
      
      [Federation] Use service accounts instead of the user's credentials when accessing joined clusters' API servers.
      
      Fixes #41267.
      
      Release notes:
      ```release-note
      Modifies kubefed to create and the federation controller manager to use credentials associated with a service account rather than the user's credentials.
      ```
      f30443ca
    • Kubernetes Submit Queue's avatar
      Merge pull request #44428 from qiujian16/commenttypo · 90250220
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      Fix some typo of comment in kubelet.go
      
      **What this PR does / why we need it**:
      The PR is to fix some typo in kubelet.go
      
      **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
      N/A
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      ```
      90250220
    • Kubernetes Submit Queue's avatar
      Merge pull request #46289 from p0lyn0mial/admission_plugins_remove_init_blocks · 95a6f108
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      remove init blocks from all admission plugins
      
      **What this PR does / why we need it**:
      removes init blocks from all admission plugins
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      95a6f108
  2. 23 May, 2017 37 commits
    • Kubernetes Submit Queue's avatar
      Merge pull request #46194 from CaoShuFeng/under · c2421df3
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 46149, 45897, 46293, 46296, 46194)
      
      check flag format in file known-flags.txt
      
      All flags in file hack/verify-flags/known-flags.txt should contain
      character -, this change check it to prevent adding useless flags
      to known-flags.txt
      ref #45948 
      
      **Release note**:
      
      ```
      NONE
      ```
      c2421df3
    • Kubernetes Submit Queue's avatar
      Merge pull request #46296 from ncdc/crd-finalizer · 763b75d9
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 46149, 45897, 46293, 46296, 46194)
      
      Use storage instead of REST for the CRD finalizer
      
      **What this PR does / why we need it**:
      Switch the custom resource definition finalizer controller to use
      storage instead of a REST client, because a client could incorrectly try
      to delete ThirdPartyResources whose names happen to collide with the
      CustomResource instances.
      
      **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      763b75d9
    • Kubernetes Submit Queue's avatar
      Merge pull request #46293 from nicksardo/chaosmonkey-defer-stop · dae69555
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 46149, 45897, 46293, 46296, 46194)
      
      Chaosmonkey - Signal stop to tests and wait for done when disruption fails
      
      **What this PR does / why we need it**:
      Prevents tests from leaking resources because their Teardown was never called when test disruption fails.   
      
      **Which issue this PR fixes**
      First problem of #45842 
      
      **Release note**:
      ```release-note
      NONE
      ```
      dae69555
    • Kubernetes Submit Queue's avatar
      Merge pull request #45897 from ncdc/gc-require-list-watch · 45b275d5
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 46149, 45897, 46293, 46296, 46194)
      
      GC: update required verbs for deletable resources, allow list of ignored resources to be customized
      
      The garbage collector controller currently needs to list, watch, get,
      patch, update, and delete resources. Update the criteria for
      deletable resources to reflect this.
      
      Also allow the list of resources the garbage collector controller should
      ignore to be customizable, so downstream integrators can add their own
      resources to the list, if necessary.
      
      cc @caesarxuchao @deads2k @smarterclayton @mfojtik @liggitt @sttts @kubernetes/sig-api-machinery-pr-reviews
      45b275d5
    • Kubernetes Submit Queue's avatar
      Merge pull request #46149 from cjcullen/logtoggle · 3ff99a83
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      Allow the /logs handler on the apiserver to be toggled.
      
      Adds a flag to kube-apiserver, and plumbs through en environment variable in configure-helper.sh
      3ff99a83
    • Kubernetes Submit Queue's avatar
      Merge pull request #46267 from Random-Liu/extend-stop-container-request-timeout · 98c66f9f
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      Double `StopContainer` request timeout.
      
      Doubled `StopContainer` request timeout to leave some time for `SIGKILL` container.
      
      @yujuhong @feiskyer
      98c66f9f
    • p0lyn0mial's avatar
      remove init blocks from all admission plugins · c5019bf6
      p0lyn0mial authored
      c5019bf6
    • Kubernetes Submit Queue's avatar
      Merge pull request #46285 from yastij/scheduling-delete-todo · f8815c96
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      removing generic_scheduler todo after discussion (#46027)
      
      **What this PR does / why we need it**:
      
      **Which issue this PR fixes** #46027 
      
      **Special notes for your reviewer**: just a quick clean cc @wojtek-t 
      
      **Release note**:
      ```release-note
      ```
      f8815c96
    • Andy Goldstein's avatar
      Use storage instead of REST for the CRD finalizer · 3b698848
      Andy Goldstein authored
      Switch the custom resource definition finalizer controller to use
      storage instead of a REST client, because a client could incorrectly try
      to delete ThirdPartyResources whose names happen to collide with the
      CustomResource instances.
      3b698848
    • Kubernetes Submit Queue's avatar
      Merge pull request #45136 from vishh/cos-nvidia-driver-install · 1e210580
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      Enable "kick the tires" support for Nvidia GPUs in COS
      
      This PR provides an installation daemonset that will install Nvidia CUDA drivers on Google Container Optimized OS (COS).
      User space libraries and debug utilities from the Nvidia driver installation are made available on the host in a special directory on the host -
      * `/home/kubernetes/bin/nvidia/lib` for libraries
      *  `/home/kubernetes/bin/nvidia/bin` for debug utilities
      
      Containers that run CUDA applications on COS are expected to consume the libraries and debug utilities (if necessary) from the host directories using `HostPath` volumes.
      
      Note: This solution requires updating Pod Spec across distros. This is a known issue and will be addressed in the future. Until then CUDA workloads will not be portable.
      
      This PR updates the COS base image version to m59. This is coupled with this PR for the following reasons:
      1. Driver installation requires disabling a kernel feature in COS. 
      2. The kernel API for disabling this interface changed across COS versions
      3. If the COS image update is not handled in this PR, then a subsequent COS image update will break GPU integration and will require an update to the installation scripts in this PR.
      4. Instead of having to post `3` PRs, one each for adding the basic installer, updating COS to m59, and then updating the installer again, this PR combines all the changes to reduce review overhead and latency, and additional noise that will be created when GPU tests break.
      
      **Try out this PR**
      1. Get Quota for GPUs in any region
      2. `export `KUBE_GCE_ZONE=<zone-with-gpus>` KUBE_NODE_OS_DISTRIBUTION=gci`
      3. `NODE_ACCELERATORS="type=nvidia-tesla-k80,count=1" cluster/kube-up.sh`
      4. `kubectl create -f cluster/gce/gci/nvidia-gpus/cos-installer-daemonset.yaml`
      5. Run your CUDA app in a pod.
      
      **Another option is to run a e2e manually to try out this PR**
      1. Get Quota for GPUs in any region
      2. export `KUBE_GCE_ZONE=<zone-with-gpus>` KUBE_NODE_OS_DISTRIBUTION=gci
      3. `NODE_ACCELERATORS="type=nvidia-tesla-k80,count=1"`
      4. `go run hack/e2e.go -- --up` 
      5. `hack/ginkgo-e2e.sh --ginkgo.focus="\[Feature:GPU\]"`
      The e2e will install the drivers automatically using the daemonset and then run test workloads to validate driver integration.
      
      TODO:
      - [x] Update COS image version to m59 release.
      - [x] Remove sleep from the install script and add it to the daemonset
      - [x] Add an e2e that will run the daemonset and run a sample CUDA app on COS clusters.
      - [x] Setup a test project with necessary quota to run GPU tests against HEAD to start with https://github.com/kubernetes/test-infra/pull/2759
      - [x] Update node e2e serial configs to install nvidia drivers on COS by default
      1e210580
    • Kubernetes Submit Queue's avatar
      Merge pull request #46286 from zjj2wry/timstamps-timestamps · 9ebfe966
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 45587, 46286)
      
      fix typo in kubelet
      
      **What this PR does / why we need it**:
      
      **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      9ebfe966
    • Kubernetes Submit Queue's avatar
      Merge pull request #45587 from foxish/pdb-maxunavailab · 1602e2a3
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 45587, 46286)
      
      PDB Max Unavailable Field
      
      Completes https://github.com/kubernetes/features/issues/285
      
      ```release-note
      Adds a MaxUnavailable field to PodDisruptionBudget
      ```
      
      
      Individual commits are self-contained; Last commit can be ignored because it is autogenerated code.
      cc @kubernetes/sig-apps-api-reviews @kubernetes/sig-apps-pr-reviews
      1602e2a3
    • Nick Sardo's avatar
      Defer test stop & cleanup · f40f45ab
      Nick Sardo authored
      f40f45ab
    • Random-Liu's avatar
      Double `StopContainer` request timeout. · 5f0288e0
      Random-Liu authored
      5f0288e0
    • Andy Goldstein's avatar
      GC: allow ignored resources to be customized · d1a03846
      Andy Goldstein authored
      Allow the list of resources the garbage collector controller should
      ignore to be customizable, so downstream integrators can add their own
      resources to the list, if necessary.
      d1a03846
    • Andy Goldstein's avatar
      GC: update required verbs for deletable resources · d30fb0d9
      Andy Goldstein authored
      The garbage collector controller currently needs to list, watch, get,
      patch, update, and delete resources. Update the criteria for
      deletable resources to reflect this.
      d30fb0d9
    • Anirudh's avatar
      PDB MaxUnavailable: Generated · 48d76edc
      Anirudh authored
      48d76edc
    • Kubernetes Submit Queue's avatar
      Merge pull request #46223 from smarterclayton/scheduler_max · 8e07e61a
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 45766, 46223)
      
      Scheduler should use a shared informer, and fix broken watch behavior for cached watches
      
      Can be used either from a true shared informer or a local shared
      informer created just for the scheduler.
      
      Fixes a bug in the cache watcher where we were returning the "current" object from a watch event, not the historic event.  This means that we broke behavior when introducing the watch cache.  This may have API implications for filtering watch consumers - but on the other hand, it prevents clients filtering from seeing objects outside of their watch correctly, which can lead to other subtle bugs.
      
      ```release-note
      The behavior of some watch calls to the server when filtering on fields was incorrect.  If watching objects with a filter, when an update was made that no longer matched the filter a DELETE event was correctly sent.  However, the object that was returned by that delete was not the (correct) version before the update, but instead, the newer version.  That meant the new object was not matched by the filter.  This was a regression from behavior between cached watches on the server side and uncached watches, and thus broke downstream API clients.
      ```
      8e07e61a
    • Kubernetes Submit Queue's avatar
      Merge pull request #45766 from sttts/sttts-audit-event-in-context · 1f45c484
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 45766, 46223)
      
      Audit: fill audit.Event in handler chain
      
      Related:
      - external API types https://github.com/kubernetes/kubernetes/pull/45315
      - policy checker https://github.com/kubernetes/kubernetes/pull/46009
      
      Decisions:
      - ~~[ ] decide whether we want to send an event before `WriteHeader` https://github.com/kubernetes/kubernetes/pull/45766#pullrequestreview-38664161~~ Follow-up described in https://github.com/kubernetes/kubernetes/pull/46065/files#r117438531
      - [ ] decide how to handle `AuditID`s and the IP chain https://github.com/kubernetes/kubernetes/pull/45766#pullrequestreview-38659371. Is the variant in the proposal (https://github.com/kubernetes/community/pull/625) final? Then we need the API type update.
      - ~~[ ] decide how to mark intermediate/incomplete events? set a special reason in `ResponseStatus.Reason` vs. having extra fields for that `Event.NonFinal`
       https://github.com/kubernetes/kubernetes/pull/45766#discussion_r116795888~~ Follow-up of #46065
      - [ ] decide whether and how to protect the `Audit-Level` header https://github.com/kubernetes/kubernetes/pull/45766#pullrequestreview-38937691
      
      TODOs:
      - ~~[ ] move `AuditIDHeader`, `AuditLevelHeader` to types https://github.com/kubernetes/kubernetes/pull/45766#discussion_r117064094, @timstclair for the type PR~~ Follow-up of https://github.com/kubernetes/kubernetes/pull/46065
      - [x] add SourceIP/ForwardedFor support https://github.com/kubernetes/kubernetes/pull/45766#discussion_r116778101
      - [x] adapt ObjectReference.Resource to API PR https://github.com/kubernetes/kubernetes/pull/45766#pullrequestreview-38656828
      1f45c484
    • Anirudh's avatar
      PDB MaxUnavailable: e2e tests · 63e51dc6
      Anirudh authored
      63e51dc6
    • Anirudh's avatar
      PDB MaxUnavailable: kubectl changes · 078f9566
      Anirudh authored
      078f9566
    • Anirudh's avatar
      ce48d4fb
    • Anirudh's avatar
      PDB MaxUnavailable: API changes · 2b0de599
      Anirudh authored
      2b0de599
    • Kubernetes Submit Queue's avatar
      Merge pull request #46216 from deads2k/owners-02-tighten · 4a1483ef
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      tighten and simplify owners in some staging repos
      
      With the move to staging, we can have much cleaner owners across the related packages.  This pares down the list of OWNERS to better match for code and activity.  It should help get PRs directed to people more active and familiar with the areas for quicker review.
      
      @kubernetes/sig-api-machinery-misc 
      @lavalamp @smarterclayton ptal.
      4a1483ef
    • Kubernetes Submit Queue's avatar
      Merge pull request #45637 from xilabao/hide-api-version · 4871f4a7
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      remove --api-version
      4871f4a7
    • zhengjiajin's avatar
      fix typo in kubelet · c79b0c79
      zhengjiajin authored
      c79b0c79
    • Yassine TIJANI's avatar
      a348a4e8
    • Dr. Stefan Schimanski's avatar
      Update bazel · 9fdc36a4
      Dr. Stefan Schimanski authored
      9fdc36a4
    • Dr. Stefan Schimanski's avatar
      ce942d19
    • Dr. Stefan Schimanski's avatar
    • Dr. Stefan Schimanski's avatar
    • Kubernetes Submit Queue's avatar
      Merge pull request #46234 from wojtek-t/faster_selflink · 8bee44b6
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 46060, 46234)
      
      Speedup generating selflinks for list and watch requests
      
      I've seen profiles, where GenerateSelflink was 8-9% of whole cpu usage of apiserver (profiles over 30s). Most of this where spent in getting RequestInfo from the context and creating the context.
      
      This PR changes the API of the GenerateLink method of the namer which results in computing the context and requestInfo only once per LIST/WATCH request (instead of computing it for every single returned element of LIST/WATCH).
      
      @smarterclayton @deads2k - can one of you please take a look?
      8bee44b6
    • Kubernetes Submit Queue's avatar
      Merge pull request #46060 from MrHohn/fix-serviceregistry-externaltraffic · 7e759982
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 46060, 46234)
      
      Randomize test nodePort to prevent collision
      
      Fix #37982.
      
      /assign @bowei 
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      7e759982
    • Kubernetes Submit Queue's avatar
      Merge pull request #45995 from humblec/glusterfs-mount-3 · 286bcc6f
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      Add `auto_unmount` mount option for glusterfs fuse mount.
      
      libfuse has an auto_unmount option which, if enabled, ensures that
      the file system is unmounted at FUSE server termination by running a
      separate monitor process that performs the unmount when that occurs.
      (This feature would probably better be called "robust auto-unmount",
      as FUSE servers usually do try to unmount their file systems upon
      termination, it's just this mechanism is not crash resilient.)
      This change implements that option and behavior for glusterfs.
      
      This option will be only supported for clients with version >3.11.
      Signed-off-by: 's avatarHumble Chirammal <hchiramm@redhat.com>
      286bcc6f
    • Kubernetes Submit Queue's avatar
      Merge pull request #46176 from vmware/vSphereStoragePolicySupport · 455e9fff
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      vSphere storage policy support for dynamic volume provisioning
      
      Till now, vSphere cloud provider provides support to configure persistent volume with VSAN storage capabilities - kubernetes#42974. Right now this only works with VSAN.
      
      Also there might be other use cases:
      
      - The user might need a way to configure a policy on other datastores like VMFS, NFS etc.
      - Use Storage IO control, VMCrypt policies for a persistent disk.
      
      We can achieve about 2 use cases by using existing storage policies which are already created on vCenter using the Storage Policy Based Management service. The user will specify the SPBM policy ID as part of dynamic provisioning 
      
      - resultant persistent volume will have the policy configured with it. 
      - The persistent volume will be created on the compatible datastore that satisfies the storage policy requirements. 
      - If there are multiple compatible datastores, the datastore with the max free space would be chosen by default.
      - If the user specifies the datastore along with the storage policy ID, the volume will created on this datastore if its compatible. In case if the user specified datastore is incompatible, it would error out the reasons for incompatibility to the user.
      - Also, the user will be able to see the associations of persistent volume object with the policy on the vCenter once the volume is attached to the node.
      
      For instance in the below example, the volume will created on a compatible datastore with max free space that satisfies the "Gold" storage policy requirements.
      
      ```
      kind: StorageClass
      apiVersion: storage.k8s.io/v1beta1
      metadata:
             name: fast
      provisioner: kubernetes.io/vsphere-volume
      parameters:
            diskformat: zeroedthick
            storagepolicyName: Gold
      ```
      
      For instance in the below example, the vSphere CP checks if "VSANDatastore" is compatible with "Gold" storage policy requirements. If yes, volume will be provisioned on "VSANDatastore" else it will error that "VSANDatastore" is not compatible with the exact reason for failure.
      
      ```
      kind: StorageClass
      apiVersion: storage.k8s.io/v1beta1
      metadata:
             name: fast
      provisioner: kubernetes.io/vsphere-volume
      parameters:
            diskformat: zeroedthick
            storagepolicyName: Gold
            datastore: VSANDatastore
      ```
      
      As a part of this change, 4 commits have been added to this PR.
      
      1. Vendor changes for vmware/govmomi
      2. Changes to the VsphereVirtualDiskVolumeSource in the Kubernetes API. Added 2 additional fields StoragePolicyName, StoragePolicyID
      3. Swagger and Open spec API changes.
      4. vSphere Cloud Provider changes to implement the storage policy support.
      
      **Release note**:
      
      
      ```release-note
      vSphere cloud provider: vSphere Storage policy Support for dynamic volume provisioning
      ```
      455e9fff
    • Kubernetes Submit Queue's avatar
      Merge pull request #46008 from NickrenREN/openstack-add-metric · 3bfae793
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue
      
      Recording openstack metrics
      
      add openstack operation metrics
      
      
      **Release note**:
      ```release-note
      Add support for emitting metrics from openstack cloudprovider about storage operations.
      ```
      
      /assign @gnufied
      3bfae793
    • Kubernetes Submit Queue's avatar
      Merge pull request #46062 from alexandercampbell/correct-deprecation-errors · 644a544d
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 46201, 45952, 45427, 46247, 46062)
      
      kubectl: fix deprecation warning bug
      
      **What this PR does / why we need it**:
      
      Some kubectl commands were deprecated but would fail to print the
      correct warning message when a flag was given before the command name.
      
      	# Correctly prints the warning that "resize" is deprecated and
      	# "scale" is now preferred.
      	kubectl resize [...]
      
      	# Should print the same warning but no warning is printed.
      	kubectl --v=1 resize [...]
      
      This was due to a fragile check on os.Args[1].
      
      This commit implements a new function deprecatedCmd() that is used to
      construct new "passthrough" commands which are marked as deprecated and
      hidden.
      
      Note that there is an existing "filters" system that may be preferable
      to the system created in this commit. I'm not sure why the "filters"
      array was not used for all deprecated commands in the first place.
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      644a544d