Commit Graph

6126 Commits (25238441fdbf7383e45c05613ec15aab13a5bcb5)

Author SHA1 Message Date
Davanum Srinivas f2093f1da3 Enable --external-cloud-volume-plugin/--provider-id for local-up-cluster
See the following commit for more information about the
--external-cloud-volume-plugin flag:
070a7b5823

We need this flag for EXTERNAL_CLOUD_PROVIDER flag to work properly with
volume plugins

Also add --provider-id defaulting to hostname as we seem to pick
up the ip address otherwise causing problem with looking up the
node in the cloud provider
2018-01-17 22:10:54 -05:00
Kubernetes Submit Queue 658ca939fd
Merge pull request #57420 from rphillips/fixes/semver_metadata
Automatic merge from submit-queue (batch tested with PRs 58375, 58306, 58386, 57420, 58035). 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 semver metadata regex

**What this PR does / why we need it**: When building a release tag with optional semver metadata, the minor and major versions are not parsed correctly (empty strings). This fix adds optional support to the regex for the metadata component.

example:

```
~/w/g/s/k/kubernetes ❯❯❯ git tag v1.9.0+stable.0                                 fixes/semver_metadata ✭
~/w/g/s/k/kubernetes ❯❯❯ hack/print-workspace-status.sh                          fixes/semver_metadata ✭
STABLE_BUILD_GIT_COMMIT 63e2eacd22
STABLE_BUILD_SCM_STATUS clean
STABLE_BUILD_SCM_REVISION v1.9.0+stable.0
STABLE_BUILD_MAJOR_VERSION 1
STABLE_BUILD_MINOR_VERSION 9
STABLE_DOCKER_TAG v1.9.0_stable.0
gitCommit 63e2eacd22
gitTreeState clean
gitVersion v1.9.0+stable.0
gitMajor 1
gitMinor 9
buildDate 2017-12-19T21:08:48Z
```

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-01-17 13:08:35 -08:00
Kubernetes Submit Queue 7bbab6234f
Merge pull request #58303 from php-coder/fix_verify-swagger-spec_sript
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 update-swagger-spec.sh to always cleanup etcd

**What this PR does / why we need it**:
This PR fixes `hack/update-swagger-spec.sh` so it always cleanup etcd and to noe leave orphaned process after its execution. This process also doesn't allow to run the script again as it detects existing etcd and won't start.

I also made a minor improvement by adding guard against an empty arguments.

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

CC @simo5
2018-01-17 02:43:58 -08:00
Slava Semushin a2b728a706 hack/update-swagger-spec.sh(cleanup): fix signal handler to really cleanup etcd and minor improvements.
Prior this change, etcd wasn't cleaned up on my machine that lead to
orphaned etcd process after the update-swagger-spec.sh failed.

This change also adds additional improvements:
- don't kill/wait/rm when argument is empty.
- use kube::util::trap_add.
2018-01-17 09:58:57 +01:00
Kubernetes Submit Queue a490ac5cca
Merge pull request #58351 from php-coder/update_swagger_spec_show_log
Automatic merge from submit-queue (batch tested with PRs 58008, 58351). 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-swagger-spec.sh: when API server fails to start, show the last lines of logs

**What this PR does / why we need it**:
When API server fails to start there is no easy way to know why. You have to read the script where you will find that there is a log file that could have some useful info. This PR simplifies debugging:
1) it includes the path to the log file in the error message
2) it also shows the last 10 lines from this log

Before this change:
```
+++ [0116 19:33:49] Starting kube-apiserver
!!! [0116 19:34:19] Timed out waiting for apiserver:  to answer at 127.0.0.1:8050/healthz; tried 30 waiting 1 between each
!!! Error in ./hack/update-swagger-spec.sh:42
  Error in ./hack/update-swagger-spec.sh:42. 'return 1' exited with status 1
Call stack:
  1: ./hack/update-swagger-spec.sh:42 main(...)
Exiting with status 1
+++ [0116 19:34:19] Clean up complete
```

After this change:
```
+++ [0116 19:42:41] Starting kube-apiserver
!!! [0116 19:42:51] Timed out waiting for apiserver:  to answer at 127.0.0.1:8050/healthz; tried 30 waiting 1 between each
!!! [0116 19:42:51] Here are the last 10 lines from kube-apiserver (/tmp/swagger-api-server.log)
!!! [0116 19:42:51] === BEGIN OF LOG ===
I0116 19:42:41.689355   30809 server.go:122] Version: v1.10.0-alpha.1.877+a02cb7c1f7d0d6-dirty
I0116 19:42:41.942601   30809 serving.go:295] Generated self-signed cert (/tmp/update-swagger-spec.2Udp/certs/apiserver.crt, /tmp/update-swagger-spec.2Udp/certs/apiserver.key)
I0116 19:42:41.942611   30809 server.go:647] external host was not specified, using 10.10.10.10
W0116 19:42:41.942618   30809 authentication.go:378] AnonymousAuth is not allowed with the AllowAll authorizer.  Resetting AnonymousAuth to false. You should use a different authorizer
error in initializing storage factory: group version podsecuritypolicy.admission.k8s.io/v1beta1 that has not been registered
!!! [0116 19:42:51] === END OF LOG ===
+++ [0116 19:42:51] Clean up complete
```

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

PTAL @cblecker @sttts 
CC @simo5
2018-01-17 00:56:34 -08:00
Slava Semushin 380f1c49e1 hack/update-swagger-spec.sh: when API server fails to start, show the last lines of logs. 2018-01-16 19:49:01 +01:00
Kubernetes Submit Queue d3428a5736
Merge pull request #58301 from liggitt/all-category-single-group
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>.

Limit all category to apps group for ds/deployment/replicaset

There's lots of confusion around the resources we are moving out of the extensions api group appearing twice when using the `kubectl get all` category. Fortunately, we control that category serverside. For resources that appear in multiple API groups (deployments, daemonsets, replicasets), this updates the server to only include the `apps` resources in the `all` category, so they only appear once.

Fixes https://github.com/kubernetes/kubectl/issues/189
Fixes https://github.com/kubernetes/kubectl/issues/167
Fixes https://github.com/kubernetes/kubernetes/issues/55720
Fixes https://github.com/kubernetes/kubernetes/issues/57270
Fixes https://github.com/kubernetes/kubernetes/issues/57931

```release-note
NONE
```
2018-01-15 13:51:14 -08:00
Kubernetes Submit Queue c7e3e55cd3
Merge pull request #58225 from ixdy/gazelle-from-bazel-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>.

Install gazelle from bazelbuild/bazel-gazelle instead of rules_go

**What this PR does / why we need it**: downloads gazelle from its new home; it's being removed from `bazelbuild/rules_go`. It also removes @spiffxp's workaround from a few weeks ago.

**Special notes for your reviewer**: these should really be vendored (https://github.com/kubernetes/kubernetes/pull/57600), but this prevents us from running into issues in the meantime.

**Release note**:

```release-note
NONE
```

/approve no-issue
/assign @BenTheElder
2018-01-15 12:22:29 -08:00
Jordan Liggitt 0a1b76cb11
Limit all category to apps group for ds/deployment/replicaset 2018-01-15 14:41:42 -05:00
Kubernetes Submit Queue a990b04dc8
Merge pull request #58207 from strigazi/fix-cmp-ver
Automatic merge from submit-queue (batch tested with PRs 58207, 58258). 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 sort -V to compare golang versions

Change hack/lib/golang.sh to compare golang
version properly with "sort -s -t. -k 1,1 -k 2,2n -k 3,3n",
which sorts key by key and not as strings.



**What this PR does / why we need it**:
trivial fix: hack/lib/golang.sh compare versions like strings, 1.10 is greater than 1.9 as a version but not as a string. Use "sort -s -t. -k 1,1 -k 2,2n -k 3,3n" to compare properly. 

**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-01-15 10:35:28 -08:00
Kubernetes Submit Queue d047218fc5
Merge pull request #58160 from shyamjvs/script-for-benchmark-integration-tests
Automatic merge from submit-queue (batch tested with PRs 56408, 58224, 58160). 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 script to run integration benchmark tests in dockerized env

Ref https://github.com/kubernetes/kubernetes/issues/58154

/cc @kubernetes/sig-testing-pr-reviews @krzyzacy 
fyi @porridge 

```release-note
NONE
```
2018-01-15 09:21:30 -08:00
Spyros Trigazis fc37221db5 Fix comparison of golang versions
Change hack/lib/golang.sh to compare golang
version properly with "sort -s -t. -k 1,1 -k 2,2n -k 3,3n",
which sorts key by key and not as strings.
2018-01-15 17:26:34 +01:00
Shyam Jeedigunta 1bdc99d2ec Add script to run integration benchmark tests in dockerized env 2018-01-15 14:04:19 +01:00
Mike Danese 1e2b644260 cluster: move logging library to hack/
it's used once in cluster and used a bunch in hack/ and build/
2018-01-13 16:37:50 -08:00
Jeff Grafton 0d5eb00a39 Revert "Rewrite go_install_from_commit to handle pkgs that aren't in HEAD"
This reverts commit e55938940d.
2018-01-12 12:27:49 -08:00
Jeff Grafton c1554d08d8 Install gazelle from bazelbuild/bazel-gazelle instead of rules_go 2018-01-12 12:27:34 -08:00
Slava Semushin 296ae178d9 hack/generate-bindata.sh: make output cleanly by suppressing pushd/popd output. 2018-01-12 16:31:10 +01:00
Kubernetes Submit Queue 4bc286f025
Merge pull request #57571 from spiffxp/mk-staging-repos-authoritative
Automatic merge from submit-queue (batch tested with PRs 58025, 57112, 57879, 57571, 58062). 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>.

Treat staging repos as authoritative source for all files

Add CONTRIBUTING.md files to remind people not to PR directly into the published repos.

/hold
I believe this requires removing these files from the published repos if any copies exist there

ref: kubernetes/kubernetes#57559
2018-01-10 11:46:49 -08:00
Kubernetes Submit Queue b873fc4453
Merge pull request #57879 from bowei/gce-gen
Automatic merge from submit-queue (batch tested with PRs 58025, 57112, 57879, 57571, 58062). 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>.

Code generation for GCE compute interface

Use code generation to "write" most of the GCE cloud provider library. This enables the following:

- Consistent interfaces, including handling of the different API versions (GA, alpha, beta)
- Efficient implementation of cross cutting features such as metrics, logging, tracing etc. Adding such features has in the past been a tedious and error prone endeavor. 
- High fidelity mocks for all of the compute API. What this means is that most of our controller logic can be tested as unit tests in a consistent way without creating individual mocks by hand.

```release-note
NONE
```
2018-01-10 11:46:46 -08:00
Scott Creeley 8b5f293b3d fix for local-up-cluster.sh bad cloud_config_arg 2018-01-10 10:21:44 -05:00
Bowei Du 3cde2613ff Fix lint and bazel 2018-01-09 23:09:08 -08:00
Bowei Du e609cda0d2 hack/ scripts to keep the generated code in sync 2018-01-09 17:07:10 -08:00
Bowei Du adaaed1028 Ignore golint failures for bad compute API names 2018-01-09 16:40:15 -08:00
Aaron Crickenberger d9b5773101 Treat staging repos as authoritative for all files
Move files from kubernetes/foo root back to
kubernetes/kubernetes/staging/src/k8s.io/foo root

Then:
- add CONTRIBUTING.md for all staging repos
- add .PULL_REQUEST_TEMPLATE to all staging repos
- ignore .github while diffing generated protobuf
2018-01-09 15:18:27 -08:00
Lantao Liu f64c508e2e Add getCRIClient and set default values for CRI related flags 2018-01-09 22:59:17 +00:00
Kubernetes Submit Queue 32c026c1f8
Merge pull request #57757 from dims/support-cloud-controller-manager-in-local-up-cluster
Automatic merge from submit-queue (batch tested with PRs 55910, 57757). 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 cloud-controller-manager in local-up-cluster.sh

**What this PR does / why we need it**:
We need an easy way to test the new external cloud provider. So
let's keep the existing CLOUD_PROVIDER and CLOUD_CONFIG as-is and
add a flag EXTERNAL_CLOUD_PROVIDER to run a separate process.

Since we use hyperkube to run controller-manager, let's add support
for cloud-controller-manager as well to support this use case.

**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**:

```dev-release-note
Ability to run the cloud-controller-manager from local-up-cluster for easy testing
```
2018-01-09 01:33:44 -08:00
Davanum Srinivas 77c71170eb Add support for cloud-controller-manager in local-up-cluster.sh
We need an easy way to test the new external cloud provider. So
let's keep the existing CLOUD_PROVIDER and CLOUD_CONFIG as-is and
add a flag EXTERNAL_CLOUD_PROVIDER to run a separate process.
2018-01-08 07:04:29 -05:00
Kubernetes Submit Queue 7b4c9f99b9
Merge pull request #57521 from misterikkit/integrationTimeout
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>.

Allow integration test timeout override.

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

This allows the test timeout to be overridden at the command line for
integration tests. The default behavior is unchanged.

e.g.
```
make test-integration WHAT="./test/integration/scheduler" KUBE_TEST_ARGS="-run=. -count=10" KUBE_TIMEOUT="-timeout=1h"
```



**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-01-07 11:02:24 -08:00
Jonathan Basseri 30b89d830b Move scheduler code out of plugin directory.
This moves plugin/pkg/scheduler to pkg/scheduler and
plugin/cmd/kube-scheduler to cmd/kube-scheduler.

Bulk of the work was done with gomvpkg, except for kube-scheduler main
package.
2018-01-05 15:05:01 -08:00
Kubernetes Submit Queue afbbd394c1
Merge pull request #57517 from verb/paws-bump
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 pause container used by kubelet and tests to 3.1

This updates the version of the pause container used by the kubelet and
various test utilities to 3.1.

**What this PR does / why we need it**: The pause container hasn't been rebuilt in quite a while and needs an update to reap zombies (#50865) and for schema2 manifest (#56253).

**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 #50865, Fixes #56253

**Special notes for your reviewer**:

**Release note**:

```release-note
The kubelet uses a new release 3.1 of the pause container with the Docker runtime. This version will clean up orphaned zombie processes that it inherits.
```
2018-01-04 17:06:48 -08:00
Lee Verberne 1ea697044a Update pause container version to 3.1
This updates the version of the pause container used by the kubelet and
various test utilities to 3.1.

This also adds a CHANGELOG.md for build/pause
2018-01-04 11:35:29 +01:00
Kubernetes Submit Queue 17ffacc37f
Merge pull request #57805 from liggitt/test-grep-pipe-fix
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 error on closed pipe

fixes https://github.com/kubernetes/kubernetes/issues/57706

from @stevekuznetsov:
> If you do `echo | grep -q`, `grep` will exit when it finds the first match
> If the `echo` is still writing to stdout it fails because there's no reader on that pipe anymore
> So we always use `grep -q <<<"${content}"` now
> since that uses a FIFO
  
```release-note
NONE
```
2018-01-03 15:40:43 -08:00
Jordan Liggitt 0d5b9dd3d4
Avoid error on closed pipe 2018-01-03 16:44:50 -05:00
Lion-Wei 071200128f remove /k8s.io/kubernetes/pkg/kubectl/testing 2018-01-03 09:39:33 +08:00
Christoph Blecker 83bc631bee
Add generated runtime and generated device plugin to update-all 2018-01-02 00:15:05 -08:00
Christoph Blecker bec420875e
Update boilerplate for 2018 2018-01-01 22:57:59 -08:00
Jeff Grafton 924fd3b058 Update helper scripts to find binaries in new bazel-bin paths 2017-12-23 13:13:09 -08:00
Jeff Grafton efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Jeff Grafton b13263eeb3 Bump rules_go to 0.8.1 2017-12-23 13:12:02 -08:00
Tim Hockin e9dd8a68f6 Revert k8s.gcr.io vanity domain
This reverts commit eba5b6092a.

Fixes https://github.com/kubernetes/kubernetes/issues/57526
2017-12-22 14:36:16 -08:00
Kubernetes Submit Queue 475d5c32e8
Merge pull request #57564 from spiffxp/follow-gazelle-repo
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>.

Handle gazelle moving to a new repo

Gazelle moved to a new repo, and out of bazebuild/rules_go.  At first I tried the same approach I used for kubernetes/test-infra and just bumped to the new repo.  Turns out that version was later than what is used here in kubernetes/kubernetes.  Now I'm trying to use a rewritten version of `go_install_from_commit` to support installing packages that aren't available at HEAD

ref kubernetes/test-infra#6075

/priority critical-urgent
https://k8s-testgrid.appspot.com/presubmits-kubernetes-blocking#pull-kubernetes-verify is blocked until this is addressed
2017-12-22 13:51:14 -08:00
Aaron Crickenberger e55938940d Rewrite go_install_from_commit to handle pkgs that aren't in HEAD
This is brittle and really only intended to workaround the fact that
gazelle has moved out of the bazelbuild/rules_go repo to its own
repo. I would rather see this reverted once we move to the same
version of gazelle as used by kubernetes/test-infra
2017-12-22 14:45:21 -05:00
Kubernetes Submit Queue db9029324f
Merge pull request #57101 from php-coder/local_up_cluster_daemon_msgs
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>.

local-up-cluster.sh: improve messages when running with ENABLE_DAEMON=true

**What this PR does / why we need it**:
Don't suggest to use `Ctrl+C` or open up another terminal when the script was running with `ENABLE_DAEMON=true`.

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

CC @simo5
2017-12-21 11:23:03 -08:00
Jonathan Basseri 4df4c8bdd2 Allow integration test timeout override.
This allows the test timeout to be overridden at the command line for
integration tests. The default behavior is unchanged.

e.g.
    make test-integration WHAT="./test/integration/scheduler" \
        KUBE_TEST_ARGS="-run=. -count=10" \
	KUBE_TIMEOUT="-timeout 1h"
2017-12-21 10:55:09 -08:00
Slava Semushin 9d34fee57c hack/local-up-cluster.sh: improve messages when script was running with ENABLE_DAEMON=true 2017-12-21 12:24:54 +01:00
Kubernetes Submit Queue 324991bd67
Merge pull request #56274 from surajssd/enable-podpreset-localup-cluster
Automatic merge from submit-queue (batch tested with PRs 57292, 56274, 57435, 57438, 57429). 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>.

enable podpreset by default in local up cluster

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

This PR enables PodPreset in Admission control and also for that
to work on the apiserver level enalbes the API group
settings.k8s.io/v1alpha1.

**Release note**:

```release-note
NONE
```
2017-12-20 22:16:43 -08:00
Kubernetes Submit Queue d78c0652c1
Merge pull request #57417 from fabianofranz/no_longer
Automatic merge from submit-queue (batch tested with PRs 57434, 57221, 57417, 57474, 57481). 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>.

fabiano no longer a thing

**What this PR does / why we need it**: Removes me from lists of reviewers and approvers.

**Release note**:

```release-note
NONE
```
2017-12-20 17:42:40 -08:00
Davanum Srinivas 6738da1d28 Fix problem accessing private docker registries
In 027c8b9ef2, we added code to
move from .dockercfg to config.json file. But we forgot to use
the right secret type and the key to store the base64'ed creds
2017-12-20 12:37:40 -05:00
Ryan Phillips 63e2eacd22 add semver metadata regex
* supports v1.9.0+stable.0
2017-12-19 15:04:56 -06:00
Fabiano Franz b8af5964af fabiano no longer a thing 2017-12-19 16:37:12 -02:00