Commit Graph

1467 Commits (c587b8a21eb5000795b48ce16315e627e95bf094)

Author SHA1 Message Date
deads2k 32a2c2d05c remove old restclient 2017-01-20 07:56:35 -05:00
deads2k c47717134b move utils used in restclient to client-go 2017-01-19 07:55:14 -05:00
Kubernetes Submit Queue 723fa08767 Merge pull request #39324 from wojtek-t/change_patch_api
Automatic merge from submit-queue

Prepare for using optimized conversion to/from map[string]interface{} in Patch operation

Ref #39017
2017-01-19 00:50:12 -08:00
Andrew Rynhard f46bf42ba0 Add authorization mode to kubeadm 2017-01-18 14:02:53 -08:00
Jordan Liggitt e49554501f
Use versioned Taint/Toleration/AllowPods objects when marshalling 2017-01-18 12:52:14 -05:00
Kubernetes Submit Queue 6dfe5c49f6 Merge pull request #38865 from vwfs/ext4_no_lazy_init
Automatic merge from submit-queue

Enable lazy initialization of ext3/ext4 filesystems

**What this PR does / why we need it**: It enables lazy inode table and journal initialization in ext3 and ext4.

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

**Release note**:
```release-note
Enable lazy inode table and journal initialization for ext3 and ext4
```

**Special notes for your reviewer**:
This PR removes the extended options to mkfs.ext3/mkfs.ext4, so that the defaults (enabled) for lazy initialization are used.

These extended options come from a script that was historically located at */usr/share/google/safe_format_and_mount* and later ported to GO so this dependency to the script could be removed. After some search, I found the original script here: https://github.com/GoogleCloudPlatform/compute-image-packages/blob/legacy/google-startup-scripts/usr/share/google/safe_format_and_mount

Checking the history of this script, I found the commit [Disable lazy init of inode table and journal.](4d7346f7f5). This one introduces the extended flags with this description:
```
Now that discard with guaranteed zeroing is supported by PD,
initializing them is really fast and prevents perf from being affected
when the filesystem is first mounted.
```

The problem is, that this is not true for all cloud providers and all disk types, e.g. Azure and AWS. I only tested with magnetic disks on Azure and AWS, so maybe it's different for SSDs on these cloud providers. The result is that this performance optimization dramatically increases the time needed to format a disk in such cases.

When mkfs.ext4 is told to not lazily initialize the inode tables and the check for guaranteed zeroing on discard fails, it falls back to a very naive implementation that simply loops and writes zeroed buffers to the disk. Performance on this highly depends on free memory and also uses up all this free memory for write caching, reducing performance of everything else in the system. 

As of https://github.com/kubernetes/kubernetes/issues/30752, there is also something inside kubelet that somehow degrades performance of all this. It's however not exactly known what it is but I'd assume it has something to do with cgroups throttling IO or memory. 

I checked the kernel code for lazy inode table initialization. The nice thing is, that the kernel also does the guaranteed zeroing on discard check. If it is guaranteed, the kernel uses discard for the lazy initialization, which should finish in a just few seconds. If it is not guaranteed, it falls back to using *bio*s, which does not require the use of the write cache. The result is, that free memory is not required and not touched, thus performance is maxed and the system does not suffer.

As the original reason for disabling lazy init was a performance optimization and the kernel already does this optimization by default (and in a much better way), I'd suggest to completely remove these flags and rely on the kernel to do it in the best way.
2017-01-18 09:09:52 -08:00
Wojciech Tyczynski d08abdb187 Allow for returning map[string]interface{} from patch. 2017-01-18 11:53:30 +01:00
Kubernetes Submit Queue d357a72161 Merge pull request #40039 from timstclair/api-redirect
Automatic merge from submit-queue

Enable streaming proxy redirects by default (beta)

Prerequisite to moving CRI to Beta.

I'd like to enable this early in our 1.6 cycle to get plenty of test coverage before release.

@yujuhong @liggitt 

```release-note
Follow redirects for streaming requests (exec/attach/port-forward) in the apiserver by default (alpha -> beta).
```
2017-01-17 16:18:48 -08:00
Clayton Coleman 9a2a50cda7
refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
Tim St. Clair b42663bb14
Enable streaming proxy redirects by default (beta) 2017-01-17 12:56:03 -08:00
Kubernetes Submit Queue e5fe366eaf Merge pull request #39894 from deads2k/client-03-remove-old
Automatic merge from submit-queue

Remove packages which are now apimachinery

Removes all the content from the packages that were moved to `apimachinery`.  This will force all vendoring projects to figure out what's wrong.  I had to leave many empty marker packages behind to have verify-godep succeed on vendoring heapster.

@sttts straight deletes and simple adds
2017-01-17 12:00:00 -08:00
deads2k 26c46971f2 move PatchType to apimachinery 2017-01-17 08:32:05 -05:00
deads2k a6b655fb6a add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
deads2k 67fac70ea3 remove files moved to apimachinery 2017-01-17 07:46:34 -05:00
deads2k 8686d67c80 move pkg/util/rand 2017-01-16 16:04:03 -05:00
deads2k 7993e7c8aa move openapi types to pkg/openapi 2017-01-16 13:40:14 -05:00
Kubernetes Submit Queue 6defc30337 Merge pull request #39882 from deads2k/api-59-errors
Automatic merge from submit-queue (batch tested with PRs 38592, 39949, 39946, 39882)

move api/errors to apimachinery

`pkg/api/errors` is a set of helpers around `meta/v1.Status` that help to create and interpret various apiserver errors.  Things like `.NewNotFound` and `IsNotFound` pairings.  This pull moves it into apimachinery for use by the clients and servers.

@smarterclayton @lavalamp First commit is the move plus minor fitting.  Second commit is straight replace and generation.
2017-01-16 10:37:42 -08:00
deads2k 77b4d55982 mechanical 2017-01-16 09:35:12 -05:00
Dr. Stefan Schimanski 918868b115 genericapiserver: cut off certificates api dependency 2017-01-16 14:10:59 +01:00
Kubernetes Submit Queue eb9f953496 Merge pull request #39876 from deads2k/generic-20-deps-03
Automatic merge from submit-queue

move more things to apiserver

```
pkg/genericapiserver/api/handlers/negotiation/ -> apiserver/pkg/handlers/negotiation
pkg/genericapiserver/api/metrics -> apiserver/pkg/metrics
pkg/genericapiserver/api/request -> apiserver/pkg/request
pkg/util/wsstream -> apiserver/pkg/util/wsstream
plugin/pkg/auth/authenticator/request/headerrequest -> apiserver/pkg/authentication/request/headerrequest
plugin/pkg/webhook -> apiserver/pkg/webhook
```

and mechanicals.

`k8s.io/kubernetes/pkg/genericapiserver/routes/data/swagger` needs to be sorted out.
2017-01-16 04:14:37 -08:00
Kubernetes Submit Queue 5723979b60 Merge pull request #39525 from kargakis/update-equality-helper
Automatic merge from submit-queue (batch tested with PRs 39807, 37505, 39844, 39525, 39109)

Update deployment equality helper

@mfojtik @janetkuo this is split out of https://github.com/kubernetes/kubernetes/pull/38714 to reduce the size of that PR, ptal
2017-01-13 13:40:45 -08:00
deads2k 31b6ba4e94 mechanicals 2017-01-13 16:33:09 -05:00
deads2k 81b073a5f5 move no k8s.io/kubernetes deps to apiserver 2017-01-13 16:26:58 -05:00
Kubernetes Submit Queue 212234ab3f Merge pull request #39807 from deads2k/client-02-client-go
Automatic merge from submit-queue

run staging client-go update

Chasing to see what real problems we have in staging-client-go.

@sttts you get similar results?
2017-01-13 13:21:19 -08:00
Kubernetes Submit Queue a6fa5c2bfd Merge pull request #39814 from deads2k/api-58-multi-register
Automatic merge from submit-queue

replace global registry in apimachinery with global registry in k8s.io/kubernetes

We'd like to remove all globals, but our immediate problem is that a shared registry between k8s.io/kubernetes and k8s.io/client-go doesn't work.  Since client-go makes a copy, we can actually keep a global registry with other globals in pkg/api for now.

@kubernetes/sig-api-machinery-misc @lavalamp @smarterclayton @sttts
2017-01-13 12:37:02 -08:00
deads2k 633e9d98fc use apimachinery packages instead of client-go packages 2017-01-13 14:04:54 -05:00
deads2k f1176d9c5c mechanical repercussions 2017-01-13 08:27:14 -05:00
Kubernetes Submit Queue 14362160ba Merge pull request #38665 from ymqytw/fix_list_of_primitives
Automatic merge from submit-queue (batch tested with PRs 39834, 38665)

Use parallel list for deleting items from a primitive list with merge strategy

Implemented parallel list for deleting items from a primitive list with merge strategy. Ref: [design doc](https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#list-of-primitives)

fixes #35163 and #32398

When using parallel list, we don't need to worry about version skew.
When an old APIServer gets a new patch like:
```yaml
metadata:
  $deleteFromPrimitiveList/finalizers:
  - b
  finalizers:
  - c
```
It won't fail and work as before, because the parallel list will be dropped during json decoding.

Remaining issue: There is no check when creating a set (primitive list with merge strategy). Duplicates may get in.
It happens in two cases:
1) Creation using POST
2) Creating a list that doesn't exist before using PATCH

Fixing the first case is the beyond the scope of this PR.
The second case can be fixed in this PR if we need that.

cc: @pwittrock @kubernetes/kubectl @kubernetes/sig-api-machinery 

```release-note
Fix issue around merging lists of primitives when using PATCH or kubectl apply.
```
2017-01-12 20:03:23 -08:00
ymqytw 9a8ef00888 add unit test 2017-01-12 15:01:38 -08:00
ymqytw a3584f2c34 use parallel list for deleting items in a set 2017-01-12 15:01:16 -08:00
Kubernetes Submit Queue ee49906c45 Merge pull request #39661 from NickrenREN/clientset-redundant-modify
Automatic merge from submit-queue

fix redundant alias clientset

remove redundant alias clientset
2017-01-12 13:29:16 -08:00
NickrenREN ad1f0d30e0 delete ErrorTimeout() function and modify Umask() args
ErrorTimeout is never used
2017-01-12 11:05:30 +08:00
NickrenREN a12dea14e0 fix redundant alias clientset 2017-01-12 10:21:05 +08:00
deads2k c4fae4e690 mechanical repercussions 2017-01-11 15:20:36 -05:00
deads2k 5280c8d3ac moves of genericapiserver packages without dependencies 2017-01-11 15:06:38 -05:00
Michail Kargakis 6013186ac3 Update deployment equality helper 2017-01-11 18:34:12 +01:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Kubernetes Submit Queue ebf1a533aa Merge pull request #38342 from ymqytw/make_SPatch_delete_all_duplicates
Automatic merge from submit-queue (batch tested with PRs 34488, 39511, 39619, 38342, 39491)

Make StrategicPatch delete all matching maps in a merging list

fixes #38332

```release-note
NONE
```

cc: @lavalamp @pwittrock
2017-01-10 16:07:16 -08:00
Kubernetes Submit Queue 7d2f798052 Merge pull request #39511 from zhouhaibing089/lru-time-ut
Automatic merge from submit-queue (batch tested with PRs 34488, 39511, 39619, 38342, 39491)

use fake clock in lruexpiration cache test

when the system clock is extremely slow(usually see in VMs), this [check](https://github.com/kubernetes/kubernetes/blob/master/pkg/util/cache/lruexpirecache.go#L74) might still return the value.  

```go
if c.clock.Now().After(e.(*cacheEntry).expireTime) {
	go c.remove(key)
	return nil, false
}
```

that means even we set the ttl to be 0 second, the after check might still be false(because the clock is too slow, and thus equals).

the change here helps to reduce flakes.
2017-01-10 16:07:12 -08:00
deads2k e10d4cbd2e tolerate clock change in throttle testing 2017-01-09 14:03:09 -05:00
zhouhaibing089 f12a6c1618 use fake clock in lruexpiration cache test 2017-01-07 13:58:03 +08:00
ymqytw 03081a0003 make StrategicPatch delete all matching maps in a merging list 2017-01-06 15:52:00 -08:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Kubernetes Submit Queue 13780bba82 Merge pull request #39433 from deads2k/generic-04-no-dep-01
Automatic merge from submit-queue

move no k8s.io/kubernetes dependencies round 01

Builds on the previous, adds unit testing the staging dir.

moves

 1. pkg/healthz -> apiserver/pkg/healthz
 2. pkg/util/flushwriter -> apiserver/pkg/util/flushwriter
 3. pkg/auth/authenticator -> apiserver/pkg/authentication/authenticator
 4. pkg/auth/authorizer -> apiserver/pkg/authorization/authorizer

@sttts
2017-01-05 10:18:54 -08:00
Kubernetes Submit Queue 4422ddecba Merge pull request #39432 from deads2k/generic-06-strings
Automatic merge from submit-queue

snip pkg/util/strings dependency

The `pkg/util/strings` package looks to be largely used by volumes, which are independent of the bits used by genericapiserver which aren't used by anyone else.  This moves the single function (used no where else) to its point of use.

@sttts
2017-01-05 08:32:38 -08:00
deads2k b813e98a26 move no k8s.io/kubernetes dependencies round one 2017-01-05 11:09:42 -05:00
deads2k 37c0c14215 snip pkg/util/strings dependency 2017-01-05 09:42:42 -05:00
deads2k 1ebe759743 selectively move to client-go packages 2017-01-04 17:49:24 -05:00
Lucas Käldström 733393d800
Add a PrivateKeyFromFile method to certutil for parsing a private key from a file 2017-01-03 23:36:23 +02:00
Jeff Grafton fae627dd65 Update generated for 2017 2017-01-01 23:11:09 -08:00