Commit Graph

159 Commits (f34a24e98e7c837b567b78be3af958ac1156cd80)

Author SHA1 Message Date
goltermann 34d4eaea08 Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Prashanth Balasubramanian 7e88b3ec84 Remove ttl store from controllers. 2016-02-24 14:06:22 -08:00
k8s-merge-robot be9dfcaec4 Merge pull request #21210 from mqliang/hasSync-early
Auto commit by PR queue bot
2016-02-20 09:54:12 -08:00
mqliang ced5eb7a71 return early if has not synced 2016-02-18 11:56:52 +08:00
Chao Xu ad46715f51 generate fake client for release_1_2 2016-02-17 16:10:02 -08:00
Chao Xu 97aecd002a remove underscore in imported pkg names 2016-02-16 10:54:51 -08:00
Jan Chaloupka 4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
Mike Danese b1743a6887 this is a manual reversion of #20702
I can't revert with github which says "Sorry, this pull request couldn’t be
reverted automatically. It may have already been reverted, or the content may
have changed since it was merged."

Reverts commit: 0c191e787b
2016-02-05 16:34:02 -08:00
Chao Xu 184440f8ef rename release_1_2 to internalclientset 2016-02-05 14:02:28 -08:00
gmarek 0c191e787b Split controller flags between controllers 2016-02-05 12:17:51 +01:00
Daniel Smith d84ac764a9 Merge pull request #20492 from erictune/labselunver
Move extensions.LabelSelector to unversioned
2016-02-04 23:17:40 -08:00
Chao Xu 1b047f8e67 rename legacy to core 2016-02-04 14:26:56 -08:00
Eric Tune 6133cb1f21 Move extensions.LabelSelector to unversioned.
Move type LabelSelector and type LabelSelectorRequirement from pkg/apis/extensions
This avoids an import loop when Job (and later DaemonSet, Deployment, ReplicaSet)
are moved out of extensions to new api groups.

Also Move LabelSelectorAsSelector utility from pkg/apis/extensions/ to pkg/api/unversioned/
Also its test.
Also LabelSelectorOp* constants.
Also the pkg/apis/extensions/validation functions ValidateLabelSelectorRequirement and
ValidateLabelSelector move to pkg/api/unversioned

The related type in pkg/apis/extensions/v1beta1/ is staying there.  I might move
it in another PR if neccessary.
2016-02-04 13:46:34 -08:00
Chao Xu f9f5736b01 grep sed 2016-02-03 13:06:07 -08:00
harry 1032067ff9 Replace runtime reference by pkg 2016-02-01 21:06:44 +08:00
Chao Xu c72d234bbf replacing handwritten client in several controllers 2016-01-31 15:42:02 -08:00
Clayton Coleman 38c7eded99 Prepare for content-type negotiation
Combine the fields that will be used for content transformation
(content-type, codec, and group version) into a single struct in client,
and then pass that struct into the rest client and request. Set the
content-type when sending requests to the server, and accept the content
type as primary.

Will form the foundation for content-negotiation via the client.
2016-01-26 17:44:30 -05:00
Eric Tune 53ee76fe1a Support Work Queue jobs with variable parallelism
When job.spec.completions is nil, only
one task needs to succeed for the job to succeed,
and parallelism can be scaled freely during runtime.

Added tests.

Release Note:

This causes two minor changes to the API.

First, unset parallelism previously was defaulted to be
equal to completions.  Now it always defaults to 1 if unset.

Second, having parallelism=N and completions unset would previously
be defaulted to 1 completion and N parallelism.
(this is not something we expect people to do, though)
Now, no defaulting occurs in that case, and the job's
behavior is different (any completion causes success).
2016-01-22 14:57:51 -08:00
Michail Kargakis dd84bba64c Fix job status conditions bloat
When a job is complete, the controller will indefinitely update its conditions
with a Complete condition. This change makes the controller exit the
reconcilation as soon as the job is already found to be marked as complete.
2016-01-12 16:41:44 +01:00
jiangyaoguo 91e0bbebfb emit event when controller delete pod 2015-12-21 02:11:55 +08:00
Maciej Szulik 327c104460 Added ActiveDeadlineSeconds to jobs, allowing failing a job after
exceeding allowed time.
2015-12-17 15:26:42 +01:00
Wojciech Tyczynski 960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
Wojciech Tyczynski b0fcb5adef Pass ListOptions to List in ListWatch. 2015-12-07 11:53:53 +01:00
Salvatore Dario Minonne 80575c3093 renaming PodSelector to LabelSelector 2015-12-04 09:49:08 +01:00
Wojciech Tyczynski 6dcb689d4e Simplify List() signature in clients. 2015-12-03 09:54:07 +01:00
k8s-merge-robot 8a8639d7af Merge pull request #17863 from wojtek-t/only_list_options_in_watch
Auto commit by PR queue bot
2015-12-02 06:28:28 -08:00
Wojciech Tyczynski 8343c8ce6c Pass ListOptions to List() methods. 2015-12-01 15:00:36 +01:00
Wojciech Tyczynski d2dfc912e6 Simplify Watch() signature in clients. 2015-12-01 14:19:26 +01:00
Wojciech Tyczynski b6ef62af24 Use unversioned.ListOptions in clients. 2015-11-24 16:52:09 +01:00
deads2k a87d927588 update client.Config to use GroupVersion 2015-11-21 08:29:26 -05:00
Eric Tune a600ac0cca Revert "An attempt to fix flake in TestControllerSyncJob (14500)" 2015-10-30 08:56:11 -07:00
Wojciech Tyczynski d47e21f19f Reuse TCP connections in Reflector between resync periods. 2015-10-26 19:35:25 +01:00
k8s-merge-robot 55cbba3e51 Merge pull request #16234 from erictune/job-unit-fix
Auto commit by PR queue bot
2015-10-25 01:42:07 -07:00
Wojciech Tyczynski f4d75e0a0a Support timeout in watch requests 2015-10-24 13:12:49 +02:00
Eric Tune 07fb3c2759 Fix jobs unittest flakes.
Sometimes the test would
generate two identical pod names
using the Now().UnixNano() function.
Apparently the Nanos are rounded.

Passed 2000 unittest runs.
2015-10-24 00:54:45 -07:00
Maciej Szulik 1ee20363e0 An attempt to fix flake in TestControllerSyncJob (14500) 2015-10-19 12:46:33 +02:00
Mike Danese a7a54cac74 move job to generalized label selector 2015-10-15 07:42:58 -07:00
Maciej Szulik 98fa29adfd Make PodTemplateSpec for Job not a pointer, since it's a required field 2015-10-14 11:37:11 +02:00
Chao Xu 493d2b6920 grep sed Experimental() 2015-10-13 13:22:54 -07:00
eulerzgy 4ed5f9d240 adjust package name for pkg/controller directory 2015-10-12 09:51:27 +08:00
Chao Xu 7c9f4cc42f experimental. -> extensions. 2015-10-09 15:49:10 -07:00
Chao Xu 67f316dd19 apis/experimental->apis/extensions 2015-10-09 15:04:41 -07:00
Mike Danese 73f7242027 rename JobStatus.Unsuccessful => JobStatus.Failed, JobStatus.Successful => JobStatus.Succeeded 2015-10-08 10:41:22 -07:00
Wojciech Tyczynski df79026b79 Extend resyncPeriods in controllers in production. 2015-10-08 09:10:09 +02:00
Alex Robinson 9419bfb402 Merge pull request #14937 from krousey/flaky_job_controller
Removing custom test timeout
2015-10-05 10:34:34 -07:00
Kris d0aa9dfbc7 Removing custom test timeout 2015-10-01 14:35:58 -07:00
deads2k 4cc63313e7 fix testclient prepend functions 2015-09-29 08:03:52 -04:00
Mike Danese 824768d604 consolidate a bunch of FakePodControl testclients into a shared one 2015-09-24 23:21:20 -07:00
Chao Xu ae1293418b move experimental/v1 to experimental/v1alpha1;
use "group/version" in many places where used to expect "version" only.
2015-09-24 15:32:11 -07:00
Eric Tune 95a44be2ef Job status updates.
Added status REST storage.
Added validation for Status Updates.
Changed job controller to update status rather than just job
(which ignores status updates).
2015-09-22 11:39:35 -07:00
Eric Tune c99df5e3a4 Log the error when unable to update job. 2015-09-21 21:26:06 -07:00
Mike Danese 0ae2334a4f sort jobs by creation timestamp to make getPodJob deterministic 2015-09-18 14:48:22 -07:00
Mike Danese 5965760751 change log level on a lot of glog calls in job controller 2015-09-18 14:48:22 -07:00
Mike Danese 267cc9de91 serialize access to active with a lock 2015-09-18 14:48:22 -07:00
Mike Danese e29e606792 make JobController RestartPolicy independent 2015-09-18 11:48:47 -07:00
Mike Danese 22072af90d rename jobmanager to jobcontroller 2015-09-18 11:48:47 -07: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
Maciej Szulik 8cefa2ee55 Job controller logic 2015-09-17 10:05:33 +02:00