Commit Graph

47 Commits

Author SHA1 Message Date
James DeFelice
8c776b7eb9 host port mapping should be more consistent between scheduler and
controller-manager in k8sm:
  - rename host_port_endpoints flag to host-port-endpoints
  - host port mapping strategy in scheduler should be driven by host-port-endpoints flag
  - added host-port-endpoints to known flags
  - docs: scheduler should also be configured with host-port-endpoints
  - task recovery: be explicit about excluding mirror pods
2016-02-15 21:28:46 +00:00
James DeFelice
fc1c43507e inject MESOS_EXECUTOR_CONTAINER_UUID envvar into all docker containers
spawned by kubelet: static and non-static pod user containers, as well
as pod infrastructure containers.
2016-02-10 18:20:52 +00:00
Jan Chaloupka
4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
Fabio Yeon
7205a160ac Remove all instances of "/tmp" from unit tests and replace with a common
tmp directory creator. Exception is documented.
2016-01-27 16:11:22 -08:00
Clayton Coleman
33085c0cf2 Update tests to handle codec changes 2016-01-22 13:27:26 -05:00
James DeFelice
b2013cb1ba replace pod-observer and check-for-lost-pod polling with a single pod watcher and task registry 2016-01-20 18:53:34 +00:00
David Oppenheimer
8ac484793d Comment out calls to httptest.Server.Close() to work around
https://github.com/golang/go/issues/12262 . See #19254 for
more details. This change should be reverted when we upgrade
to Go 1.6.
2016-01-11 23:02:11 -08:00
Sergiusz Urbaniak
67e98fcfa8 executor, scheduler: make default pod roles configurable
Currently if a pod is being scheduled with no meta.RolesKey label
attached to it, per convention the first configured mesos (framework)
role is being used.

This is quite limiting and also lets e2e tests fail. This commit
introduces a new configuration option "--mesos-default-pod-roles" defaulting to
"*" which defines the default pod roles in case the meta.RolesKey pod
label is missing.
2015-12-14 15:18:39 +01:00
Wojciech Tyczynski
960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
James DeFelice
af95e3fe0e - forward updated labels/annotations for downward API compat
- refactor queue.Pod construction to take functional options, privatize Pod fields
- refactor DelayFIFO and HistoricalFIFO to offer consistent, more useful Pop() funcs
- refactor pod update processing changes; long term we should somehow combine with the special pod config source that we are using for mirror pods
- task launch timer cleanup
2015-12-11 13:15:06 +00:00
Wojciech Tyczynski
a915b8b29a Merge pull request #18080 from wojtek-t/list_options_in_listwatch
Pass ListOptions to List in ListWatch.
2015-12-09 14:27:51 +01:00
deads2k
2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
Wojciech Tyczynski
b0fcb5adef Pass ListOptions to List in ListWatch. 2015-12-07 11:53:53 +01:00
k8s-merge-robot
7644d34759 Merge pull request #15775 from mesosphere/sur-k8sm-482-resource-roles
Auto commit by PR queue bot
2015-12-01 05:36:52 -08:00
Wojciech Tyczynski
b6ef62af24 Use unversioned.ListOptions in clients. 2015-11-24 16:52:09 +01:00
Sergiusz Urbaniak
9eae47c6e6 scheduler: implement role awareness 2015-11-23 17:27:14 +01:00
deads2k
a87d927588 update client.Config to use GroupVersion 2015-11-21 08:29:26 -05:00
James DeFelice
3d3577b9f3 rewrite of static pod json zipper
- add busybox static pod to mesos-docker cluster
- customize static pods with binding annotations
- code cleanup
- removed hacky podtask.And func; support minimal resources for static pods when resource accounting is disabled
- removed zip archive of static pods, changed to gzip of PodList json
- pod utilities moved to package podutil
- added e2e test
- merge watched mirror pods into the mesos pod config stream
2015-11-13 23:30:26 +00:00
Dr. Stefan Schimanski
60cc93fff8 Remove ExecutorInfo from podtask.T and create it with the TaskInfo 2015-11-12 01:33:50 +01:00
Wojciech Tyczynski
d47e21f19f Reuse TCP connections in Reflector between resync periods. 2015-10-26 19:35:25 +01:00
Dr. Stefan Schimanski
ae7830b4be Pass Mesos cpu and mem values to cadvisor 2015-10-10 21:19:08 +02:00
Dr. Stefan Schimanski
0d8384c820 Replace all executor_test timeouts by util.ForeverTestTimeout 2015-10-10 11:54:27 +02:00
Dr. Stefan Schimanski
a60df400fd Decouple executor initialization from kubelet
This patch reduces the dependencies of the executor from the kubelet. This
makes it possible launch the kubelet after the executor.

This considerably reduces the complexity of the startup code.

Moreover, this work is a requirement to use a standalone kubelet some day.
2015-10-10 11:54:27 +02:00
Dr. Stefan Schimanski
efdd726027 Un-knot static pods creation in executor 2015-10-10 11:54:27 +02:00
Dr. Stefan Schimanski
686b767f28 Remove redundant kubelet dependency of executor 2015-10-10 11:54:27 +02:00
Dr. Stefan Schimanski
9366ac4143 Pass PodLW to executor in tests 2015-10-10 11:54:27 +02:00
Yu-Ju Hong
a3e60cc32e Rename imported package local name kubeletTypes to kubetypes
According to the naming guidelines, package name should not include mixedCaps.
2015-10-09 10:24:31 -07:00
Yu-Ju Hong
098ab05997 kubelet: move common types to kubelet/types
This would faciliate tasks such as moving code in pkg/kubelet to sub packages.
2015-10-08 14:38:01 -07:00
k8s-merge-robot
0525e6e1e6 Merge pull request #14121 from mesosphere/sttts-extract-suicide-code
Auto commit by PR queue bot
2015-09-21 01:14:00 -07:00
Dr. Stefan Schimanski
a9d7acea39 Move suicide logic into its own file 2015-09-18 16:54:56 +02:00
Kris
f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
Daniel Smith
b225c1d47a Run gofmt (separate commit for easy rebases) 2015-09-10 17:17:59 -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
Chao Xu
9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Kris Rousey
ae6c64d9bb Moving everyone to unversioned client 2015-08-18 10:23:03 -07:00
Veres Lajos
9f77e49109 typofix - https://github.com/vlajos/misspell_fixer 2015-08-08 22:31:48 +01:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
nikhiljindal
274792d7bb Stop exposing v1beta3 by default 2015-07-01 14:38:02 -07:00
Maxwell Forbes
712f303350 Merge pull request #9736 from sdminonne/bug_fix2
To add validation for service ports when defined as string
2015-06-25 19:37:04 -07:00
Kris Rousey
d13421e084 Removing ContainerManifest 2015-06-24 11:31:34 -07:00
Salvatore Dario Minonne
4b13faa346 To add validation for service ports when defined as string (fixing issue #9734) 2015-06-22 17:21:51 +02:00
Dr. Stefan Schimanski
7abe12d6f4 Fix flaky mesos executor test
The TestExecutorFrameworkMessage test sends a "task-lost:foo" message to the
executor in order to mark a pod as lost. For that the pod must be running first.
Otherwise, the executor code will send "TASK_FAILED" status updates, not "TASK_LOST".

Before this patch there was no synchronization between the pod startup and the
test case. Moreover, in order to startup a task a working apiserver URL must be
passed to the executor which was not the case either.

Fixes mesosphere/kubernetes-mesos#351
2015-06-16 09:08:23 +02:00
Joerg Schad
7af8bf6ed3 Add static pod support to mesos scheduler and executor.
- the mesos scheduler gets a --static-pods-config parameter with a directory with
  pods specs. They are zipped and sent over to newly started mesos executors.
- the mesos executor receives the zipper static pod config via ExecutorInfo.Data
  and starts up the pods via the kubelet FileSource mechanism.
- both - the scheduler and the executor side - are fully unit tested
2015-06-15 17:24:54 +00:00
James DeFelice
f956f23d37 move the container name fix to NewTestPod to avoid breakage in other unit tests in the future 2015-06-15 14:30:48 +00:00
James DeFelice
5e4992aa5e fix broken TestExecutorLaunchAndKillTask unit test 2015-06-14 03:38:29 +00:00
James DeFelice
b8b91fd169 skip flakey unit test for now 2015-06-13 04:25:19 +00:00
James DeFelice
932c58a497 Kubernetes Mesos integration
This commit includes the fundamental components of the Kubernetes Mesos
integration:

* Kubernetes-Mesos scheduler
* Kubernetes-Mesos executor
* Supporting libs

Dependencies and upstream changes are included in a separate commit for easy
review.

After this initial upstream, there'll be two PRs following.

* km (hypercube) and k8sm-controller-manager #9265
* Static pods support #9077

Fixes applied:

- Precise metrics subsystems definitions
  -  mesosphere/kubernetes-mesos#331
  - https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion_r31875232
  - https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion_r31875240
- Improve comments and add clarifications
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875208
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875226
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875227
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875228
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875239
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875243
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875234
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875256
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875255
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875251
- Clarify which Schedule function is actually called
  - Fixes https://github.com/GoogleCloudPlatform/kubernetes/pull/8882#discussion-diff-31875246
2015-06-10 20:58:39 +00:00