Commit Graph

16958 Commits (124fb610dcbd445fa710da67508ac6d5b822f61d)

Author SHA1 Message Date
Maciej Szulik 4401c814fc Read resources from all versions for finalization and gc
If the same resource exists in more then one version, only the preferred
version one will be returned.
2016-11-18 23:31:52 +01:00
Antoine Pelisse e7bc178829 Revert "Add fast-path for Listing with ResourceVersion=0" 2016-11-18 14:15:08 -08:00
childsb f4ff79af7b Revert "Use Gid when provisioning Gluster Volumes."
This reverts commit 7a0d219d12.
2016-11-18 15:32:24 -06:00
Kubernetes Submit Queue 38ec2974a2 Merge pull request #36788 from MrHohn/svc-sourceranges-fix
Automatic merge from submit-queue

Bug fix: Allows user to change service type when sourceRanges is declared.

Fixes #36784.

Adds logic in validation to make changing service type possible when sourceRanges is declared.

@bowei @bprashanth
2016-11-18 13:13:33 -08:00
Kubernetes Submit Queue 9d4f94dcec Merge pull request #37085 from gmarek/rv
Automatic merge from submit-queue

Add fast-path for Listing with ResourceVersion=0

We slightly change the behavior, but we keep the current contract, so release note is not needed.

cc @saad-ali
2016-11-18 09:45:11 -08:00
Kubernetes Submit Queue f90d879204 Merge pull request #36827 from jsafrane/fix-recycler-pod-name
Automatic merge from submit-queue

Fix recycler pod deletion race.

We should use clone of recycler pod template instead of reusing the same
one for two or more recyclers running in parallel.

Also add some logs to relevant places to spot the error easily next time.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1392338
2016-11-18 09:05:11 -08:00
ymqytw 48d3ca23cf Update apply and edit 2016-11-18 09:01:28 -08:00
Kubernetes Submit Queue 15bbd11bbf Merge pull request #35967 from saturnism/patch-2
Automatic merge from submit-queue

Append newline to the "deleted context ... " and "deleted cluster" message

**What this PR does / why we need it**: Append newline to the "deleted context ... " message.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2016-11-18 08:28:12 -08:00
Kubernetes Submit Queue ddcd9708ec Merge pull request #36898 from deads2k/cli-10-fix-unstructuredtpr
Automatic merge from submit-queue

remove TPR registration, ease validation requirements

Fixes https://github.com/kubernetes/kubernetes/issues/36007 .

This removes the special casing for TPRs inside of the `UnstructuredObject`, which should allow CRUD against skewed kube api server levels.

@kubernetes/kubectl @kubernetes/sig-cli 
@janetkuo
2016-11-18 06:27:17 -08:00
gmarek e1542300ae Add fast-path for Listing with ResourceVersion=0 2016-11-18 13:54:10 +01:00
Sebastian Florek 2e79e1f316
Register api.DeleteOptions for internal autoscaling group 2016-11-18 11:07:16 +01:00
Kubernetes Submit Queue 3b43ce8e5c Merge pull request #36996 from liggitt/require-tpr-version
Automatic merge from submit-queue

Require at least one version in ThirdPartyResource objects

Fixes #36991
2016-11-17 22:05:54 -08:00
Kubernetes Submit Queue eca9e989a3 Merge pull request #36779 from sjenning/fix-memory-leak-via-terminated-pods
Automatic merge from submit-queue

fix leaking memory backed volumes of terminated pods

Currently, we allow volumes to remain mounted on the node, even though the pod is terminated.  This creates a vector for a malicious user to exhaust memory on the node by creating memory backed volumes containing large files.

This PR removes memory backed volumes (emptyDir w/ medium Memory, secrets, configmaps) of terminated pods from the node.

@saad-ali @derekwaynecarr
2016-11-17 21:29:51 -08:00
mbohlool 02631bb7ff OpenAPI Bugfix: []byte should be treated as integer array 2016-11-17 21:22:02 -08:00
Jordan Liggitt 7a5461a17c
Require at least one version in ThirdPartyResource objects 2016-11-17 22:51:06 -05:00
Kubernetes Submit Queue cae6cf2cee Merge pull request #37031 from foxish/add-ss-kubectl
Automatic merge from submit-queue

Adding statefulset to the list of things kubectl says it knows about

**What this PR does / why we need it**: Adding statefulset to the list of things kubectl says it knows about.

**Special notes for your reviewer**: 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
NONE
```

cc @kubernetes/sig-apps @erictune
2016-11-17 16:49:58 -08:00
ymqytw f32696e734 try old patch after new patch fails 2016-11-17 14:28:09 -08:00
Anirudh 4b53a32e14 Adding statefulset to the kubectl output for valid resources 2016-11-17 13:53:23 -08:00
Jing Xu 1b89c79e55 Update aws_ebs.go
fix typo in glog
2016-11-17 11:14:55 -08:00
Ray Tsang 846cd2d66a Append newline to the "deleted context ... " and "deleted cluster ..." message 2016-11-17 12:30:45 -05:00
Kubernetes Submit Queue 4241a42ad5 Merge pull request #36965 from Random-Liu/fix-truncate-hostname
Automatic merge from submit-queue

Fix hostname truncate.

Fixes https://github.com/kubernetes/kubernetes/issues/36951.

This PR will keep truncating the hostname until the ending character is valid.

/cc @kubernetes/sig-node 

Mark v1.5 because this is a bug fix.
/cc @saad-ali
2016-11-17 02:03:31 -08:00
Kubernetes Submit Queue 424286996a Merge pull request #36764 from ymqytw/make_edit_before_create_iterate
Automatic merge from submit-queue

make kubectl create --edit iterate

`kubectl create --edit` is broken after #36148 merged.
`kubectl create --edit` will fail when a manifest that contains multiple resources.
I guess the root cause is that dynamic typer doesn't support a list of resources currently.

This PR makes `kubectl create --edit` iterate again as `kubectl create`.
2016-11-17 01:25:34 -08:00
xiangpengzhao 1203613612 Fix a link in api doc 2016-11-17 02:12:00 -05:00
Jing Xu 3d3e44e77e fix issue in converting aws volume id from mount paths
This PR is to fix the issue in converting aws volume id from mount
paths. Currently there are three aws volume id formats supported. The
following lists example of those three formats and their corresponding
global mount paths:
1. aws:///vol-123456
(/var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/vol-123456)
2. aws://us-east-1/vol-123456
(/var/lib/kubelet/plugins/kubernetes.io/mounts/aws/us-est-1/vol-123455)
3. vol-123456
(/var/lib/kubelet/plugins/kubernetes.io/mounts/aws/us-est-1/vol-123455)

For the first two cases, we need to check the mount path and convert
them back to the original format.
2016-11-16 22:35:48 -08:00
Random-Liu e9f1b0f972 Fix hostname truncate. 2016-11-16 18:09:31 -08:00
Kubernetes Submit Queue 3d64d919e4 Merge pull request #36833 from mandarjog/issue_36652
Automatic merge from submit-queue

Handle Empty clusterCIDR

**What this PR does / why we need it**:
Handles empty clusterCIDR by skipping the corresponding rule.

**Which issue this PR fixes** 
fixes #36652

**Special notes for your reviewer**:
1. Added test to check for presence/absence of XLB to SVC rule
2. Changed an error statement to log rules along with the error string in case of a failure; This ensures that full debug info is available in case of iptables-restore errors.


Empty clusterCIDR causes invalid rules generation.
Fixes issue #36652
2016-11-16 13:42:11 -08:00
Kubernetes Submit Queue f918dd64c4 Merge pull request #36901 from leitzler/issue_36858_SA2003
Automatic merge from submit-queue

Fix SA2003, deferred Lock right after locking

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
Fixes a re-locking right after a lock. This is a part if issue #36858.

**Special notes for your reviewer**:
N/A

**Release note**:
NONE
2016-11-16 13:04:09 -08:00
deads2k 66e5c38d67 remove TPR registration, ease validation requirements 2016-11-16 14:04:35 -05:00
Yu-Ju Hong 5c90908eb0 dockershim: remove container upon naming conflicts
We have observed that, after failing to create a container due to "device or
resource busy", docker may end up having inconsistent internal state. One
symptom is that docker will not report the existence of the "failed to create"
container, but if kubelet tries to create a new container with the same name,
docker will error out with a naming conflict message.

To work around this, this commit parses the creation error message and if there
is a naming conflict, it would attempt to remove the existing container.
2016-11-16 10:20:16 -08:00
Kubernetes Submit Queue 0f95b262dc Merge pull request #35460 from humblec/gluster-gid-prov-2
Automatic merge from submit-queue

Use Gid when provisioning Gluster Volumes.

Bug # https://github.com/openshift/origin/issues/11556
2016-11-16 10:15:03 -08:00
Seth Jennings b80bea4a62 fix leaking memory backed volumes of terminated pods 2016-11-16 10:17:22 -06:00
Humble Chirammal 7a0d219d12 Use Gid when provisioning Gluster Volumes.
BUG # https://github.com/openshift/origin/issues/11556

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-11-16 19:43:51 +05:30
Kubernetes Submit Queue 28d273c8b2 Merge pull request #36810 from gmarek/secrets
Automatic merge from submit-queue

Add ServiceAccounts to kubemark

cc @yujuhong
2016-11-16 06:01:30 -08:00
gmarek 78bc6c2ecd Add logs near force deletions of Pods 2016-11-16 15:00:01 +01:00
Kubernetes Submit Queue 193622b31f Merge pull request #36728 from feiskyer/sysctls-docs
Automatic merge from submit-queue

CRI: add docs for sysctls

#34830 adds `sysctls` features in CRI, it is based on sandbox annotations, this PR adds docs for it. 

@yujuhong @timstclair @jonboulle
2016-11-16 02:58:42 -08:00
Kubernetes Submit Queue f4a7b64bf1 Merge pull request #36542 from Random-Liu/clarify-cri-user
Automatic merge from submit-queue

CRI: Clarify User in CRI.

Addressed https://github.com/kubernetes/kubernetes/pull/36423#issuecomment-259343135.

This PR clarifies the user related fields in CRI.

One question is that:
What is the meaning of the `run_as_user` field in `LinuxSandboxSecurityContext`?
* **Is it user on the host?** Then it doesn't make sense, user shouldn't care about what users are on the host.
* **Is it user inside the infra container image?** This is how the field is currently used. However, Infra container is docker specific, I'm not sure whether we should expose this in CRI.
* **Is it the default user inside the pod?** It tells runtime that if there is a container (infra container, or some other helper containers like streaming container etc.), if their `user` is not specified, use the default "sandbox user". Then how can we guarantee that infra or helper container image have the `user`?
* **It doesn't make sense?** If we remove it, we are relying on the shim to set right user (maybe always root) for infra or helper containers (if there will be any in the future), I'm not sure whether this is what we expect.

@yujuhong @feiskyer @jonboulle @yifan-gu 
/cc @kubernetes/sig-node
2016-11-16 01:45:37 -08:00
Sebastian Florek 56d7a3ca09
Register api.DeleteOptions for internal batch group 2016-11-16 09:19:42 +01:00
Kubernetes Submit Queue fac05d9c81 Merge pull request #36174 from JacobTanenbaum/v2resource_fixes
Automatic merge from submit-queue

V2resource fixes

when using kubectl set resources it resets all resource fields that are not being set.

for example
$ kubectl set resources deployments nginx --limits=cpu=100m

followed by

$ kubectl set resources deployments nginx --limits=memory=256Mi

would result in the nginx deployment only limiting memory at 256Mi with the previous
limit placed on the cpu being wiped out. This behavior is corrected so that each invocation
only modifies fields set in that command and changed the testing so that the desired behavior
is checked.

Also a typo:

you must specify an update to requests or limits or (in the form of --requests/--limits)

corrected to

you must specify an update to requests or limits (in the form of --requests/--limits)

Implemented both the dry run and local flags.

Added test cases to show that both flags are operating as intended.
Removed the print statement "running in local mode" as in PR#35112

The original PR associated with these fixes where reverted due to causing a flake in hack/make-rules/test-cmd.sh, I gave the 'kubectl set resources' tests there own deployment and set the terminationGracePeriodSeconds to 0 and have run test-cmd.sh for hours without hitting the flake
2016-11-15 21:03:06 -08:00
Random-Liu 2ce5deb6fd Add separate username field in CRI and use it. 2016-11-15 16:50:02 -08:00
Random-Liu c79b8afe5b Clarify user fields in CRI 2016-11-15 16:50:02 -08:00
Kubernetes Submit Queue 0bd5bd60ac Merge pull request #36812 from jakub-d/master
Automatic merge from submit-queue

Change ScheduledJob POD name suffix from hash to Unix Epoch

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

There is a bug in a ScheduledJob POD suffix hash function (#34447). If you generate more than ~20 PODs you will start having collisions. Here is the code which proves that:
```
package main

import "fmt"
import "time"
import "hash/adler32"
import hashutil "k8s.io/kubernetes/pkg/util/hash"

func main() {
        start_time, _ := time.Parse("2006-Jan-02", "2016-Nov-14")
        var hits map[uint32]int = make(map[uint32]int)
        fmt.Println("| Date | Epoch | Hash | Hits |")
        fmt.Println("| --------------- | ---------- | --- | ---- |")
        for i:=0; i<30; i++ {
                dt:=start_time.Add(time.Duration(i*5)*time.Minute)
                hdt:=getTimeHash(dt)
                _, ok := hits[hdt]
                if ! ok {
                        hits[hdt]=0
                }
                hits[hdt]++
                fmt.Printf("| %s | %d | %d | %d  |\n",dt.Format(time.Stamp), dt.Unix(), hdt, hits[hdt])
        }
}

func getTimeHash(tm time.Time) uint32 {
        timeHasher := adler32.New()
        hashutil.DeepHashObject(timeHasher, tm)
        return timeHasher.Sum32()
}
```

The ouptut is:

| Date | Epoch | Hash | Hits |
| --------------- | ---------- | --- | ---- |
| Nov 14 00:00:00 | 1479081600 | 4175643772 | 1  |
| Nov 14 00:05:00 | 1479081900 | **4209853567** | 1  |
| Nov 14 00:10:00 | 1479082200 | **4141499513** | 1  |
| Nov 14 00:15:00 | 1479082500 | 4175709308 | 1  |
| Nov 14 00:20:00 | 1479082800 | 4209919103 | 1  |
| Nov 14 00:25:00 | 1479083100 | 4244128898 | 1  |
| Nov 14 00:30:00 | 1479083400 | 4072621171 | 1  |
| Nov 14 00:35:00 | 1479083700 | 4106830966 | 1  |
| Nov 14 00:40:00 | 1479084000 | 4141040761 | 1  |
| Nov 14 00:45:00 | 1479084300 | 4072686707 | 1  |
| Nov 14 00:50:00 | 1479084600 | 4106896502 | 1  |
| Nov 14 00:55:00 | 1479084900 | 4141106297 | 1  |
| Nov 14 01:00:00 | 1479085200 | 4072752243 | 1  |
| Nov 14 01:05:00 | 1479085500 | 4106962038 | 1  |
| Nov 14 01:10:00 | 1479085800 | 4141171833 | 1  |
| Nov 14 01:15:00 | 1479086100 | 4175381628 | 1  |
| Nov 14 01:20:00 | 1479086400 | 4107027574 | 1  |
| Nov 14 01:25:00 | 1479086700 | 4141237369 | 1  |
| Nov 14 01:30:00 | 1479087000 | 4175447164 | 1  |
| Nov 14 01:35:00 | 1479087300 | 4107093110 | 1  |
| Nov 14 01:40:00 | 1479087600 | 4141302905 | 1  |
| Nov 14 01:45:00 | 1479087900 | 4175512700 | 1  |
| Nov 14 01:50:00 | 1479088200 | 4107158646 | 1  |
| Nov 14 01:55:00 | 1479088500 | 4141368441 | 1  |
| Nov 14 02:00:00 | 1479088800 | 4175578236 | 1  |
| Nov 14 02:05:00 | 1479089100 | 4209788031 | 1  |
| Nov 14 02:10:00 | 1479089400 | 4141433977 | 1  |
| Nov 14 02:15:00 | 1479089700 | 4175643772 | 2  |
| Nov 14 02:20:00 | 1479090000 | **4209853567** | 2  |
| Nov 14 02:25:00 | 1479090300 | **4141499513** | 2  |

This PR is a proposal to abandon hashes and use Unix Epoch times instead.
Cons:
* It's easy to sort PODs this way
* The length of the Epoch time stamp is the same as the length of the current hash
* As it's epoch - we won't have collisions

**Which issue this PR fixes**
fixes #34447
2016-11-15 16:08:55 -08:00
Mandar U Jog 3fdc343a98 Handle Empty clusterCIDR
Empty clusterCIDR causes invalid rules generation.
Fixes issue #36652
2016-11-15 14:34:25 -08:00
Cole Mickens 6357c391f9 azure: support nics with multiple ipconfigs 2016-11-15 13:25:58 -08:00
Kubernetes Submit Queue 98c68947ee Merge pull request #36549 from cjcullen/closetunnel
Automatic merge from submit-queue

Close tunnels after failed healthchecks.

When we fail an ssh-tunnel healthcheck, we currently leak a file descriptor keeping the SSH connection open.

This closes the underlying tunnel before removing our pointer to it. It is possible that the tunnel was functional, but the healthcheck failed for some other reason (e.g. kubelet healthz down), which could close an in-use tunnel, but I think that is acceptable.
2016-11-15 10:42:53 -08:00
Kubernetes Submit Queue 2110f72e4c Merge pull request #36800 from mdshuai/update-cgroups-per-qos
Automatic merge from submit-queue

[kubelet]update some --cgroups-per-qos to --experimental-cgroups-per-qos

Follow https://github.com/kubernetes/kubernetes/pull/36767, there are some fields still need update in docs or hack/local-up-cluster.sh
2016-11-15 08:54:29 -08:00
Dlugolecki, Jakub d1896a695f Change ScheduledJob POD name suffix from hash to Unix Epoch 2016-11-15 17:25:32 +01:00
Jan Safranek 76755034a1 Fix recycler pod deletion race.
We should use clone of recycler pod template instead of reusing the same
one for two or more recyclers running in parallel.

Also add some logs to relevant places to spot the error easily next time.
2016-11-15 17:22:32 +01:00
gmarek 7439a956ef Add ServiceAccounts to Kubemark 2016-11-15 16:03:48 +01:00
Kubernetes Submit Queue 2bd8bb2699 Merge pull request #34873 from k82cn/k8s_34633
Automatic merge from submit-queue

Set non-zero exit code on failures for kubectl

fixes #34633 

/cc @AdoHe
2016-11-15 03:40:53 -08:00
Kubernetes Submit Queue b2cd67c31f Merge pull request #36756 from gmarek/contention
Automatic merge from submit-queue

Add a flag allowing contention profiling of the API server

Useful for performance debugging.

cc @smarterclayton @timothysc @lavalamp

```release-note
Add a flag allowing contention profiling of the API server
```
2016-11-15 03:04:27 -08:00
mdshuai 2189acdd4f [kubelet]update --cgroups-per-qos to --experimental-cgroups-per-qos 2016-11-15 15:55:47 +08:00
Kubernetes Submit Queue 79fc0a95a0 Merge pull request #35543 from philips/improve-version
Automatic merge from submit-queue

kubectl: add less verbose version

The kubectl version output is very complex and makes it hard for users
and vendors to give actionable information. For example during the
recent Kubernetes 1.4.3 TLS security scramble I had to write a one-liner
for users to get out the version number to give to figure out if they
are vulnerable:

```
$ kubectl version | grep -i Server | sed  -n 's%.*GitVersion:"\([^"]*\).*%\1%p'
```

Instead this patch outputs simply output by default

```
./kubectl version
Client Version: v1.4.3
Server Version: v1.4.3
```

Adding the `--verbose` flag will output the old format.
2016-11-14 22:39:21 -08:00
Zihong Zheng 924432f2dc Allows user to change service type when sourceRanges is declared 2016-11-14 18:24:02 -08:00
Kubernetes Submit Queue 3245e8b355 Merge pull request #36767 from vishh/rename-cgroups-flags
Automatic merge from submit-queue

[kubelet] rename --cgroups-per-qos to --experimental-cgroups-per-qos

This reflects the true nature of "cgroups per qos" feature.

```release-note
 * Rename `--cgroups-per-qos` to `--experimental-cgroups-per-qos` in Kubelet
```
2016-11-14 17:35:19 -08:00
Kubernetes Submit Queue 9be1191aba Merge pull request #36686 from rkouj/check-gluster-fs-binaries
Automatic merge from submit-queue

Implement CanMount() for gfsMounter for linux

**What this PR does / why we need it**:
To implement CanMount() check for glusterfs. If mount binaries are not present on the underlying node, the mount will not proceed and return an error message stating so.

Related to issue : https://github.com/kubernetes/kubernetes/issues/36098


Related to similar change for NFS : 
https://github.com/kubernetes/kubernetes/pull/36280

**Release note**:
`Check binaries for GlusterFS on the underlying node before doing mount`





Sample output from testing in GCE/GCI:

rkouj@rkouj0:~/go/src/k8s.io/kubernetes$ kubectl describe pods
Name:		glusterfs
Namespace:	default
Node:		e2e-test-rkouj-minion-group-kjq3/10.240.0.3
Start Time:	Fri, 11 Nov 2016 17:22:04 -0800
Labels:		<none>
Status:		Pending
IP:		
Controllers:	<none>
Containers:
  glusterfs:
    Container ID:	
    Image:		gcr.io/google_containers/busybox
    Image ID:		
    Port:		
    QoS Tier:
      cpu:	Burstable
      memory:	BestEffort
    Requests:
      cpu:		100m
    State:		Waiting
      Reason:		ContainerCreating
    Ready:		False
    Restart Count:	0
    Environment Variables:
Conditions:
  Type		Status
  Initialized 	True 
  Ready 	False 
  PodScheduled 	True 
Volumes:
  glusterfs:
    Type:		Glusterfs (a Glusterfs mount on the host that shares a pod's lifetime)
    EndpointsName:	glusterfs-cluster
    Path:		kube_vol
    ReadOnly:		true
  default-token-2zcao:
    Type:	Secret (a volume populated by a Secret)
    SecretName:	default-token-2zcao
Events:
  FirstSeen	LastSeen	Count	From						SubobjectPath	Type		Reason		Message
  ---------	--------	-----	----						-------------	--------	------		-------
  8s		8s		1	{default-scheduler }						Normal		Scheduled	Successfully assigned glusterfs to e2e-test-rkouj-minion-group-kjq3
  7s		4s		4	{kubelet e2e-test-rkouj-minion-group-kjq3}			Warning		FailedMount	Unable to mount volume kubernetes.io/glusterfs/6bb04587-a876-11e6-a712-42010af00002-glusterfs (spec.Name: glusterfs) on pod glusterfs (UID: 6bb04587-a876-11e6-a712-42010af00002). Verify that your node machine has the required components before attempting to mount this volume type. Required binary /sbin/mount.glusterfs is missing
2016-11-14 15:40:45 -08:00
Kubernetes Submit Queue c5c461df38 Merge pull request #36664 from yujuhong/fix_comments
Automatic merge from submit-queue

dockershim: clean up comments
2016-11-14 14:26:51 -08:00
ymqytw 189348df2b make kubectl create --edit iterate 2016-11-14 14:12:24 -08:00
Vishnu kannan 9066253491 [kubelet] rename --cgroups-per-qos to --experimental-cgroups-per-qos to reflect the true nature of that feature
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-11-14 14:06:39 -08:00
Kubernetes Submit Queue 61a5d23e0f Merge pull request #36603 from fabianofranz/fix_lists_in_convert
Automatic merge from submit-queue

Fix handling lists in kubectl convert

Fixes https://github.com/kubernetes/kubernetes/issues/36722

When handling multiple objects in `kubectl convert` (for example in `kubectl convert -f .` with multiple files in current directory) the objects must be managed as a list instead of individually, otherwise `-o yaml|json` will generate invalid format (just multiple json/yaml objects concatenated) which can't be fed to `kubectl create` like in `kubectl convert -f . | kubectl create -f -`.


```release-note
NONE
```
2016-11-14 12:21:16 -08:00
rkouj b85ac95143 Implement CanMount() for gfsMounter for linux 2016-11-14 12:18:06 -08:00
Yu-Ju Hong b73dfe02b5 dockershim: clean up comments 2016-11-14 12:03:00 -08:00
Kubernetes Submit Queue c76fe8dcda Merge pull request #31169 from pweil-/userns-experimental
Automatic merge from submit-queue

Default host user namespace via experimental flag

@vishh @ncdc @pmorie @smarterclayton @thockin 

Initial thought on the implementation https://github.com/kubernetes/kubernetes/pull/30684#issuecomment-241523425 wasn't quite right.  Since we need to dereference a PVC in some cases the defaulting code didn't fit nicely in the docker manager code (would've coupled it with a kube client and would've been messy).  I think passing this in via the runtime config turned out cleaner.  PTAL
2016-11-14 11:04:48 -08:00
Pontus Leitzler f3a5057968 Fix SA2003, deferred Lock right after locking 2016-11-14 17:16:38 +00:00
gmarek c97633b1f5 Add a flag allowing contention profiling of the API server 2016-11-14 17:38:26 +01:00
deads2k baa2418b11 let printer update unstructured list 2016-11-14 10:42:28 -05:00
pweil- d0d78f478c experimental host user ns defaulting 2016-11-14 10:16:03 -05:00
Kubernetes Submit Queue 5c21cc892c Merge pull request #36581 from wojtek-t/fix_service_alloc
Automatic merge from submit-queue

Fix TestServiceAlloc test

Fix #32028
2016-11-14 05:35:00 -08:00
Kubernetes Submit Queue 38cc6df7b3 Merge pull request #36712 from hongchaodeng/e5
Automatic merge from submit-queue

cacher test: fix leftover v2 test server

I think this was dismissed in #30890

@timothysc @wojtek-t
2016-11-14 01:58:18 -08:00
Kubernetes Submit Queue c964641fb3 Merge pull request #36635 from hongchaodeng/e2
Automatic merge from submit-queue

etcd3: remove stale comments in test
2016-11-14 01:15:20 -08:00
Wojciech Tyczynski 03b9be982f Fix TestServiceAlloc test 2016-11-14 10:11:37 +01:00
Kubernetes Submit Queue d5014c3f21 Merge pull request #36696 from brendandburns/azure
Automatic merge from submit-queue

Add support for service load balancer source ranges to Azure load balancers.

@colemickens @kubernetes/sig-network
2016-11-13 21:00:38 -08:00
Pengfei Ni 38955897f7 CRI: add docs for sysctls 2016-11-14 12:19:52 +08:00
Hongchao Deng 32a96b7dc0 pkg/storage: update bazel 2016-11-13 18:34:55 -08:00
Hongchao Deng 1972270f7b cacher test: fix leftover v2 test server 2016-11-13 16:22:24 -08:00
Brendan Burns 610f38cb4a Add support for service address ranges to Azure load balancers. 2016-11-12 20:59:45 -08:00
Hongchao Deng 5da4028aff etcd3: remove stale comments in test 2016-11-12 14:41:47 -08:00
Klaus Ma fec8793b5f Set non-zero exit code on failures for kubectl. 2016-11-12 07:40:54 -05:00
Kubernetes Submit Queue 68a7c2c6b5 Merge pull request #36678 from ymqytw/fix_bug_in_patch
Automatic merge from submit-queue

fix bug when compare version

Fix a small bug when compare version in `patch` which is introduced by my PR #35647 today.

This blocks #36672.

cc: @janetkuo
2016-11-11 23:12:13 -08:00
Kubernetes Submit Queue 76f99d726c Merge pull request #36561 from liggitt/etcd3-watch-zero
Automatic merge from submit-queue

Fix watching from resourceVersion=0 in etcd3 watcher

Fixes https://github.com/kubernetes/kubernetes/issues/36545

* Makes etcd3 consistent with watch cache behavior (all synthetic events sent for the initial list of items result in ADDED events)
* Fixes errors if previous values of initial items had been compacted away
* Removes fan-out Get() for previous values of initial items

Should be fixed before making etcd3 the default (https://github.com/kubernetes/kubernetes/pull/36229)
2016-11-11 22:33:20 -08:00
Kubernetes Submit Queue b85acd957a Merge pull request #36579 from kargakis/restore-events-for-tests
Automatic merge from submit-queue

Restore event messages for replica sets in the deployment controller

Needed to unblock release upgrade tests (see https://github.com/kubernetes/kubernetes/issues/36453)

@kubernetes/deployment ptal
2016-11-11 15:50:31 -08:00
ymqytw af8fbc327d fix bug when compare version 2016-11-11 15:20:15 -08:00
Kubernetes Submit Queue 3e169be887 Merge pull request #35647 from ymqytw/patch_primitive_list
Automatic merge from submit-queue

Fix strategic patch for list of primitive type with merge sementic

Fix strategic patch for list of primitive type when the patch strategy is `merge`.
Before: we cannot replace or delete an item in a list of primitive, e.g. string, when the patch strategy is `merge`. It will always append new items to the list.
This patch will generate a map to update the list of primitive type.
The server with this patch will accept either a new patch or an old patch.
The client will found out the APIserver version before generate the patch.

Fixes #35163, #32398

cc: @pwittrock @fabianofranz 

``` release-note
Fix strategic patch for list of primitive type when patch strategy is `merge` to remove deleted objects.
```
2016-11-11 14:36:44 -08:00
Kubernetes Submit Queue 2822e4fd78 Merge pull request #36651 from mwielgus/evict-from-b1
Automatic merge from submit-queue

Switch pod eviction client from v1alpha1 to v1beta

Generated client 1.5 has a function to evict a pod. The function uses v1alpha1.Eviction object instead of v1beta1. This pr changes the api version that is being used.

cc: @davidopp @caesarxuchao
2016-11-11 12:22:34 -08:00
Kubernetes Submit Queue 8b37baa926 Merge pull request #36616 from jingxu97/Nov/reconstruct-fix
Automatic merge from submit-queue

fix issue in reconstruct volume data when kubelet restarts

During state reconstruction when kubelet restarts, outerVolueSpecName
cannot be recovered by scanning the disk directories. But this
information is used by volume manager to check whether pod's volume is
mounted or not. There are two possible cases:
1. pod is not deleted during kubelet restarts so that desired state
should have the information. reconciler.updateState() will use this
inforamtion to update.
2. pod is deleted during this period, reconciler has to use
InnerVolumeSpecName, but it should be ok since this information will not
be used for volume cleanup (umount)
2016-11-11 11:38:59 -08:00
Jordan Liggitt 7f61d37996
Fix watching from resourceVersion=0 in etcd3 watcher 2016-11-11 11:35:53 -08:00
Marcin 324368ea98 Switch pod eviction client from v1alpha1 to v1beta. 2016-11-11 19:34:29 +01:00
CJ Cullen 1fdb3ee902 Close tunnels after failed healthchecks. 2016-11-11 09:51:51 -08:00
Kubernetes Submit Queue 868f6e1c5c Merge pull request #36585 from jszczepkowski/hpa-unittest2
Automatic merge from submit-queue

More unittests for HPA.
2016-11-11 09:17:06 -08:00
Kubernetes Submit Queue a0dadf16f9 Merge pull request #36316 from derekwaynecarr/pvc_quota_use_informers
Automatic merge from submit-queue

Improve quota performance for pvc by using shared informer

This avoids a list call for each namespace in the resource quota controller when syncing quota.
2016-11-11 05:34:30 -08:00
Michail Kargakis 9afe2c3a7c Do not emit event for AlreadyExists errors 2016-11-11 10:49:05 +01:00
Kubernetes Submit Queue dbb4def470 Merge pull request #36608 from bprashanth/svc_leak
Automatic merge from submit-queue

Ensure health check exists before creating target pool

We already couple health check deletion with target pool deletion in deleteTargetPools, do the inverse in createTargetPools. See https://github.com/kubernetes/kubernetes/issues/35282#issuecomment-259317589 for why this is necessary. Fixes https://github.com/kubernetes/kubernetes/issues/35282, but the test won't go green till I relieve quota on the project.
2016-11-10 20:43:46 -08:00
Kubernetes Submit Queue 850f2bf1fd Merge pull request #35382 from jbeda/nits
Automatic merge from submit-queue

Expand documentation and TODOs in a few packages

I was reading through unfamiliar code and mostly added TODOs and expanded and clarified documentations.

There are a couple of things that are real code changes:
- Removed some unused constants
- Changed `workqueue.Parallize` to clamp the number of worker goroutines to the number of items to be processed.
- Added another unit test to `workqueue.queue`.  I thought I found a bug (I was wrong) and wrote a unit test to isolate.  I figure the extra test is worth keeping.
2016-11-10 17:48:06 -08:00
Kubernetes Submit Queue 6ec02394ab Merge pull request #36448 from jonboulle/criclean
Automatic merge from submit-queue

CRI: general grammar/spelling/consistency cleanup

No semantic changes, but a lot of shuffling of docstrings to make things
more consistent. In particular, standardise on the zeroth-article (i.e.
prefer `// Version` to `// The version`) and ending all docstrings with
periods.


(This knowingly conflicts with #36446 and intentionally omits changing the
Annotations field - I'll rebase this or that respectively as necessary.)
2016-11-10 17:10:12 -08:00
bprashanth a71abdc36d Ensure health check exists before creating target pool 2016-11-10 16:58:45 -08:00
Jing Xu c124830278 fix issue in reconstruct volume data when kubelet restarts
During state reconstruction when kubelet restarts, outerVolueSpecName
cannot be recovered by scanning the disk directories. But this
information is used by volume manager to check whether pod's volume is
mounted or not. There are two possible cases:
1. pod is not deleted during kubelet restarts so that desired state
should have the information. reconciler.updateState() will use this
inforamtion to update.
2. pod is deleted during this period, reconciler has to use
InnerVolumeSpecName, but it should be ok since this information will not
be used for volume cleanup (umount)
2016-11-10 16:23:55 -08:00
Kubernetes Submit Queue 620854b685 Merge pull request #36557 from brendandburns/azure
Automatic merge from submit-queue

Add support for SourceIP preservation in Azure LBs

@thockin @colemickens now that we are setting DSR for Azure LBs this should "just work"
2016-11-10 15:27:38 -08:00
Kubernetes Submit Queue 89ebb2af43 Merge pull request #36551 from timstclair/cvm-system
Automatic merge from submit-queue

Fix getting cgroup pids

Fixes https://github.com/kubernetes/kubernetes/issues/35214, https://github.com/kubernetes/kubernetes/issues/33232

Verified manually, but I didn't have time to run all the e2e's yet (will check it in the morning).

This should be cherry-picked into 1.4, and merged into 1.5 (/cc @saad-ali )

```release-note
Fix fetching pids running in a cgroup, which caused problems with OOM score adjustments & setting the /system cgroup ("misc" in the summary API).
```

/cc @kubernetes/sig-node
2016-11-10 14:50:11 -08:00
Brandon Philips 9216057589 kubectl: add less verbose version
The kubectl version output is very complex and makes it hard for users
and vendors to give actionable information. For example during the
recent Kubernetes 1.4.3 TLS security scramble I had to write a one-liner
for users to get out the version number to give to figure out if they
are vulnerable:

    $ kubectl version | grep -i Server | sed  -n 's%.*GitVersion:"\([^"]*\).*%\1%p'

Instead this patch outputs simply output with `--short`

    ./kubectl version --short
    Client Version: v1.4.3
    Server Version: v1.4.3
2016-11-10 14:07:42 -08:00
Tim St. Clair 3aaa6fca88
BUILD changes for cgroup pids 2016-11-10 13:08:39 -08:00
Tim St. Clair cb588e823c
Fix getting cgroup pids 2016-11-10 13:08:17 -08:00