Commit Graph

37 Commits (f32b390cf08a9afd9f9899e0d97a90eb162b32a8)

Author SHA1 Message Date
Dr. Stefan Schimanski 8541304582 pkg/util: move CompileRegex helper into apiserver
This is a little helper, not a generic utility of general value.
2017-01-25 17:21:12 +01:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
harry b0900bf0d4 Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
Jan Chaloupka 43a47a8234 Move Until, Forever, NeverStop, ForeverTestTimeout from util to wait 2016-02-07 11:38:48 +01:00
harry 1032067ff9 Replace runtime reference by pkg 2016-02-01 21:06:44 +08:00
Harry Zhang 936a11e775 Use networking to hold network related pkgs
Change names of unclear methods

Use net as pkg name for short
2016-01-15 13:46:16 +08:00
harry 7405c7899b Add strings pkg to hold strings utils
Replace funtions with strings pkg

Fix all references and rename the pkg
2016-01-15 12:37:50 +08:00
Tim Hockin ba383bcfeb Refactor IntOrString into a new pkg
pkg/util/intstr is a cleaner encapsulation for this type and supporting
functions.  No behavioral change.
2015-11-16 10:57:52 -08:00
Mike Danese 8b9809291b make util.Until return immediately if stop is written inside the loop 2015-11-04 16:55:15 -08:00
Christian Stewart 3a23bee9ad
always select non link-local interface, fixes #11961
The API server will refuse to start if a link-local IP address is selected, however, ChooseNetworkInterface can still select link-local network routes. This causes a startup failure on platforms like DigitalOcean that use a link-local route to fetch metadata.

Signed-off-by: Christian Stewart <christian@paral.in>
2015-08-24 14:49:19 -04: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
Subin M b8c91e7344 use ChooseHostInterface in kube-proxy 2015-03-11 13:50:53 +05:30
Clayton Coleman 04b864a91f Allow panics and unhandled errors to be reported to external targets
It would be better if Kubernetes could be instrumented to report panics
and handled but unreturned errors in controller loops to a remote
service.  This commit introduces settable handlers for HandleCrash and a new
HandleError that can be overriden to report errors to a remote service
for analysis.  HandleError() in particular is for control loops that do
not return an error, and so there is no ability to report those errors
other than in log files.

ReplicationController is provided as an example.
2015-01-26 20:23:46 -05:00
Vishnu Kannan c32295a180 Adding a 'Typename' strongtype for representing all compute resource types. 2015-01-23 22:17:56 +00:00
Tim Hockin e4d239cbb1 Util to test if all ptr fields are nil 2015-01-03 23:57:43 -08:00
Daniel Smith 7aaf76af6e Merge pull request #2661 from smarterclayton/allow_loops_to_exit
Add a util.Forever variant that ends on a stop channel
2014-12-03 11:52:59 -08:00
Sam Ghods 6399854240 Remove unused YAML tags and GetYAML/SetYAML methods
Unneeded after move to ghodss/yaml.
2014-12-02 16:25:28 -08:00
Sam Ghods 9a9a1e0939 Move from go-yaml/yaml to ghodss/yaml 2014-12-02 16:24:05 -08:00
Clayton Coleman 740b824ac2 Add a util.Forever variant that ends on a stop channel 2014-11-28 15:15:52 -05:00
Clayton Coleman 6d31c2bf8a util.EncodeJSON proven harmful, remove it everywhere
People were misusing EncodeJSON in tests when they should be using
runtime.EncodeOrDie(testapi.Codec(), obj).  Removing the potential
for cutting self on sharp objects.
2014-11-13 10:38:13 -05:00
deads2k e348b939bf make api match intent with less specific type 2014-10-08 10:01:55 -04:00
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Paul Morie 47fd5842ad Fix typo in tests 2014-08-21 17:02:28 -04: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
Paul Morie 5331cd6ec0 Add missing case for IntOrString unit tests 2014-08-20 17:22:29 -04:00
Paul Morie c69160059b Change CreationTimestamp to a util.Time and set in each storage implementation
Because time.Time doesn't work correctly with our YAML package, it is necessary
to introduce a type, util.Time, which serializes correctly to JSON and YAML.

Eventually we would like timestamping to cut across storage implementations;
for now, we set it in each storage.
2014-08-14 16:26:29 -04:00
Tim Hockin 7201227cb1 Use IntOrString for HTTP health check ports
Clean up code to be more testable.  Add test cases for named and numeric
ports in HTTP health checks.  Improve tests.
2014-08-10 23:26:42 -07:00
Clayton Coleman f7149926c0 Remove expectNoError from client, kubelet, and util 2014-08-04 09:39:06 -04:00
Daniel Smith aa92dd7fb2 Add go fuzzer in preparation for testing. Also gofmt a few files that needed it. 2014-07-27 14:54:48 -07:00
Tim Hockin 7d5398bda7 Fix go idiom feedback 2014-07-11 11:43:42 -07:00
Kouhei Ueno 93def86a9e fix go lint errors in util 2014-07-11 21:04:34 +09:00
Tim Hockin 85effbbc3f IntOrString for use in JSON/YAML
Specifying an API type as IntOrString will allow JSON and YAML to accept
either ints or strings with the same name.  For example, port names or
numbers.
2014-07-10 11:09:47 -07:00
Tim Hockin 74e1b03a80 Break the dep from util -> api
Part 1 in a series of changes towards data validation.
2014-06-30 14:28:41 -07:00
Daniel Smith b850d36166 Fix boilerplate everywhere 2014-06-23 11:32:11 -07:00
Brendan Burns 9f76f13205 gofmt 2014-06-11 12:50:01 -07:00
Brendan Burns 9010ef954c Update tests 2014-06-09 07:16:43 -07:00