Commit Graph

247 Commits (8d0187add27be87546347fe46fa426bee6517c3e)

Author SHA1 Message Date
Clayton Coleman c2e90cd154 Support extended pod logging options
Increase the supported controls on pod logging. Add validaiton to pod
log options. Ensure the Kubelet is using a consistent, structured way to
process pod log arguments.

Add ?sinceSeconds=<durationInSeconds>, &sinceTime=<RFC3339>, ?timestamps=<bool>,
?tailLines=<number>, and ?limitBytes=<number>
2015-09-21 15:39:32 -04:00
Federico Simoncelli f21d9ac9e4 Support pods with containers using host ipc
Add a HostIPC field to the Pod Spec to create containers sharing
the same ipc of the host.

This feature must be explicitly enabled in apiserver using the
option host-ipc-sources.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-09-18 21:13:39 +02:00
Jonathan Wills ad085f78fe If an isolator's request is nil, populate it with the limit and vice versa.
The appc spec isn't currently clear about if both fields are required, and before rkt v0.8.1 if either field
was nil it would result in a crash.  Currently rkt will ignore isolators that don't have both fields set, so
I think this is a reasonable approach to making sure isolators are actually used.
2015-09-18 09:51:32 -04:00
Daniel Martí 586cb9126a Move pkg/util.Time to pkg/api/unversioned.Time
Along with our time.Duration wrapper, as suggested by @lavalamp.
2015-09-17 17:51:27 -07:00
k8s-merge-robot 445fde3dc5 Merge pull request #13447 from pweil-/pid-mode
Auto commit by PR queue bot
2015-09-16 23:34:35 -07:00
Yifan Gu ad33db1a84 kubelet/rkt: bump rkt version for rkt image list fix. 2015-09-16 11:31:59 -07:00
Paul Weil ed80c2b940 pid mode 2015-09-15 13:51:44 -04:00
k8s-merge-robot bfc60709b1 Merge pull request #13468 from yifan-gu/rkt_doc
Auto commit by PR queue bot
2015-09-10 20:32:08 -07:00
Daniel Smith 15b30b8b09 Move version agnostic parts of client
pkg/client/unversioned/cache -> pkg/client/cache
pkg/client/unversioned/record -> pkg/client/record
2015-09-10 17:17:59 -07:00
Yifan Gu e7b9c50ba1 kubelet/rkt: add support for different stage1 image.
Also enable grace stop for service files.
2015-09-10 14:58:03 -07:00
Yifan Gu 67e1589a08 kubelet/rkt: add created/started/failed/killing events.
Also improve the logging for rkt command line commands.
2015-08-26 10:39:10 -07:00
Yifan Gu 6ced66249d kubelet/dockertools: clear container reference when killing a container. 2015-08-25 18:22:08 -07:00
Yifan Gu 7767dafb4d kubelet/rkt: include the pod restart count in service file.
Also remove the service file when the pod is killed.
2015-08-25 13:59:18 -07:00
Yifan Gu 763ffdb1fe kubelet/rkt: merge environments instead of overriding.
Merge the environments in container spec and in the image
manifest. Also allow empty app in image manifest.
2015-08-25 13:10:58 -07:00
Sam Abed 995cb15bb6 back off restarts of crashlooping containers
Signed-off-by: Sam Abed <samabed@gmail.com>
2015-08-24 21:43:17 +10:00
Zach Loafman 73d105e22c Merge pull request #12959 from smarterclayton/handle_pods_in_kubelet
Support graceful termination in the Kubelet (5/7)
2015-08-21 16:13:21 -07:00
Yifan Gu a2b148b27b kubelet/rkt: fix rkt version parsing.
Use SemVer to parse the version string.
2015-08-21 10:45:11 -07:00
Clayton Coleman f5c4a3e7a6 Handle graceful termination in the Kubelet
Supports pods that are gracefully deleted on the server being
handled in the Kubelet

preStop is limited to the grace period of the pod in execution.
2015-08-21 10:18:21 -04:00
Saad Ali 9c29733435 Merge pull request #12938 from yifan-gu/rkt_patch_container_log
kubelet/rkt: Add support for fetching per container log.
2015-08-20 17:27:49 -07:00
Saad Ali a90b67f276 Merge pull request #12880 from yifan-gu/pod_status
kubelet: refactor kubecontainer.Pod, remove PodStatus from it.
2015-08-20 17:25:29 -07:00
Saad Ali 9b01580946 Merge pull request #12872 from runningwild/master
Fix several problems with using rkt on gce
2015-08-20 15:46:16 -07:00
Saad Ali 3f66648ada Merge pull request #12832 from yifan-gu/rkt_patch_img
kubelet/rkt: update image related interfaces.
2015-08-20 14:32:55 -07:00
Yifan Gu 045a164362 kubelet/rkt: update image related interfaces.
Add RemoveImage(), ListImages().
Update PullImage(), IsImagePresent().
2015-08-20 11:16:18 -07:00
Yifan Gu 710c34a362 kubelet/rkt: Add support for fetching per container log. 2015-08-19 12:13:04 -07:00
Jonathan Wills 80e799fc0c Allow configuring the rkt binary in a kubelet with a flag.
This is necessary because coreos comes with rkt installed, and if we want to use a different version
we need some way to avoid the default one.
2015-08-19 09:42:13 -04:00
Robert Bailey 08e6a43c1d Revert "Merge pull request #9165 from smarterclayton/graceful"
This reverts commit 4f856b595d, reversing
changes made to d78525a83b.

Conflicts:
	pkg/kubelet/status_manager.go
2015-08-18 17:34:49 -07:00
Yifan Gu 69f796f234 kubelet: refactor kubecontainer.Pod, remove PodStatus from it. 2015-08-18 16:27:22 -07:00
Kris Rousey ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Clayton Coleman b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00
Yifan Gu 558e692f93 kubelet/rkt: minor updates to match rkt v0.7.0. 2015-08-13 18:16:12 -07:00
Filip Grzadkowski 3f7b54cbdb Merge pull request #11669 from pweil-/sc-nonroot
add non-root directive to SC and kubelet checking
2015-08-11 10:30:53 +02:00
Yifan Gu 7e5cfd137a Godeps: bump appc/spec to v0.6.1+git. 2015-08-10 11:21:28 -07:00
Paul Weil e490c20c22 add non-root directive to SC and kubelet checking 2015-08-10 13:30:34 -04:00
Tamer Tas f5d5befe17 Add documentation for pkg/kubelet/rkt 2015-08-10 19:34:36 +03:00
Veres Lajos 9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
Mike Danese fe6b15ba2f rewrite all links to issues to k8s links 2015-08-05 21:11:11 -07:00
Mike Danese 17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese 8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Brendan Burns 64be76c14d Add support for Attach to the kubelet.
This is a pre-cursor to supporting 'kubectl attach ...' and 'kubectl run -it ...'
2015-07-27 21:48:55 -07:00
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
Clayton Coleman 72ee028cab Gracefully delete pods from the Kubelet
This commit wires together the graceful delete option for pods
on the Kubelet.  When a pod is deleted on the API server, a
grace period is calculated that is based on the
Pod.Spec.TerminationGracePeriodInSeconds, the user's provided grace
period, or a default.  The grace period can only shrink once set.
The value provided by the user (or the default) is set onto metadata
as DeletionGracePeriod.

When the Kubelet sees a pod with DeletionTimestamp set, it uses the
value of ObjectMeta.GracePeriodSeconds as the grace period
sent to Docker.  When updating status, if the pod has DeletionTimestamp
set and all containers are terminated, the Kubelet will update the
status one last time and then invoke Delete(pod, grace: 0) to
clean up the pod immediately.
2015-06-01 19:23:59 -04:00
Chao Xu 2f6e5e2e08 Update ContainerState.Termination to ContainerState.Terminated in pkg/api/types.go and pkg/api/v1/types.go 2015-05-28 17:18:24 -07:00
Brendan Burns 2ec4b409e1 Make exec more consistent with the rest of the kubectl commands. 2015-05-27 15:47:32 -07:00
Yifan Gu 6a5681e0fe kubelet: Move HashContainer to kubelet/container package. 2015-05-20 12:08:32 -07:00
Daniel Smith 181124bc9b Merge pull request #7974 from deads2k/attach-pull-secrets-to-pods
Attach pull secrets to pods
2015-05-19 10:26:39 -07:00
Tim Hockin 65833e42c4 rename CapabilityType Capability 2015-05-18 17:21:30 -07:00
Paul Morie a58c7a0de7 rename rkt makeruntimePod 2015-05-18 19:24:10 -04:00
deads2k 0c14e0cbdb add pull secret references to pods 2015-05-18 16:18:16 -04:00
Yifan Gu aa7393b55e kubelet/rkt: Fix rkt status parsing, and resource requirement convertion. 2015-05-15 13:42:36 -07:00
Yifan Gu daf7c8d686 kubelet/rkt: Use RunContainerOptions to get the arguments. 2015-05-14 12:03:11 -07:00
Yifan Gu 2a87d56171 kubelet/rkt: Add getImageManifest() to retrive the image manifest for container. 2015-05-14 12:03:11 -07:00
Brendan Burns fbd0143fa8 Merge pull request #7971 from deads2k/make-docker-keyring-handle-multiple-hits
make the dockerkeyring handle mutiple matching credentials
2015-05-11 17:01:37 -07:00
deads2k 2ecb0ebd73 make the dockerkeyring handle mutiple matching credentials 2015-05-11 09:54:03 -04:00
Deyuan Deng 2f7183cba5 Check Pod privileged container 2015-05-09 17:30:35 -04:00
Yifan Gu 8b1174a3a7 kubelet/container: Move pty*.go to container runtime package.
This makes the labeld pty wrapper available for both container runtime.
2015-05-07 23:36:47 -07:00
Yifan Gu 41f8c79490 kubelet/rkt: Remove build label.
As we removed the linux specific dependency, now rkt can be built
on other platforms as well.
2015-05-07 13:42:05 -07:00
Victor Marmol 35c644a45f Merge pull request #7870 from yifan-gu/rkt_volume
Add volumeGetter to rkt.
2015-05-07 08:58:00 -07:00
Yifan Gu a8f86da35b kubelet/rkt: Add volumeGetter to rkt.
This enable rkt to fetch the volume mounts by the kubelet.
2015-05-06 19:30:33 -07:00
Victor Marmol f6b7029475 Merge pull request #7859 from yifan-gu/rkt_remove_store
kubelet/rkt: Remove dependencies on rkt.store
2015-05-06 17:45:29 -07:00
Victor Marmol d6ea33fbb5 Merge pull request #7849 from yifan-gu/rkt_components
kubelet/rkt: Inject dependencies to rkt.
2015-05-06 16:00:02 -07:00
Yifan Gu 8cbe8938c9 kubelet/rkt: Remove getImageID().
Replace getImageID() with getImageByName(), this can remove the
dependency on rkt.store.
2015-05-06 15:59:31 -07:00
Paul Morie df08b15121 Change signature of container runtime PullImage to allow pull w/ secret 2015-05-06 17:42:03 -04:00
Yifan Gu dee060c8fd kubelet/rkt: Inject dependencies to rkt.
Add necessary components rkt.
2015-05-06 11:28:01 -07:00
Jerzy Szczepkowski 4d655e3fcf Merge pull request #7803 from yifan-gu/rkt_docker_image
kubelet/rkt: Add docker prefix to image string.
2015-05-06 09:22:50 +02:00
Zach Loafman 875e83a741 Revert "Revert "Security context - types, kubelet, admission"" 2015-05-05 16:02:13 -07:00
Zach Loafman 3fcea23185 Revert "Revert "Revert "Kubelet: Add rkt as a runtime option""" 2015-05-05 15:55:12 -07:00
Yifan Gu ec68f1a85a kubelet/rkt: Add docker prefix to image string.
This change makes rkt to run only docker image for now,
which enables us to test with all existing pods.
2015-05-05 15:41:13 -07:00
Zach Loafman 92ca92f43a Revert "Revert "Kubelet: Add rkt as a runtime option"" 2015-05-05 15:28:09 -07:00
Zach Loafman f48904fd5e Revert "Security context - types, kubelet, admission" 2015-05-05 15:20:39 -07:00
Zach Loafman 6016408096 Revert "Kubelet: Add rkt as a runtime option" 2015-05-05 15:15:15 -07:00
Yu-Ju Hong b2c0ea37b4 Merge pull request #7743 from vmarmol/runtime-switch
Kubelet: Add rkt as a runtime option
2015-05-05 13:36:46 -07:00
Victor Marmol 5d0e5d7d61 Inject dependencies to rkt 2015-05-05 10:55:11 -07:00
Paul Weil 982bf19c20 security context initial implementation - squash 2015-05-05 13:46:13 -04:00
Victor Marmol d84aac6498 rkt: Unexport runtime, use Runtime interface 2015-05-04 17:28:02 -07:00
Victor Marmol f012d7f506 Add unsupported version of rkt. 2015-05-04 17:22:45 -07:00
Victor Marmol de2212983f Refactor rkt into one file.
This will make it easy to add build labels and stub out in non-Linux
builds.
2015-05-04 16:51:31 -07:00
Victor Marmol ba7e940a57 Make rkt implement the container Runtime 2015-05-04 11:16:33 -07:00
Victor Marmol e44d9df0f4 Changes to rkt's PortForward to match Runtime API. 2015-05-04 11:16:33 -07:00
Victor Marmol 79fc8bee34 Change GetContainerLogs() signature.
This works for both runtimes. We need to eventually unify the ID scheme
for this method.
2015-05-04 11:16:32 -07:00
Victor Marmol 60a77221f5 Add dummy ListImages and RemoveImage to rkt runtime. 2015-05-04 11:14:54 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Yifan Gu 1b77615deb kubelet/rkt: Add SyncPod() to rkt. 2015-05-01 13:02:05 -07:00
Yifan Gu 428652bdc7 kubelet/rkt: Add KillPod() and GetPodStatus() for rkt. 2015-04-30 18:32:32 -07:00
Victor Marmol 03b5c32576 Merge pull request #7553 from yifan-gu/rkt_runner
kubelet/rkt: Add RunInContainer()/ExecInContainer()/PortForward().
2015-04-30 18:31:08 -07:00
Yifan Gu 9ce568a142 kubelet/rkt: Add GetPods() for rkt. 2015-04-30 18:00:18 -07:00
Yifan Gu 1636fd2e1c kubelet/rkt: Add RunPod() for rkt. 2015-04-30 17:31:35 -07:00
Yifan Gu 2e4be0bcf1 kubelet/rkt: Add RunInContainer()/ExecInContainer()/PortForward(). 2015-04-30 17:25:16 -07:00
Victor Marmol 262c34e7db Merge pull request #7543 from yifan-gu/pod_manifest
kubelet/rkt: Add routines for converting kubelet pod to rkt pod.
2015-04-30 17:18:19 -07:00
Victor Marmol df8490f52f Merge pull request #7555 from yifan-gu/rkt_pod_info
kubelet/rkt: Add podInfo.
2015-04-30 17:04:51 -07:00
Yifan Gu 7e8afc7c96 kubelet/rkt: Add routines for converting kubelet pod to rkt pod. 2015-04-30 15:24:47 -07:00
Victor Marmol 0e89d65563 Merge pull request #7545 from yifan-gu/getlog
Getlog
2015-04-30 15:15:44 -07:00
Victor Marmol 57cc1218ca Merge pull request #7549 from yifan-gu/rkt_gc
Rkt gc
2015-04-30 15:15:07 -07:00
Yifan Gu 01841a8c19 kubelet/rkt: Add podInfo.
podInfo reprensents the state of rkt pods.
It is used to for reporting the pod and container status to kubelet.
2015-04-30 14:39:10 -07:00
Yifan Gu ca4643ef31 kubelet/rkt: Add GetContainerLogs() for rkt. 2015-04-30 10:31:31 -07:00
Yifan Gu 488f49a216 kubelet/rkt: Add GarbageCollection to rkt runtime. 2015-04-30 10:29:38 -07:00
Yifan Gu 01693c8233 kubelet/rkt: Add PullImage()/IsImagePresent() to rkt runtime. 2015-04-30 10:01:24 -07:00
Yifan Gu 305345efe1 kubelet/rkt: Add basic rkt runtime routines. 2015-04-29 17:09:32 -07:00