Commit Graph

11919 Commits (3c0c5ed4e019f2c1aef520a7d1f78763368bede7)

Author SHA1 Message Date
k8s-merge-robot fe135fc251 Merge pull request #24630 from euank/redundant-created
Automatic merge from submit-queue

kubelet: Remove redundant `Container.Created`

As far as I can tell, this has been supplanted by a) the `DockerJSON.CreatedAt` field and b) the
`ContainerStatus.CreatedAt`, where the first is used for creating the
second.

The `.Created` field was only written to as far as I can see.

cc @yifan-gu & @Random-Liu 

Is there any reason we might want to keep this around?
2016-05-08 16:21:05 -07:00
k8s-merge-robot 41b7b04faf Merge pull request #24554 from ingvagabund/dhodovska-events-flag-for-describers
Automatic merge from submit-queue

Introduce events flag for describers

Printing events for a given object is not always needed. Thus, introducing --show-events=false to ``kubectl describe`` to skip events printing.

Fixes: #24239
2016-05-08 14:41:28 -07:00
k8s-merge-robot d4b1b6776a Merge pull request #24557 from swagiaal/attacher-interface
Automatic merge from submit-queue

 Abstract node side functionality of attachable plugins

- Create PhysicalAttacher interface to abstract MountDevice and
  WaitForAttach.
- Create PhysicalDetacher interface to abstract WaitForDetach and
  UnmountDevice.
- Expand unit tests to check that Attach, Detach, WaitForAttach,
  WaitForDetach, MountDevice, and UnmountDevice get call where
  appropriet.

Physical{Attacher,Detacher} are working titles suggestions welcome. Some other thoughts:
- NodeSideAttacher or NodeAttacher.
- AttachWatcher
- Call this Attacher and call the Current Attacher CloudAttacher.
- DeviceMounter (although there are way too many things called Mounter right now :/)

This is to address: https://github.com/kubernetes/kubernetes/pull/21709#issuecomment-192035382

@saad-ali
2016-05-08 14:04:44 -07:00
k8s-merge-robot f40fe7173b Merge pull request #24304 from cjcullen/cacheauth
Automatic merge from submit-queue

Support persisting config from kubecfg AuthProvider plugins

Plumbs through an interface to the plugin that can persist a `map[string]string` config for just that plugin. Also adds `config` to the AuthProvider serialization type, and `Login()` to the AuthProvider plugin interface.
Modified the gcp AuthProvider to cache short-term access tokens in the kubecfg file.

Builds on #23066 
@bobbyrullo @deads2k @jlowdermilk @erictune
2016-05-08 13:27:57 -07:00
k8s-merge-robot 53b3ef2122 Merge pull request #23988 from php-coder/kubectl_describe_multiline_labels
Automatic merge from submit-queue

kubectl describe: show multiple labels/annotations on multiple lines

Small UX improvement: when there is more than one label/annotation, it's more readable to see them on the different lines.

Before:
```console
$ kubectl describe svc
Name:			s2i-test
Namespace:		test2
Labels:			app=s2i-test,foo=bar
...
```
After:
```console
$ kubectl describe svc
Name:			s2i-test
Namespace:		test2
Labels:			app=s2i-test
				foo=bar
...
```
This change affects output of the labels/annotations in many of the sub-commands of the `kubectl describe`.

PTAL @smarterclayton @kargakis
2016-05-08 12:51:45 -07:00
k8s-merge-robot 5988080396 Merge pull request #23795 from mqliang/rc-ns-index
Automatic merge from submit-queue

add namespace index for cache

@wojtek-t 

Implement in this approach make the change of lister.go small, but we should replace all `NewInformer()` to `NewIndexInformer()`, even when someone not want to filter by namespace(eg. gc_controller and scheduler). Any suggestion?
2016-05-08 12:09:01 -07:00
k8s-merge-robot 601e09852c Merge pull request #23590 from kargakis/timeout-logs-attach
Automatic merge from submit-queue

kubectl: more sophisticated pod selection for logs and attach

Trying to get the logs or attach to an object other than a pod
will poll forever if that object has no replicas. This commit adds
a 20s timeout for polling.

@kubernetes/kubectl @deads2k @fabianofranz
2016-05-08 10:51:00 -07:00
k8s-merge-robot f2f3b49f58 Merge pull request #22575 from MikaelCluseau/wip-issue-20466
Automatic merge from submit-queue

Add subPath to mount a child dir or file of a volumeMount

Allow users to specify a subPath in Container.volumeMounts so they can use a single volume for many mounts instead of creating many volumes. For instance, a user can now use a single PersistentVolume to store the Mysql database and the document root of an Apache server of a LAMP stack pod by mapping them to different subPaths in this single volume.

Also solves https://github.com/kubernetes/kubernetes/issues/20466.
2016-05-08 08:45:15 -07:00
k8s-merge-robot 62ef6c9a34 Merge pull request #20490 from swagiaal/auto-supplemental-group-kubelet
Automatic merge from submit-queue

Automatically Add Supplemental Groups from Volumes to Pods

This adds support for a "GID" annotation that one can add to their PVs. When this annotation is seen the kubelet automatically adds the given GID to the list of supplemental groups for the pod to which the PV is attached. This allows admins to create volumes and suggest a GID to use to access the volume. This is needed for volumes which do not support ownership management such as NFS.

@markturansky PTAL
2016-05-08 08:08:01 -07:00
k8s-merge-robot 8217172cd4 Merge pull request #19025 from aveshagarwal/master-imagepull-messages
Automatic merge from submit-queue

Fix parallel image pullers event messages with reasons constants.
2016-05-08 07:31:49 -07:00
k8s-merge-robot 071295c8dc Merge pull request #25088 from ncdc/image-digests
Automatic merge from submit-queue

Handle image digests in node status and image GC

Start including Docker image digests in the node status and consider image digests during image
garbage collection.

@kubernetes/rh-cluster-infra @kubernetes/sig-node @smarterclayton 

Fixes #23917
2016-05-08 06:54:06 -07:00
CJ Cullen 13a7d92d0f Add a ConfigPersister for AuthProvider plugins in kubectl/clients. 2016-05-07 18:15:18 -07:00
CJ Cullen 86293810af Move ModifyConfig (and some related functions) into the clientcmd pkg. 2016-05-07 18:15:18 -07:00
Clayton Coleman 9ebfa1db2f
Add a proto full decode benchmark 2016-05-07 11:55:31 -04:00
Clayton Coleman db5a851d0c
Inline default methods by hand in custom conversions 2016-05-07 11:55:31 -04:00
Clayton Coleman 7104be87cb
Regenerate conversions without reflection defaulting 2016-05-07 11:55:31 -04:00
Andy Goldstein f091ea5eda Handle image digests in node status and image GC
Start including Docker image digests in the node status and consider image digests during image
garbage collection.
2016-05-07 06:50:51 -04:00
k8s-merge-robot 660050631e Merge pull request #25077 from ncdc/pleg-retry
Automatic merge from submit-queue

PLEG: reinspect pods that failed prior inspections

Fix the following sequence of events:

1. relist call 1 successfully inspects a pod (just has infra container)
1. relist call 2 gets an error inspecting the same pod (has infra container and a transient
container that failed to create) and doesn't update the old/new pod records
1. relist calls 3+ don't inspect the pod any more (just has infra container so it doesn't look like
anything changed)

This change adds a new list that keeps track of pods that failed inspection and retries them the
next time relist is called. Without this change, a pod in this state would never be inspected again,
its entry in the status cache would never be updated, and the pod worker would never call syncPod
again because the most recent entry in the status cache has an error associated with it. Without
this change, pods in this state would be stuck Terminating forever, unless the user issued a
deletion with a grace period value of 0.

Fixes #24819 

cc @kubernetes/rh-cluster-infra @kubernetes/sig-node
2016-05-06 22:14:08 -07:00
k8s-merge-robot 3ee833ca3b Merge pull request #25006 from liggitt/third-party-root-scope
Automatic merge from submit-queue

Make ThirdPartyResource a root scoped object

ThirdPartyResource (the registration of a third party type) belongs at the cluster scope. It results in resource handlers installed in every namespace, and the same name in two namespaces collides (namespace is ignored when determining group/kind).

ThirdPartyResourceData (an actual instance of that type) is still namespace-scoped.

This PR moves ThirdPartyResource to be a root scope object. Someone previously using ThirdPartyResource definitions in alpha should be able to move them from namespace to root scope like this:

setup (run on 1.2):
```
kubectl create ns ns1

echo '{"kind":"ThirdPartyResource","apiVersion":"extensions/v1beta1","metadata":{"name":"foo.example.com"},"versions":[{"name":"v8"}]}' | kubectl create -f - --namespace=ns1

echo '{"kind":"Foo","apiVersion":"example.com/v8","metadata":{"name":"MyFoo"},"testkey":"testvalue"}' | kubectl create -f - --namespace=ns1
```

export:
```
kubectl get thirdpartyresource --all-namespaces -o yaml > tprs.yaml
```

remove namespaced kind registrations (this shouldn't remove the data of that type, which is another possible issue):
```
kubectl delete -f tprs.yaml
```

... upgrade ...

re-register the custom types at the root scope:
```
kubectl create -f tprs.yaml
```

Additionally, pre-1.3 clients that expect to read/write ThirdPartyResource at a namespace scope will not be compatible with 1.3+ servers, and 1.3+ clients that expect to read/write ThirdPartyResource at a root scope will not be compatible with pre-1.3 servers.
2016-05-06 20:50:35 -07:00
Robert Bailey 331a2ecb51 Merge pull request #24700 from janetkuo/kubectl-run-help
Clarify limit/requests flags in kubectl run
2016-05-06 20:41:59 -07:00
Robert Bailey a2d8b0af13 Merge pull request #25027 from xiangpengzhao/fix_funcname
Rename a func in manager.go
2016-05-06 20:41:26 -07:00
Matt Liggett e1fa2a08e5 Regenerate everything. 2016-05-06 17:24:54 -07:00
Matt Liggett c00fa39eee Define PodDisruption API types. 2016-05-06 17:24:53 -07:00
Janet Kuo 57c2a28b92 Clarify limit/requests flags in kubectl run 2016-05-06 16:32:43 -07:00
Robert Bailey 0db3ca4b50 Merge pull request #24989 from derekwaynecarr/fix_secret_cmd
Fix kubectl create secret/configmap to allow = values
2016-05-06 15:18:50 -07:00
Robert Bailey b274c5b7de Merge pull request #24843 from derekwaynecarr/graceperiod_override
Allow KillPod to take a gracePeriodOverride
2016-05-06 15:17:56 -07:00
Robert Bailey 385ae07bc6 Merge pull request #24919 from kargakis/avoid-panic-in-mapper
kubectl: avoid panic with nil gvk
2016-05-06 15:07:05 -07:00
Robert Bailey 24c69f0b14 Merge pull request #25211 from lavalamp/leak
Never leak the etcd watcher's translate goroutine
2016-05-06 15:03:21 -07:00
Robert Bailey f01f9f2237 Merge pull request #24955 from AdoHe/output_nil
fix config view output bug
2016-05-06 14:49:43 -07:00
Robert Bailey 375d2ad38c Merge pull request #24164 from sjenning/fix-util-cache
fix immediate evict in cache
2016-05-06 14:43:53 -07:00
Robert Bailey 2493a9de62 Merge pull request #24959 from Random-Liu/fix-flaky-unit-test
Use fake clock in TestGetPodsToSync.
2016-05-06 14:14:02 -07:00
Robert Bailey 76912008b4 Merge pull request #25035 from kargakis/remove-dead-factory-code
kubectl: remove dead factory code
2016-05-06 14:12:26 -07:00
Robert Bailey 2c678f1ec1 Merge pull request #25053 from yujuhong/rm_cahce_update
kubelet: do not force update the runtime cache
2016-05-06 14:11:38 -07:00
Robert Bailey 222eb31f8a Merge pull request #25059 from janetkuo/deployment-availablepods-comment
Fix incorrect comments in IsPodAvailable
2016-05-06 14:11:18 -07:00
Robert Bailey d9a4e9b49c Merge pull request #25071 from zhouhaibing089/clock-fix
allow equality to avoid flaky on clock
2016-05-06 14:10:43 -07:00
Robert Bailey bb08b27e43 Merge pull request #25072 from AdoHe/deprecate_container_port
mark container-port flag as deprecated
2016-05-06 14:10:14 -07:00
Robert Bailey f6a68469f0 Merge pull request #25179 from swagiaal/get-cloud-retries
Move getCloudProvider retries to getCloudProvider()
2016-05-06 14:08:52 -07:00
Robert Bailey 1df0dfdaa8 Merge pull request #25122 from nowprovision/reflector-loop-missing-errorhandler-fix
Handle possible error in client reflector run loops
2016-05-06 14:06:35 -07:00
Robert Bailey 71ab966f99 Merge pull request #25188 from jsafrane/devel/fake-event-recorder-thread-safe
Make fake event recorder thread safe.
2016-05-06 14:05:13 -07:00
Robert Bailey 96aa3d7176 Merge pull request #24929 from mwielgus/heapster_godeps_bump
Update Heapster api types location in Godeps
2016-05-06 13:57:35 -07:00
Robert Bailey 007e4f06a6 Merge pull request #24718 from chengyli/cinder-volume
fix cinder volume dir umount issue #24717
2016-05-06 13:53:30 -07:00
Robert Bailey 303f059efa Merge pull request #24817 from pmorie/clarify-orphaned-cleanup
Clarify orphaned volume cleanup
2016-05-06 13:52:33 -07:00
Robert Bailey 64e1240180 Merge pull request #25141 from jsafrane/devel/fix-store-race
Make threadSafeMap.ListIndexFuncValues thread safe.
2016-05-06 13:50:36 -07:00
Robert Bailey 71706e0ad5 Merge pull request #25206 from yifan-gu/fix_hostport
rkt: When host port is zero, we should not forward the port.
2016-05-06 13:43:56 -07:00
Robert Bailey caf6f06f19 Merge pull request #25244 from smarterclayton/trace_alloc
Trace.Step() performs an unnecessary alloc
2016-05-06 13:43:24 -07:00
Robert Bailey 1474145db1 Merge pull request #24823 from derekwaynecarr/fix-kubelet-typo
Fix function name typo in kubelet
2016-05-06 13:28:45 -07:00
Robert Bailey 7df41be489 Merge pull request #24403 from kargakis/use-platform-agnostic-func
kubectl: use platform-agnostic helper in edit
2016-05-06 13:26:12 -07:00
derekwaynecarr 7bab6999d4 Allow KillPod to take a gracePeriodOverride 2016-05-06 12:14:43 -04:00
k8s-merge-robot 16159b8bd0 Merge pull request #24344 from derekwaynecarr/kubelet-lifecycle-callouts
Automatic merge from submit-queue

Define interfaces for kubelet pod admission and eviction

There is too much code and logic in `kubelet.go` that makes it hard to test functions in discrete pieces.

I propose an interface that an internal module can implement that will let it make an admission decision for a pod.  If folks are ok with the pattern, I want to move the a) predicate checking, b) out of disk, c) eviction preventing best-effort pods being admitted into their own dedicated handlers that would be easier for us to mock test.  We can then just write tests to ensure that the `Kubelet` calls a call-out, and we can write easier unit tests to ensure that dedicated handlers do the right thing.

The second interface I propose was a `PodEvictor` that is invoked in the main kubelet sync loop to know if pods should be pro-actively evicted from the machine.  The current active deadline check should move into a simple evictor implementation, and I want to plug the out of resource killer code path as an implementation of the same interface.

 @vishh @timothysc - if you guys can ack on this, I will add some unit testing to ensure we do the call-outs.

/cc @kubernetes/sig-node @kubernetes/rh-cluster-infra
2016-05-06 08:53:35 -07:00
Clayton Coleman 0e05f704f3
Trace.Step() performs an unnecessary ref
Allocates more objects than necessary.
2016-05-06 11:42:35 -04:00