Commit Graph

73 Commits

Author SHA1 Message Date
Brian Grant
73322af8e8 Merge pull request #5842 from simon3z/rc-annotation
Replica Controller Name Annotation in Pods
2015-04-23 16:35:18 -07:00
Yu-Ju Hong
10ecbb8aab Fix pod filtering in replication controller 2015-04-22 16:09:14 -07:00
Federico Simoncelli
253ce4b6fe replication: annotate replicated pods with controller name
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-04-22 11:26:25 -04:00
Brian Grant
15c2986a07 Merge pull request #7067 from ravigadde/master
Added field selector for listing pods
2015-04-22 07:12:21 -07:00
Yu-Ju Hong
df2cbd4877 Prioritize deleting the non-running pods when reducing replicas
This changes instructs the replication controller to delete replicas in the
order of "unscheduled (pending)", "scheduled (pending)", and "scheduled
(running)" pods. This is less disruptive than deleting random pods.
2015-04-21 10:17:29 -07:00
Ravi Gadde
bf8f258471 Added field selector for listing pods. 2015-04-21 06:33:28 -07:00
Kris Rousey
594f514843 Changing a few remaining instances of passing pods around by value. I
avoided changing api.PodList.Items to []*api.Pod.
2015-04-20 15:26:45 -07:00
derekwaynecarr
986c225311 Replication controller gives failedCreate events 2015-04-14 15:42:49 -04:00
Prashanth Balasubramanian
ef6601646d Migrate replication controllers to generic etcd 2015-03-23 17:59:25 -07:00
Salvatore Dario Minonne
31ddefc347 Finalize fields.Selector 2015-03-17 22:55:43 +01:00
Wojciech Tyczynski
07cf658100 Remove etcd references from ReplicationController 2015-03-13 10:36:54 +01:00
Prashanth Balasubramanian
28d9260c0b Sync replication count with the api server on pod creation/deletion. 2015-03-11 13:29:20 -07:00
Prashanth Balasubramanian
1970c2d201 Retry resizing replication controllers in kubectl 2015-03-02 20:26:41 -08:00
Steve Reed
38230ef12f Adds replication controller name to "Too many|few" logging 2015-02-12 09:18:56 -08:00
Brendan Burns
234f951867 Revert filtering unknown pods, as I believe that it is causing e2e flakes. 2015-02-05 20:57:01 -08:00
Brian Grant
7a13c2f0e3 Merge pull request #4169 from brendandburns/shell_sucks
Fix a regression where we never cleared out failed nodes.
2015-02-05 13:41:11 -08:00
Brendan Burns
6d0b8ea7a7 Fix a regression where we never cleared out failed nodes. 2015-02-05 10:55:57 -08:00
Brendan Burns
874859f6d3 Make the replication controller more resilient to event expiration in watch. 2015-02-03 22:15:12 -08:00
Dan Mace
3d7f5cc642 Backport annotations to PodTemplateSpec
Backport annotation support to v1beta1 and v1beta2 PodTemplateSpec. This
allows ReplicationController users to specify annotations for Pods in
addition to labels.
2015-02-02 15:26:32 -05:00
Clayton Coleman
5603714df8 Use name generation on pods via replication controllers
The generated name is '<controllerName>-%s', unless controllerName-
would be long enough to cause a validation error.
2015-02-02 14:44:53 -05:00
Clayton Coleman
19987612bf Replace code that eats errors with a more consistent reporting
In order to allow certain programmer error / unexpected error states
to be captured, replace sections that log and eat errors with a method
that can be centrally replaced.  This captures two common error sources,
replication errors, and apiserver code that returns invalid errors.
2015-01-26 20:54:29 -05:00
Clayton Coleman
e4dcbb6edb Explicitly handle errors received during watch
Log them as Error and then continue.
2015-01-19 11:10:45 -05:00
Brian Grant
9b539262a8 Count only non-dead pods in replicationController current state replicas count. 2014-12-12 22:23:14 +00:00
markturansky
8159c8fd25 Refactor PodCondition to PodPhase 2014-11-21 15:28:38 -05:00
Tim Hockin
ea960711ff Clean up error logs.
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines).  Just accumulated nits.
2014-11-21 09:45:26 +08:00
markturansky
8af4ccb111 v1beta3 Pod refactor 2014-11-18 09:25:42 -05:00
Daniel Smith
0348a67413 Merge pull request #2195 from smarterclayton/prepare_pod_template_v1beta3
Allow an internal pod template reference or object
2014-11-12 10:55:08 -08:00
Clayton Coleman
8a59000472 Warn if pod has no labels 2014-11-11 17:03:20 -05:00
Clayton Coleman
94c873e7a4 Remaining refactor for PodTemplateSpec and fixing test cases 2014-11-11 17:03:20 -05:00
Brendan Burns
2c1221864d Make a standalone binary. 2014-11-10 13:34:11 -08:00
markturansky
119f654a13 Refactor PodStatus to PodCondition in internal API for v1beta3 2014-11-05 17:26:47 -05:00
Tim Hockin
37ffb41b81 Merge pull request #1830 from markturansky/label_validation
add RFC952 validation to labels
2014-10-27 09:54:18 -07:00
markturansky
e2365b1f96 add RFC952 label validation 2014-10-24 16:01:52 -04:00
derekwaynecarr
580cb5ea4f Rework client.Interface 2014-10-24 11:47:30 -04:00
Clayton Coleman
1ffc82dfe6 createPod should copy the labels, not edit them in place 2014-10-24 11:22:21 -04:00
Clayton Coleman
bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Clayton Coleman
82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
derekwaynecarr
fc67d822c6 Add context as parameter to client interface functions 2014-10-02 12:51:36 -04:00
Clayton Coleman
4e56dafecc Introduce some default log verbosity control
Move a lot of common error logging into better buckets:

glog.Errorf() - Always an error
glog.Warningf() - Something unexpected, but probably not an error
glog.V(0) - Generally useful for this to ALWAYS be visible
            to an operator
            * Programmer errors
            * Logging extra info about a panic
            * CLI argument handling
glog.V(1) - A reasonable default log level if you don't want
            verbosity
            * Information about config (listening on X, watching Y)
            * Errors that repeat frequently that relate to conditions
              that can be corrected (pod detected as unhealthy)
glog.V(2) - Useful steady state information about the service
            * Logging HTTP requests and their exit code
            * System state changing (killing pod)
            * Controller state change events (starting pods)
            * Scheduler log messages
glog.V(3) - Extended information about changes
            * More info about system state changes
glog.V(4) - Debug level verbosity (for now)
            * Logging in particularly thorny parts of code where
              you may want to come back later and check it
2014-09-25 16:30:14 -04:00
Daniel Smith
48ce23ac91 Make client use pointers 2014-09-07 22:19:24 -07:00
Tim Hockin
0f97a73c1b Rename a bunch of "Make" functions to "New"
Also rename some to other names that make better reading.  There are still a
bunch of "make" functions but they do things like assemble a string from parts
or build an array of things.  It seemed that "make" there seemed fine.  "New"
is for "constructors".
2014-08-20 21:27:19 -07:00
Daniel Smith
f689d44d25 Add comment for clarity and logging for debugging. 2014-08-18 17:43:10 -07:00
Daniel Smith
5cdce0e35a Prepare for external scheduler
1. Change names of Pod statuses (Waiting, Running, Terminated).
2. Store assigned host in etcd.
3. Change pod key to /registry/pods/<podid>. Container location remains
   the same (/registry/hosts/<machine>/kublet).
2014-08-10 15:05:36 -07:00
Daniel Smith
5dd130a350 Prevent accidental setting of sync or timeout 2014-08-08 14:09:14 -07:00
Daniel Smith
49cded3800 Simplify ResourceWatcher interface to one function. 2014-08-08 14:09:13 -07:00
Daniel Smith
71709ae09e Make replication controller use client 2014-08-08 14:09:13 -07:00
Daniel Smith
b430cebe72 Remove etcd dependency from controller manager. 2014-08-04 14:29:49 -07:00
Clayton Coleman
4448be2d95 Expose an Encoding/Versioning interface for use with etcd
etcd_tools.go is not dependent on the specific implementation
(which is provided by pkg/api).  All EtcdHelpers are created
with an encoding object which handles Encode/Decode/DecodeInto.
Additional tests added to verify simple atomic flows.

Begins to break up api singleton pattern.
2014-08-03 21:35:33 -04:00
Daniel Smith
928092e79e Etcd watcher verification
To make sure the etcd watcher works, I changed the replication
controller to use watch.Interface. I made apiserver support watches on
controllers, so replicationController can be run only off of the
apiserver. I made sure all the etcd watch testing that used to be in
replicationController is now tested on the new etcd watcher in
pkg/tools/.
2014-07-31 14:54:30 -07:00
Dan McPherson
d94f5c3360 Fixing typo 2014-07-30 16:45:53 +02:00