1. 29 Jan, 2018 17 commits
    • Kubernetes Submit Queue's avatar
      Merge pull request #58863 from hzxuzhonghu/runtime-config-resource-remove · 5ab8f8ce
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 56995, 58498, 57426, 58902, 58863). 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>.
      
      cleanup enable/disable api resources code
      
      **What this PR does / why we need it**:
      
      After #57228, `runtime-config` flag has stop support enable/disable resources of a specific groupVersion,
      so this pr does some clean work about this.
      
      Mainly delete unused code in  `k8s.io/apiserver/pkg/server/storage/resource_config.go`
      
      **Special notes for your reviewer**:
      /assign @deads2k  @sttts 
      **Release note**:
      
      ```release-note
      NONE
      ```
      /kind cleanup
      5ab8f8ce
    • Kubernetes Submit Queue's avatar
      Merge pull request #58902 from yujuhong/rm-rktshim · a58ca142
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 56995, 58498, 57426, 58902, 58863). 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>.
      
      kubelet: remove the rktshim directory
      
      This package contains only placeholders without actual implementation.
      Since it is not currently under active development, remove it to avoid
      unnecessary change needed whenever the interface is changed.
      a58ca142
    • Kubernetes Submit Queue's avatar
      Merge pull request #57426 from mikedanese/reorder · bf05348e
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 56995, 58498, 57426, 58902, 58863). 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>.
      
      gce: reorder authorizers
      
      to the order Node,Webhook,RBAC,ABAC
      
      ```release-note
      NONE
      ```
      bf05348e
    • Kubernetes Submit Queue's avatar
      Merge pull request #58498 from feiskyer/win-ver · 30c14dd8
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 56995, 58498, 57426, 58902, 58863). 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>.
      
      Get windows kernel version directly from registry
      
      **What this PR does / why we need it**:
      
      kubernetes/kubernetes#55143 gets windows kernel version by calling windows.GetVersion(), but it doesn't work on windows 10. From https://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx, GetVersion requires app to be manifested.
      
      Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2). I tried a toy go program using GetVersion on Windows 10 and it returns 0x23f00206.
      
      Given the limited win32 functions in golang, we should read from registry directly.
      
      **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 #58497
      
      **Special notes for your reviewer**:
      
      Should also cherry-pick to v1.9.
      
      **Release note**:
      
      ```release-note
      Get windows kernel version directly from registry
      ```
      
      /cc @JiangtianLi @taylorb-microsoft
      30c14dd8
    • Kubernetes Submit Queue's avatar
      Merge pull request #56995 from mtaufen/kc-flags-precedence-redo · cf92d921
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 56995, 58498, 57426, 58902, 58863). 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>.
      
      flag precedence redo
      
      Changes the Kubelet configuration flag precedence order so that flags take precedence over config from files/ConfigMaps.
      
      This should fix the re-parse issue with #56097 that led to revert.
      
      Fixes #56171.
      
      In order to prevent global flags (registered in 3rd party libs, etc.) from leaking into the command's help text, this PR turns off Cobra's flag parsing in the `kubelet` command and re-implements help and usage funcs for the Kubelet. Cobra's default funcs automatically merge all global flags into the command's flagset, which results in incorrect help text. I tried to keep the formatting as close as possible to the what the Kubelet currently produces. 
      
      Diff between Kubelet's help text on `upstream/master` vs `mtaufen/kc-flags-precedence-redo`, which shows a leaked flag being removed, but no change to the formatting:
      ```
      diff --git a/upstream.master.help b/mtaufen.kc-flags-precedence-redo.help
      index 798a030..0797869 100644
      --- a/upstream.master.help
      +++ b/mtaufen.kc-flags-precedence-redo.help
      @@ -30,7 +30,6 @@ Flags:
             --authorization-mode string                                                                                 Authorization mode for Kubelet server. Valid options are AlwaysAllow or Webhook. Webhook mode uses the SubjectAccessReview API to determine authorization. (default "AlwaysAllow")
             --authorization-webhook-cache-authorized-ttl duration                                                       The duration to cache 'authorized' responses from the webhook authorizer. (default 5m0s)
             --authorization-webhook-cache-unauthorized-ttl duration                                                     The duration to cache 'unauthorized' responses from the webhook authorizer. (default 30s)
      -      --azure-container-registry-config string                                                                    Path to the file containing Azure container registry configuration information.
             --bootstrap-checkpoint-path string                                                                          <Warning: Alpha feature> Path to to the directory where the checkpoints are stored
             --bootstrap-kubeconfig string                                                                               Path to a kubeconfig file that will be used to get client certificate for kubelet. If the file specified by --kubeconfig does not exist, the bootstrap kubeconfig is used to request a client certificate from the API server. On success, a kubeconfig file referencing the generated client certificate and key is written to the path specified by --kubeconfig. The client certificate and key file will be stored in the directory pointed by --cert-dir.
             --cadvisor-port int32                                                                                       The port of the localhost cAdvisor endpoint (set to 0 to disable) (default 4194)
      ```
      
      Ultimately, I think we should implement a common lib that K8s components can use to generate clean help text, as the global flag leakage problem affects all core k8s binaries. I would like to do so in a future PR, to keep this PR simple. We could base the help text format on the default values returned from `Command.HelpTemplate` and `Command.UsageTemplate`. Unfortunately, the template funcs used to process these defaults are private to Cobra, so we'd have to re-implement these, or avoid using them.
      
      ```release-note
      NONE
      ```
      cf92d921
    • Kubernetes Submit Queue's avatar
      Merge pull request #58860 from Pingan2017/seccomp · f1151bab
      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>.
      
      clean up unused const
      
      **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
      ```
      f1151bab
    • Michael Taufen's avatar
      Kubelet flags take precedence · 42589266
      Michael Taufen authored
      This changes the Kubelet configuration flag precedence order so that
      flags take precedence over config from files/ConfigMaps.
      
      See #56171 for rationale.
      
      Note: Feature gates accumulate with the following
      precedence (greater number overrides lesser number):
      1. file-based config
      2. dynamic cofig
      3. flag-based config
      42589266
    • Kubernetes Submit Queue's avatar
      Merge pull request #58970 from dims/fix-advertise-address-param-in-local-up-cluster · 03b3d599
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 58969, 58970). 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 parameter advertise_address should be --advertise-address
      
      **What this PR does / why we need it**:
      Not sure how we missed this, the correct param is `--advertise-address`
      
      **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
      ```
      03b3d599
    • Kubernetes Submit Queue's avatar
      Merge pull request #58969 from krzysztof-jastrzebski/master · 8a98da9b
      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 unused test for node auto-repair.
      
      This test is testing GKE only feature and should use different
      infrastructure.
      8a98da9b
    • Davanum Srinivas's avatar
    • Krzysztof Jastrzebski's avatar
      Remove unused test for node auto-repair. · 2c3bfc81
      Krzysztof Jastrzebski authored
      This test is testing GKE only feature and should use different
      infrastructure.
      2c3bfc81
    • Kubernetes Submit Queue's avatar
      Merge pull request #58862 from wackxu/vlm · 59bc6d0e
      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>.
      
      Mini fix about typo
      
      ```release-note
      NONE
      ```
      59bc6d0e
    • Kubernetes Submit Queue's avatar
      Merge pull request #58367 from zhangxiaoyu-zidif/do-issue-41161 · 6def29e0
      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 deprecated --require-kubeconfig flag, remove default --kubeconfig value
      
      **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 #41161
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      Remove deprecated --require-kubeconfig flag, remove default --kubeconfig value
      ```
      6def29e0
    • Kubernetes Submit Queue's avatar
      Merge pull request #58607 from soltysh/generated_diff · 480327ea
      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>.
      
      Hide generated files only on github
      
      **What this PR does / why we need it**:
      #54766 and #55114 introduced ability to hide generated files in diffs. It's nice and reasonable in github UI, but locally it's very frequent that author wants to verify the generated changes. This PR modifes `.gitattributes` so that the generated files are hidden only on github, leaving diff-able locally. 
      
      /assign @liggitt 
      @mikekap fyi, since you authored the original PRs
      
      **Release note**:
      ```release-note
      NONE
      ```
      480327ea
    • zhangxiaoyu-zidif's avatar
    • Kubernetes Submit Queue's avatar
      Merge pull request #58798 from feiskyer/cleanup · 0726f8c7
      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>.
      
      Clean up unused functions and consts
      
      **What this PR does / why we need it**:
      
      Clean up unused functions and consts.
      
      **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
      ```
      0726f8c7
    • Kubernetes Submit Queue's avatar
      Merge pull request #58924 from CaoShuFeng/webhook_readme · 7726877a
      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 webhook admission README
      
      There is no target `deploy-only` in the Makefile
      **Release note**:
      
      ```release-note
      NONE
      ```
      7726877a
  2. 28 Jan, 2018 2 commits
  3. 27 Jan, 2018 15 commits
  4. 26 Jan, 2018 6 commits
    • Kubernetes Submit Queue's avatar
      Merge pull request #58644 from yguo0905/webhooks · ac495f16
      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>.
      
      Use SSH tunnel for webhook communication iff the webhook is deployed as a service
      
      **What this PR does / why we need it**:
      
      We are getting the following error when the apiserver connects the webhook on localhost (configured via URL). We should only use the SSL tunnel for the connections to nodes when the webhooks are running as services.
      
      ```
      I0119 17:41:18.678436       1 ssh.go:400] [4cdf44753cc3705d: localhost:10258] Dialing...
      W0119 17:41:18.678483       1 ssh.go:424] SSH tunnel not found for address "localhost", picking random node
      I0119 17:41:18.679810       1 ssh.go:402] [4cdf44753cc3705d: localhost:10258] Dialed in 1.398691ms.
      W0119 17:41:18.679928       1 admission.go:256] Failed calling webhook, failing closed xxx: failed calling admission webhook "xxx": Post xxx: ssh: rejected: connect failed (Connection refused)
      I0119 17:41:18.680346       1 wrap.go:42] POST /api/v1/namespaces/kube-system/pods: (5.725588ms) 500
      ```
      
      **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 # https://github.com/kubernetes/kubernetes/issues/58779
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      kube-apiserver is changed to use SSH tunnels for webhook iff the webhook is not directly routable from apiserver's network environment.
      ```
      
      /assign @lavalamp @caesarxuchao @cheftako
      ac495f16
    • Rohit Agarwal's avatar
      Add e2e tests for GPU monitoring. · d191c57c
      Rohit Agarwal authored
      d191c57c
    • Christoph Blecker's avatar
      Add brackets and quotes where needed · 3bcc6e9e
      Christoph Blecker authored
      3bcc6e9e
    • Kubernetes Submit Queue's avatar
      Merge pull request #58861 from liggitt/prefer-resources-to-shortnames · 3009ec94
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 58760, 58861). 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>.
      
      Prefer exact resource name matches to shortname expansions
      
      Prevents a shortname of "pod" or "pods" from taking precedence over an exact resource name match
      
      ```release-note
      NONE
      ```
      3009ec94
    • Kubernetes Submit Queue's avatar
      Merge pull request #58760 from mtaufen/kc-remove-kubeletconfigfile-gate · 57922146
      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>.
      
      Removal of KubeletConfigFile feature gate: Step 1
      
      This feature gate was redundant with the `--config` flag, which already
      enables/disables loading Kubelet config from a file.
      
      Since the gate guarded an alpha feature, removing it is not a violation
      of our API guidelines.
      
      Some stuff in `kubernetes/test-infra` currently sets the gate,
      so removing will be a 3 step process:
      1. This PR, which makes the gate a no-op.
      2. Stop setting the gate in `kubernetes/test-infra`.
      3. Completely remove the gate (this PR will get the release note).
      
      ```release-note
      NONE
      ```
      57922146
    • Christoph Blecker's avatar
      Contain variable names in shell2unit · 670505e5
      Christoph Blecker authored
      Also correct unbound assertions variable error on line 176
      670505e5