Commit Graph

6475 Commits (284e8182a402cfd545fc000fedaea071fed873b0)

Author SHA1 Message Date
Yu-Ju Hong 4f9d4e1af6 Update bazel BUILD files
Also update the golint_failure file to reflect the new location.
2018-04-11 09:26:02 -07:00
Slava Semushin 34b15536fb hack/test-update-storage-objects.sh: don't build a binary that the script doesn't use.
The script used attachlease and migrate-if-needed.sh for performing
etcd2 -> etcd3 migration. In the commit 39e5a56691 we stopped migrating
data, but still built unused attachlease binary.

Later, in the dc4d92e154 commit, migrate-if-needed.sh was reimplemented
in go and unused attachlease was replaced by migrate that also wasn't
needed.
2018-04-11 16:56:01 +02:00
Kubernetes Submit Queue a8899b314b
Merge pull request #61241 from jpbetz/go-migrate-if-needed
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>.

Reimplement migrate-if-needed.sh in go

The `migrate-if-needed.sh` script was already partially implemented in go (see the attachlease and rollback sub-dirs), but was still unnecessarily difficult to understand and test.  This closely reimplements the original logic but with improved code structure, error handling and testing.

Where possible, go code that was previously executed as separate binaries is now statically linked into a single 'migrate' go cobra CLI app, which is then thinly wrapped by`migrate-if-needed.sh`.

There are numerous additional improvements that need to be made, but will be submitted in future PRs.  This PR is focused on achieving parity with the pre-existing functionality and introducing some much needed test coverage, in particular HA cluster upgrade test coverage.

It appears that the `attachlease` and `rollback` go binaries are no longer needed as standalones and so I have consolidated them into the new `migrate` go binary. Other than that, this change aims to be 100% backward compatible.

```release-note
NONE
```
2018-04-11 02:37:09 -07:00
Kubernetes Submit Queue c70dd5aa43
Merge pull request #61584 from AkihiroSuda/preserve-etcd
Automatic merge from submit-queue (batch tested with PRs 59027, 62333, 57661, 62086, 61584). 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>.

local-up-cluster.sh: support preserving etcd optionally

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>



**What this PR does / why we need it**:

Allow `hack/local-up-cluster.sh` to support preserve `ETCD_DIR` when `PRESERVE` is set to non-false value.

usage:
```
$ PRESERVE=true ETCD_DIR=/var/lib/etcd-kube-HEAD .... \
   ./hack/local-up-cluster.sh
```

**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**:
(None)

**Release note**:

```release-note
None
```
2018-04-10 22:53:26 -07:00
Kubernetes Submit Queue ffd4fb8701
Merge pull request #62086 from oomichi/make-warn-better
Automatic merge from submit-queue (batch tested with PRs 59027, 62333, 57661, 62086, 61584). 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 FAIL_SWAP_ON warning message clear

**What this PR does / why we need it**:

When operating local-up-cluster.sh to prepare e2e tests, the warning
message can be output. This commit makes the message clear.

**Release note**: NONE
2018-04-10 22:53:23 -07:00
Tim Hockin 59ef5e2379 Generate bindata through make 2018-04-10 20:55:03 -07:00
Tim Hockin 57d60ece72 Don't support `go build` any more.
Given run-in-gopath.sh, I can't see why we need it.  It is slower and
produces no better results.
2018-04-10 20:38:08 -07:00
Tim Hockin 46146f6f3d Remove 'teststale'
As of go 1.10, go's own build cache will ensure we do not rebuild or
relink tests.
2018-04-10 20:38:08 -07:00
Tim Hockin 5433ebd629 Simplify static build, rely on go's cache
As of go 1.10, we do not need to explicitly build the stdlib for static
any more.  That happens automatically.  Timing tests show no discernible
difference between a `go install` with and without it.

Also use 'static' suffix instead of 'cgo'.
2018-04-10 20:38:08 -07:00
Tim Hockin c773e88941 Set GOCACHE (1.10) as a subdir of GOPATH 2018-04-10 20:38:08 -07:00
Joe Betz dc4d92e154 Reimplement migrate-if-needed.sh in go 2018-04-10 09:19:30 -07:00
Akihiro Suda 9ac411709a local-up-cluster.sh: support preserving etcd optionally
usage: PRESERVE_ETCD=true ETCD_DIR=/var/lib/etcd-kube-HEAD .... \
         ./hack/local-up-cluster.sh

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-04-10 17:18:19 +09:00
juanvallejo 450aa52a12
add myself for sig-cli related stuff as reviewer 2018-04-09 10:26:11 -04:00
Kubernetes Submit Queue bb3887d7dd
Merge pull request #62210 from ixdy/verify-bazel-macos-tmpdir
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>.

Fully resolve tmpdir in verify-bazel.sh, since it might be a symlink on macOS

**What this PR does / why we need it**: Apparently the system tmpdir is inside a symlink on macOS, which confuses gazelle's symlink logic. By resolving this symlink to the absolute path, we can avoid the issue. 

**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 #61986

**Release note**:

```release-note
NONE
```

/assign @cblecker 
cc @patrikerdes
2018-04-07 22:27:10 -07:00
Kubernetes Submit Queue dfd6f581b5
Merge pull request #62196 from liggitt/create-dry-run
Automatic merge from submit-queue (batch tested with PRs 60900, 62215, 62196). 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 need for server connections for dry-run create

when running create commands in --dry-run mode, we don't need a server connection or restmapper information

```release-note
NONE
```
2018-04-06 21:30:12 -07:00
Jeff Grafton 3ed87e2ac2 Fully resolve tmpdir in verify scripts, since it might be a symlink on macOS 2018-04-06 16:37:19 -07:00
Kubernetes Submit Queue 489178d270
Merge pull request #59056 from mkumatag/pause_manifest
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 pause manifest image

**What this PR does / why we need it**:
As pause manifest code is merged part of https://github.com/kubernetes/kubernetes/pull/57723, now its time to remove all architecture-dependent pause imagename.
**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**:

```
NONE
```
2018-04-06 13:14:13 -07:00
Tim Hockin 89ceb7ef46 Pass 2: k8s GCR vanity URL 2018-04-06 08:14:58 -07:00
Jordan Liggitt 37903834de
Remove need for server connections for dry-run create 2018-04-06 10:33:32 -04:00
Manjunath A Kumatagi 1bb810e749 Use pause manifest image 2018-04-06 11:00:50 +05:30
Kubernetes Submit Queue 8438cbe669
Merge pull request #60483 from hzxuzhonghu/kube-apiserver-runoptions
Automatic merge from submit-queue (batch tested with PRs 58420, 60483). 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>.

Kube apiserver ServerRunOptions set default called before use

**What this PR does / why we need it**:

move `ServerRunOptions` set default function  `defaultOptions` out of `CreateKubeAPIServerConfig`, it should be called before real use `CreateNodeDialer`. So move it to cobra.Command just after kube-apiserver flags parsed.

Similarly `ServerRunOptions.Validate` move there too.

**Release note**:

```release-note
NONE
```
2018-04-04 05:03:08 -07:00
Kubernetes Submit Queue 22440e1576
Merge pull request #62037 from cblecker/godep-bump
Automatic merge from submit-queue (batch tested with PRs 61959, 62037). 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 godep version to v80

**What this PR does / why we need it**:
Update the minimum godep, to v80 (supposed to be the final version).

**Release note**:
```release-note
NONE
```
2018-04-04 02:45:08 -07:00
hzxuzhonghu 564d53f71b optimize requestcontext: use RWMutex and atomic.Value 2018-04-04 11:40:01 +08:00
hzxuzhonghu 8cce8bdc85 make kube-apiserver ServerRunOptions setdefault and Validate before use 2018-04-04 11:19:55 +08:00
Ken'ichi Ohmichi aa6e5c8d42 Make FAIL_SWAP_ON warning message clear
When operating local-up-cluster.sh to prepare e2e tests, the warning
message can be output. This commit makes the message clear.
2018-04-03 17:41:47 -07:00
Kubernetes Submit Queue 229d2df48a
Merge pull request #42873 from xilabao/add-apiresources-command
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>.

add kubectl api-resources command

**What this PR does / why we need it**:
As the RBAC role need to be related to resources. I think we can use the command to get the supported resources. 

```
# ./cluster/kubectl.sh api-resources   
NAME                                  SHORTNAMES   APIGROUP                       NAMESPACED   KIND
bindings                                                                          true         Binding
componentstatuses                     cs                                          false        ComponentStatus
configmaps                            cm                                          true         ConfigMap
endpoints                             ep                                          true         Endpoints
events                                ev                                          true         Event
limitranges                           limits                                      true         LimitRange
namespaces                            ns                                          false        Namespace
nodes                                 no                                          false        Node
persistentvolumeclaims                pvc                                         true         PersistentVolumeClaim
persistentvolumes                     pv                                          false        PersistentVolume
pods                                  po                                          true         Pod
podtemplates                                                                      true         PodTemplate
replicationcontrollers                rc                                          true         ReplicationController
resourcequotas                        quota                                       true         ResourceQuota
secrets                                                                           true         Secret
serviceaccounts                       sa                                          true         ServiceAccount
services                              svc                                         true         Service
externaladmissionhookconfigurations                admissionregistration.k8s.io   false        ExternalAdmissionHookConfiguration
initializerconfigurations                          admissionregistration.k8s.io   false        InitializerConfiguration
customresourcedefinitions             crd          apiextensions.k8s.io           false        CustomResourceDefinition
apiservices                                        apiregistration.k8s.io         false        APIService
controllerrevisions                                apps                           true         ControllerRevision
daemonsets                            ds           apps                           true         DaemonSet
deployments                           deploy       apps                           true         Deployment
replicasets                           rs           apps                           true         ReplicaSet
statefulsets                          sts          apps                           true         StatefulSet
tokenreviews                                       authentication.k8s.io          false        TokenReview
localsubjectaccessreviews                          authorization.k8s.io           true         LocalSubjectAccessReview
selfsubjectaccessreviews                           authorization.k8s.io           false        SelfSubjectAccessReview
subjectaccessreviews                               authorization.k8s.io           false        SubjectAccessReview
horizontalpodautoscalers              hpa          autoscaling                    true         HorizontalPodAutoscaler
jobs                                               batch                          true         Job
certificatesigningrequests            csr          certificates.k8s.io            false        CertificateSigningRequest
daemonsets                            ds           extensions                     true         DaemonSet
deployments                           deploy       extensions                     true         Deployment
ingresses                             ing          extensions                     true         Ingress
networkpolicies                       netpol       extensions                     true         NetworkPolicy
podsecuritypolicies                   psp          extensions                     false        PodSecurityPolicy
replicasets                           rs           extensions                     true         ReplicaSet
networkpolicies                       netpol       networking.k8s.io              true         NetworkPolicy
poddisruptionbudgets                  pdb          policy                         true         PodDisruptionBudget
clusterrolebindings                                rbac.authorization.k8s.io      false        ClusterRoleBinding
clusterroles                                       rbac.authorization.k8s.io      false        ClusterRole
rolebindings                                       rbac.authorization.k8s.io      true         RoleBinding
roles                                              rbac.authorization.k8s.io      true         Role
podpresets                                         settings.k8s.io                true         PodPreset
storageclasses                        sc           storage.k8s.io                 false        StorageClass
```
**Which issue this PR fixes**: fixes https://github.com/kubernetes/kubernetes/issues/42932

**Special notes for your reviewer**:

**Release note**:

```release-note
add kubectl api-resources command to discovery of resources
```
2018-04-03 14:35:09 -07:00
Rohit Agarwal 87dda3375b Delete in-tree support for NVIDIA GPUs.
This removes the alpha Accelerators feature gate which was deprecated in 1.10.
The alternative feature DevicePlugins went beta in 1.10.
2018-04-02 20:17:01 -07:00
Kubernetes Submit Queue 3ea4e449c3
Merge pull request #57600 from thockin/vendor-gazelle
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>.

Vendor gazelle and kazel

Rather that relying on upstream git repos that can break, vendor it all.  These are NOT head of tree, respectively - they are some backrev forms that were previously being used.

```release-note
NONE
```
2018-04-02 12:13:06 -07:00
Christoph Blecker ba71e6307a
Bump godep version to v80 2018-03-30 15:54:52 -07:00
Tim Hockin 4a5e554704 Don't change GOPATH or PATH in a script lib 2018-03-29 17:01:32 -07:00
Tim Hockin f72484df88 Remove kube::util::go_install_from_commit 2018-03-29 17:01:32 -07:00
Tim Hockin 74451de6df Vendor kazel 2018-03-29 17:01:32 -07:00
Tim Hockin 3e583de0ac Vendor gazelle 2018-03-29 17:01:30 -07:00
Kubernetes Submit Queue 399b835f54
Merge pull request #61432 from filbranden/killrkt1
Automatic merge from submit-queue (batch tested with PRs 61904, 61565, 61401, 61432, 61772). 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 rktnetes code

**What this PR does / why we need it**:
rktnetes is scheduled to be deprecated in 1.10 (#53601). According to the deprecation policy for beta CLI and flags, we can remove the feature in 1.11.

**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 #58721

**Special notes for your reviewer**:

**Release note**:

```release-note
Removed rknetes code, which was deprecated in 1.10.
```

/assign @yujuhong 
/hold

Hold until the end of the freeze.
2018-03-29 11:46:19 -07:00
Kubernetes Submit Queue ec37b26298
Merge pull request #61401 from dims/bump-max-time-local-up-cluster
Automatic merge from submit-queue (batch tested with PRs 61904, 61565, 61401, 61432, 61772). 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>.

Allow curl --max-time to be configurable

**What this PR does / why we need it**:

In nested virutalized environments, the 1 second max-time is too
low. Just bumping up WAIT_FOR_URL_API_SERVER does not work unless
we bump up the max-time too.

**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
```
2018-03-29 11:46:16 -07:00
Kubernetes Submit Queue 9c19c4e338
Merge pull request #61477 from soltysh/server_print_default
Automatic merge from submit-queue (batch tested with PRs 61842, 61477, 61777). 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>.

Turn server-print on by default in kubectl

**What this PR does / why we need it**:
#55637 introduced `-experimental-server-print` that enabled users to opt-in to user server-side printing. This is a followup which enables this functionality by default, with the ability to fallback not to do it with `--server-print=false`. 

/assign @smarterclayton @juanvallejo 

**Release note**:
```release-note
Enable server-side print in kubectl by default, with the ability to turn it off with --server-print=false
```
2018-03-28 15:57:09 -07:00
Kubernetes Submit Queue 831198edbc
Merge pull request #61808 from liggitt/dry-run-printing
Automatic merge from submit-queue (batch tested with PRs 61790, 61808, 60339, 61615, 61757). 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 -o yaml populates kind/apiVersion

Fixes #61780 

```release-note
kubectl: fixes issue with `-o yaml` and `-o json` omitting kind and apiVersion when used with `--dry-run`
```
2018-03-28 09:39:12 -07:00
Davanum Srinivas 1f4246957f Allow curl --max-time to be configurable
In nested virutalized environments, the 1 second max-time is too
low. Just bumping up WAIT_FOR_URL_API_SERVER does not work unless
we bump up the max-time too. Let us just make it configurable like
so folks can customize to their environment.
2018-03-28 10:21:15 -04:00
Jordan Liggitt a174d7a2de
Ensure -o yaml populates kind/apiVersion 2018-03-27 23:27:40 -04:00
Kubernetes Submit Queue 2b03013307
Merge pull request #61692 from CaoShuFeng/output-version
Automatic merge from submit-queue (batch tested with PRs 61452, 61727, 61462, 61692, 61738). 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 output-version

ref: https://github.com/kubernetes/kubernetes/pull/41576

**Release note**:
```release-note
NONE
```
2018-03-27 09:47:18 -07:00
Filipe Brandenburger 366ad30ab6 Remove references to rkt from shell scripts in cluster/ and hack/. 2018-03-27 09:29:35 -07:00
Filipe Brandenburger 8df9274e02 Remove rktnetes code
rktnetes is scheduled to be deprecated in 1.10 (#53601). According to
the deprecation policy for beta CLI and flags, we can remove the feature
in 1.11.

Fixes #58721
2018-03-27 09:29:35 -07:00
Kubernetes Submit Queue 82d6e2c3e1
Merge pull request #61688 from CaoShuFeng/remove-a
Automatic merge from submit-queue (batch tested with PRs 60499, 61715, 61688, 61300, 58787). 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 -a from cmd test

ref: https://github.com/kubernetes/kubernetes/pull/60210
ref: https://github.com/kubernetes/kubernetes/pull/60793



**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
```
2018-03-27 04:08:09 -07:00
Kubernetes Submit Queue 71050b6f2d
Merge pull request #60519 from bsalamat/auto_prio_class
Automatic merge from submit-queue (batch tested with PRs 60519, 61099, 61218, 61166, 61714). 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>.

Automatically add system critical priority classes at cluster boostrapping

**What this PR does / why we need it**:
We had two PriorityClasses that were hardcoded and special cased in our code base. These two priority classes never existed in API server. Priority admission controller had code to resolve these two names. This PR removes the hardcoded PriorityClasses and adds code to create these PriorityClasses automatically when API server starts.

**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 #60178

ref/ #57471

**Special notes for your reviewer**:

**Release note**:

```release-note
Automatically add system critical priority classes at cluster boostrapping.
```

/sig scheduling
2018-03-26 23:20:05 -07:00
Kubernetes Submit Queue 9b14be19ad
Merge pull request #61575 from ixdy/godep-remove-upstream-vendored-BUILD-files
Automatic merge from submit-queue (batch tested with PRs 61546, 61038, 61575, 60779, 61496). 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>.

prune Bazel build files from imported go deps and update to gazelle 0.10.1

**What this PR does / why we need it**: updates the `hack/godep-save.sh` script to prune any imported `BUILD`, `BUILD.bazel`, or `WORKSPACE` files.

We assume anything imported through godep doesn't need Bazel, but a Bazel-enabled Go project may include `BUILD` files with missing dependencies not imported by godep. To prevent this from breaking the Bazel build, remove these. (Gazelle will then regenerate the `BUILD` files based on the go build metadata.)
 
Additionally, there seems to be a bug in gazelle where it follows the `vendor/k8s.io` staging symlinks only when run through `hack/run-in-gopath.sh`. Updating to gazelle 0.10.1 fixes this bug.

A similar PR was recently merged in kubernetes/test-infra: https://github.com/kubernetes/test-infra/pull/7366

**Release note**:

```release-note
NONE
```

/assign @thockin 
cc @jayconrod
2018-03-26 18:56:06 -07:00
Maciej Szulik 94d8b93239
Turn server-print on by default in kubectl 2018-03-26 12:30:12 +02:00
Cao Shufeng 51224740f5 clean up output-version 2018-03-26 15:40:40 +08:00
Cao Shufeng 2273d08f4b remove deprecated -a
ref: https://github.com/kubernetes/kubernetes/pull/60210
ref: https://github.com/kubernetes/kubernetes/pull/60793
2018-03-26 14:40:28 +08:00
Jeff Grafton 009134a304 Update to gazelle 0.10.1 2018-03-23 16:16:52 -07:00
Jeff Grafton 7015f191ef Remove all upstream BUILD, BUILD.bazel, and WORKSPACE files from vendor/ 2018-03-23 15:36:58 -07:00
Ismo Puustinen 261a33dfa7 update-godep-licenses.sh: various fixes and cleanups.
The file was analyzed with shellcheck, and various issues fixed. Most of
the problems were just cleanups, but also potential bugs were fixed.

Many variables were quoted with double quotes to prevent globbing. The
local_files array expansion was quoted so that any file names with
potential spaces in the filename would not be re-split. The empty
default value was removed from the list processing. POSIX standard "grep
-E" was used instead of egrep.
2018-03-23 15:38:20 +02:00
Ismo Puustinen 07d6283521 verify-cli-conventions.sh: use $(..) instead of `..`.
Using $(..) is the recommended way of running subshells. It also is the
convention used almost every place in kubernetes scripts.
2018-03-23 15:37:03 +02:00
Ismo Puustinen 03b674bc86 verify-godeps: change redirection order.
In code "popd 2>&1 > /dev/null" the stderr output goes to the terminal
instead of /dev/null, which is clearly the intention. Change the order
to fix this in four places. Also, while at it, change one incorrect
comparison to use "-gt" instead of ">" in the same file.
2018-03-23 15:37:03 +02:00
Kubernetes Submit Queue 9f71d7f8af
Merge pull request #61393 from totherme/fix-test-cmd-on-osx
Automatic merge from submit-queue (batch tested with PRs 61453, 61393, 61379, 61373, 61494). 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 `test-cmd` work with OS-X tooling

OS-X thips with the BSD versions of `date` and `grep`. Those don't have
certain features the script relies on:
- BSD date does not support nanoseconds (`%N`)
- BSD grep does not support perl RegEx (`-P`)

As we use `bash` specifically in the hashbang anyway it is probably fine
to rely on the `$RANDOM` bashism here.

**What this PR does / why we need it**:

Currently `make test-cmd` doesn't work on OSX. This PR makes `make test-cmd` work on OSX.

**Release note**:
```release-note
`make test-cmd` now works on OSX.
```

cc: @apelisse
2018-03-22 06:20:19 -07:00
Kubernetes Submit Queue 46c5bb9dcb
Merge pull request #61321 from yland/add_copying
Automatic merge from submit-queue (batch tested with PRs 61396, 61321, 61443, 60911, 61461). 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 COPYING file name as valid license file

**What this PR does / why we need it**:
Some valuable libraries such as https://github.com/google/shlex which could be integrated into Kubernetes use COPYING for their License file name. This would be helpful in getting pull requests such as https://github.com/kubernetes/kubernetes/pull/59700 merged.

**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
```
2018-03-22 03:37:13 -07:00
Kubernetes Submit Queue d2cfe8c516
Merge pull request #60811 from dims/configure-shared-mount-to-avoid-conformance-test-failure
Automatic merge from submit-queue (batch tested with PRs 60980, 61273, 60811, 61021, 61367). 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>.

prevent conformance test failure in DIND scenario

**What this PR does / why we need it**:

in the "ci-kubernetes-local-e2e" job, we are running local-up-cluster.sh
using DIND. We see failure for "HostPath should give a volume the
correct mode [Conformance]" test. The failure looks as follows:

linux mounts: path /tmp is mounted on / but it is not a shared or slave
mount


**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**:
https://github.com/kubernetes/kubernetes/issues/61058#issuecomment-372764783

**Release note**:

```release-note
NONE
```
2018-03-22 02:08:19 -07:00
Kubernetes Submit Queue 6ccae3060c
Merge pull request #61098 from ipuustin/shell-bugfix6
Automatic merge from submit-queue (batch tested with PRs 60373, 61098, 61352, 61359, 61362). 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 mktemp instead of static temporary file path in scripts.

**What this PR does / why we need it**:

Using static file names in `/tmp` is considered to be a security anti-pattern, even if the modern Linux distributions make it difficult for the attacker to use symbolic link attacks against the `/tmp` directory. We should consider changing to the pattern of safely creating a temporary directory which only the user can access and placing the temporary files there. This assumes that `mktemp` command is installed -- it should be a safe assumption since the command is already widely used in the kubernetes scripts.

**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
```
2018-03-21 22:39:12 -07:00
Kubernetes Submit Queue 114d481183
Merge pull request #60793 from charrywanganthony/inert_flag_showall
Automatic merge from submit-queue (batch tested with PRs 60793, 61181, 61267, 61252, 61334). 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>.

--show-all is inert in v1.11

**What this PR does / why we need it**:

`--show-all` is inert in v1.11
ref: #60210

**Special notes for your reviewer**:
/assign @deads2k 

**Release note**:

```release-note
`--show-all` (which only affected pods and only for human readable/non-API printers) is inert in v1.11, and will be removed in a future release.
```
2018-03-21 20:23:07 -07:00
Kubernetes Submit Queue e40ffd7197
Merge pull request #59172 from fisherxu/removeyear
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 YEAR field of all generated files and fix kubernetes boilerplate checker

**What this PR does / why we need it**:
Remove YEAR field of all generated files and fix kubernetes boilerplate checker
xref: [remove YEAR fileds in gengo #91](https://github.com/kubernetes/gengo/pull/91)

**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 [#gengo/issues/24](https://github.com/kubernetes/gengo/issues/24)

**Special notes for your reviewer**:
/cc @thockin @lavalamp @sttts 

**Release note**:

```release-note
NONE
```
2018-03-21 12:44:37 -07:00
Kubernetes Submit Queue 0e3b344518
Merge pull request #61258 from hzxuzhonghu/cleanup-local-up-outdated
Automatic merge from submit-queue (batch tested with PRs 61124, 59537, 61235, 61258, 61114). 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 outdated waiting apiserver comments in local-up-cluster.sh

**What this PR does / why we need it**:

Now secure port is used, remove outdated waiting for apiserver healthy comments in local-up-cluster.sh.


**Release note**:

```release-note
NONE
```
2018-03-21 08:39:27 -07:00
Kubernetes Submit Queue 3b04de4be3
Merge pull request #60826 from WanLinghao/job_dry_run
Automatic merge from submit-queue (batch tested with PRs 61087, 61075, 61213, 61149, 60826). 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 support for --dry-run to kubectl create job

**What this PR does / why we need it**:
Create job subcommand lacks dry-run flag, this patch fix 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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-21 06:41:38 -07:00
Gareth Smith fa96484d35 Use consistent bash variable syntax
Use "${VAR}" everywhere, instead of also using "$VAR" in some places.
2018-03-21 09:30:57 +00:00
Kubernetes Submit Queue de8400c09e
Merge pull request #61094 from nikhita/remove-hack-test-cmd
Automatic merge from submit-queue (batch tested with PRs 57871, 61094, 60459, 61089, 61105). 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 hack/test-cmd.sh: make is the main build tool

The script suggests to use `make test-cmd` and we don't use this script anywhere.

**Release note**:

```release-note
NONE
```

/kind cleanup
/assign sttts cblecker
2018-03-20 23:34:33 -07:00
Kubernetes Submit Queue dbea6f6372
Merge pull request #61085 from hzxuzhonghu/unversioned-cleanup
Automatic merge from submit-queue (batch tested with PRs 60919, 60953, 61085, 61083, 60971). 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 `pkg/api/unversioned`

**What this PR does / why we need it**:

clean code, see #61084 

**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 #61084

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-20 20:34:31 -07:00
WanLinghao a3424872bd this patch do tow things:
1.add dry-run flag for create job subcommand
	2.add cmd-util test for create job subcommand
	modified:   pkg/kubectl/cmd/create_job.go
	modified:   hack/make-rules/test-cmd-util.sh
2018-03-21 10:41:17 +08:00
Chao Wang 71a1970bf6 --show-all is inert in v1.11 2018-03-21 09:13:21 +08:00
Kubernetes Submit Queue 5aa40c6055
Merge pull request #60876 from CaoShuFeng/lookup_pull
Automatic merge from submit-queue (batch tested with PRs 60696, 60876, 60901, 60925, 60428). 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 hack/lookup_pull.py

This script is not used anywhere.



**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
```
2018-03-20 13:36:14 -07:00
Kubernetes Submit Queue df0518d07c
Merge pull request #61281 from soltysh/sig-cli-approvers
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>.

Add myself for sig-cli related stuff as approver

This is adding me as an approver for sig-cli related things.

/assign @pwittrock 

**Release note**:
```release-note
None
```
2018-03-20 12:34:39 -07:00
yland c2a29c2a73 Add COPYING file name as valid license file 2018-03-20 19:37:35 +01:00
Kubernetes Submit Queue 17839216d8
Merge pull request #60895 from BenTheElder/translate-verbose-kubetest
Automatic merge from submit-queue (batch tested with PRs 60710, 60855, 60873, 60895, 60862). 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>.

translate hack/e2e.go -v to --verbose-commands

**What this PR does / why we need it**: translates the old `go run hack/e2e.go` `-v` flag to `--verbose-commands` for kubetest. kubetest now imports client-go, which imports `glog`, which registers an incompatible `-v level` flag so kubetest now uses `--verbose-commands` instead.

This should fix existing workflows.

**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**: See also: https://github.com/kubernetes/community/pull/1901

**Release note**:

```release-note
NONE
```
2018-03-20 10:34:44 -07:00
Kubernetes Submit Queue e6ba628b07
Merge pull request #60855 from cheftako/local-up
Automatic merge from submit-queue (batch tested with PRs 60710, 60855, 60873, 60895, 60862). 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 local cluster leaking memory.

**What this PR does / why we need it**:
Local cluster is leaking memory due to mutation detector being enabled.
In addition there is no warning in the logs that this could be the
issue.
Added a log warning when this feature is enabled to make debugging this
issue easier for other cases of 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 #60854 

**Special notes for your reviewer**:

**Release note**:
```release-note
None
```
2018-03-20 10:34:37 -07:00
Kubernetes Submit Queue ca56628912
Merge pull request #60710 from NickrenREN/admission-pv-dir-change
Automatic merge from submit-queue (batch tested with PRs 60710, 60855, 60873, 60895, 60862). 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>.

Move `persistentvolume` into `storage` package under `plugin/pkg/admission` 

Sorry for omitting this in the previous PR #60367

**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)*:
Following #60367

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```

/assign @jsafrane @thockin
2018-03-20 10:34:33 -07:00
Kubernetes Submit Queue 69401b0852
Merge pull request #60877 from CaoShuFeng/import_pyton
Automatic merge from submit-queue (batch tested with PRs 60574, 60666, 60831, 60877, 60357). 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 some not used imports from python codes

remove some not used imports from python codes
/assign @sttts 

**Release note**:

```release-note
NONE
```
2018-03-20 08:34:43 -07:00
Hannes Hörl 1bb3537c98 Make `test-cmd` work with OS-X tooling
OS-X thips with the BSD versions of `date` and `grep`. Those don't have
certain features the script relies on:
- BSD date does not support nanoseconds (`%N`)
- BSD grep does not support perl RegEx (`-P`)

As we use `bash` specifically in the hashbang anyway it is probably fine
to rely on the `$RANDOM` bashism here.
2018-03-20 10:07:40 +00:00
Davanum Srinivas 8fe04adab2 prevent conformance test failure in DIND scenario
in the "ci-kubernetes-local-e2e" job, we are running local-up-cluster.sh
using DIND. We see failure for "HostPath should give a volume the
correct mode [Conformance]" test. The failure looks as follows:

linux mounts: path /tmp is mounted on / but it is not a shared or slave
mount
2018-03-19 20:25:36 -04:00
Maciej Szulik 370733886a
Add myself for sig-cli related stuff as approver 2018-03-16 16:22:46 +01:00
Ismo Puustinen 14ccb8cf52 update-translations.sh: use kube::util::ensure-temp-dir instead of static path.
Use a temporary directory to hold the generated temporary file. This
helps prevent a class of potential security issues on various platforms.
2018-03-16 10:11:48 +02:00
Ismo Puustinen abc6fe6dbb build-ui.sh: use kube::util::ensure-temp-dir instead of static path.
Using static paths for temporary files has been a security problem in
the past. Use kube::util::ensure-temp-dir to create a safe temporary
directory and place the temporary file there.
2018-03-16 10:11:48 +02:00
hzxuzhonghu eb71817f7b remove outdated comments 2018-03-16 11:24:20 +08:00
Kubernetes Submit Queue b651ed5ea7
Merge pull request #60998 from jpbetz/etcd-3.1.12
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>.

Bump to etcd 3.1.12 to pick up critical fix

etcd [3.1.12](https://github.com/coreos/etcd/releases/tag/v3.1.12) (as well as 3.2.17 and 3.3.2) was released yesterday to fix a bug critical to kubernetes:

Fix [mvcc "unsynced" watcher restore operation](https://github.com/coreos/etcd/pull/9297).
- "unsynced" watcher is watcher that needs to be in sync with events that have happened.
- That is, "unsynced" watcher is the slow watcher that was requested on old revision.
- "unsynced" watcher restore operation was not correctly populating its underlying watcher group.
- Which possibly causes [missing events from "unsynced" watchers](https://github.com/coreos/etcd/issues/9086).

This will be backported to 1.9 as well.

Release note:
```release-note
Upgrade the default etcd server version to 3.1.12 to pick up critical etcd "mvcc "unsynced" watcher restore operation" fix.
```

cc @gyuho @wojtek-t @shyamjvs @timothysc @jdumars
2018-03-13 09:11:10 -07:00
Nikhita Raghunath b1d29e0d98 remove hack/test-cmd.sh: make is the main build tool
The script suggests to use `make test-cmd` anyway and
we don't use this script anywhere.
2018-03-13 14:55:00 +05:30
hzxuzhonghu f12647e16d pkg/api/unversioned related cleanup 2018-03-13 17:20:16 +08:00
Jeff Grafton 7713453356 Exclude commas when pulling the tag out of the git export-subst format string 2018-03-12 15:20:22 -07:00
Kubernetes Submit Queue f7d9fb474b
Merge pull request #60866 from fisherxu/autodate
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>.

Auto check the current year in boilerplate

**What this PR does / why we need it**:
Every new year we need to add the current year to boilerplate.py manually like #[Update boilerplate for 2018](bec420875e (diff-0f66228ea46785f57b8df9ca08b23f49)), #[Update boilerplate.py to support 2017](98534200bc (diff-0f66228ea46785f57b8df9ca08b23f49)), it should be auto checked.

**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 # [Update boilerplate for 2018](bec420875e (diff-0f66228ea46785f57b8df9ca08b23f49)) , #[Update boilerplate.py to support 2017](98534200bc (diff-0f66228ea46785f57b8df9ca08b23f49))

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-10 06:40:44 -08:00
Joe Betz e2a25f9b54 Bump to etcd 3.1.12 to pick up critical fix 2018-03-09 14:28:23 -08:00
xilabao 110641b34c add kubectl api-resources command 2018-03-09 17:47:17 +08:00
Shyam Jeedigunta 21f5e69f08 Rollback etcd server version to 3.1.11 due to #60589 2018-03-08 13:07:15 +01:00
fisherxu 93b9b82cae fix boilerplate checker of kubernetes/kubernetes
update bazel and remove passing golint packages
2018-03-08 17:52:49 +08:00
fisherxu 32319d6ef7 add boilerplate.generatego.txt and let all code-generators use it
remove YEAR field in boilerplate under staging

add Do Not Edit for types_swagger_doc and add apiextensions-apiserver's example in codegen.sh
2018-03-08 17:52:44 +08:00
fisherxu 334c2fdcf6 auto check the current year 2018-03-08 09:14:31 +08:00
Benjamin Elder 9674792897 translate hack/e2e.go -v to --verbose-commands 2018-03-07 11:27:56 -08:00
Cao Shufeng f6e5577427 remove some not used imports from python codes 2018-03-07 17:43:47 +08:00
Cao Shufeng dc530d1887 remove unused hack/lookup_pull.py
This script is not used anywhere.
2018-03-07 17:23:48 +08:00
Walter Fender 07ba609b50 Fix local cluster leaking memory.
Local cluster is leaking memory due to mutation detector being enabled.
In addition there is no warning in the logs that this could be the
issue.
Added a log warning when this feature is enabled to make debugging this
issue easier for other cases of this.
Fixed import ordering as per @liggitt
2018-03-06 13:44:11 -08:00
Bobby (Babak) Salamat 9592a9ecf4 Allow system critical priority classes in API validation 2018-03-06 10:06:58 -08:00
Joe Betz 04c6d0ab26 Bump etcd server patch version to 3.2.16 2018-03-05 13:58:51 -08:00
NickrenREN fc78e5ce9e fix references and golint failures 2018-03-03 13:12:03 +08:00
Jeff Grafton 0c1f69a213 Update gazelle to latest to fix vendoring issue 2018-03-02 11:58:31 -08:00
Kubernetes Submit Queue f9f5677b3e
Merge pull request #60618 from rmmh/verify-explicit
Automatic merge from submit-queue (batch tested with PRs 60530, 60618). 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 support for `make verify WHAT=typecheck`

This will be used to make the typecheck job emit junit and avoids duplicating the rest of the verify logic.

**Release note**:
```release-note
NONE
```
2018-03-01 18:49:44 -08:00
Ryan Hitchman d295ca1134 Add support for `make verify WHAT=typecheck`.
This will be used to make the typecheck job emit junit and avoids
duplicating the rest of the verify logic.
2018-03-01 15:03:24 -08:00