Commit Graph

194 Commits (012ba0e3b078af26ba2ebf2536e134e0669f2e4d)

Author SHA1 Message Date
Tim Hockin 1ec3457fc9 Beef up validation tests 2015-01-06 13:02:42 -08:00
Tim Hockin 6e8f5fea8e Fix validation for BoundPods to allow defaults
Thunking to Manifest makes a copy of the input, which is not useful for
defaulting.
2015-01-06 13:02:41 -08:00
Tim Hockin ca27fb259c Don't use pointers for session affinity 2014-12-29 14:43:17 -08:00
Tim Hockin 652479a3b1 Add kubelet DNS flags & api disable for DNS
This adds --cluster_dns and --cluster_domain flags to kubelet.  If
non-empty, kubelet will set docker --dns and --dns-search flags based on
these.  It uses the cluster DNS and appends the hosts's DNS servers.
Likewise for DNS search domains.

This also adds API support to bypass cluster DNS entirely, needed to
bootstrap DNS.
2014-12-29 09:18:12 -08:00
Brendan Burns 9884142061 Clear node status before the validation check. 2014-12-22 11:57:31 -08:00
Brendan Burns 5e8490d5fe Add a PodUnknown phase and make ListPods return even when there are errors
obtaining info for some pods.
2014-12-19 15:08:48 -08:00
Brendan Burns 36bc3604b9 Merge pull request #2893 from brendandburns/pd3
Make it easier to update nodes, make it possible to update capacity.
2014-12-18 10:18:54 -08:00
Brendan Burns cf0b41535f Make it easier to update nodes, make it possible to update capacity. 2014-12-17 21:50:26 -08:00
Mike Foley 569ce87f0e Updated types API to include session affinity. …
- changed CLIENT-IP and NONE to be ClientIP and None respectively
 - updated conversions to support translating between api versions.
 - updated validations to validate session affinity type if specified.
2014-12-17 15:59:20 -05:00
Joe Beda 93ed9173e3 Merge pull request #2781 from commonlisp/master
simplify util.ErrorList by eliminating errorListInternal
2014-12-16 15:43:55 -08:00
Clayton Coleman dadb8431c4 Remove internal PodState in favor of internal PodStatus object 2014-12-15 16:50:05 -05:00
George Kuan 5e1fc1f4e0 Fixes #1605: make ErrorList introspectable by replacing ErrorList and
ErrorList#ToError with []error and util.SliceToError() respectively
2014-12-12 10:56:31 -08:00
Daniel Smith f81ec248d0 Merge pull request #2786 from smarterclayton/load_opaque_objects
Allow runtime.Object to be encoded as runtime.RawExtension
2014-12-10 16:24:05 -08:00
Clayton Coleman 19379b5a38 Internal rename api.Minion -> api.Node 2014-12-10 12:08:18 -05:00
bgrant0607 4a9afe61da Merge pull request #2621 from brendandburns/kubecfg
Add validation back in
2014-12-09 15:10:51 -08:00
Brendan Burns 18cfac0d31 Make validation optional, handle YAML 2014-12-09 12:37:49 -08:00
Brendan Burns c29f5db81c Revert "Revert "Add optional validation to kubecfg/kubectl.""
This reverts commit 6590c66dd4.
2014-12-09 12:37:48 -08:00
Clayton Coleman 2c27f7d332 Allow an empty service 2014-12-09 12:48:53 -05:00
Tim Hockin 5ecce5d60c Add util to validate namespaced names 2014-12-08 15:31:43 -08:00
Clayton Coleman 714dbf4522 Shrink runtime.TypeMeta to be equivalent to api TypeMeta
Remove unused fuzzing
2014-12-07 20:49:07 -05:00
Jordan Liggitt 22eee15fe7 Remove uint64 bitshift workaround 2014-12-04 15:00:23 -08:00
Tim Hockin 89875ef09d Loosen DNS 952 for labels 2014-12-01 12:30:43 -08:00
Tim Hockin c857dc1196 Add namespacing for label keys 2014-12-01 12:30:43 -08:00
Tim Hockin d5a6a54391 clean up error message on labels validation errs 2014-12-01 12:30:43 -08:00
Tim Hockin 9afeaf36ef Fix head 2014-11-26 13:48:50 -08:00
Eric Tune 585afa1bae Merge pull request #2610 from ddysher/node-namespace
Fix node namespace.
2014-11-26 13:02:21 -08:00
Joe Beda 6590c66dd4 Revert "Add optional validation to kubecfg/kubectl."
This reverts commit acf6d82800.
2014-11-25 14:45:00 -08:00
Eric Tune 636ffed399 Merge pull request #2515 from thockin/why
Add details on Invalid validation errors
2014-11-25 14:04:27 -08:00
Deyuan Deng c8c7a13ac6 Fix node namespace. 2014-11-25 16:30:55 -05:00
Clayton Coleman a67912f937 Merge pull request #2517 from brendandburns/kubecfg
Add client side validation to kubecfg and kubectl.
2014-11-25 13:46:52 -06:00
Brendan Burns acf6d82800 Add optional validation to kubecfg/kubectl. 2014-11-24 22:25:22 -08:00
Tim Hockin ff8c5f9415 Add a Detail field to Validation Error 2014-11-24 17:28:42 -08:00
Tim Hockin b08e5b24b0 Change ValidationError to a pointer
In Prep for adding at leats one more field, make this operate more list
StatusError.
2014-11-24 17:28:42 -08:00
Deyuan Deng b5fce5021f gitrepo validation 2014-11-23 23:03:11 -05:00
markturansky 8159c8fd25 Refactor PodCondition to PodPhase 2014-11-21 15:28:38 -05:00
bgrant0607 4c5a7e5915 Merge pull request #2492 from brendandburns/valid
Add a swagger schema validator, for validating client side json files.
2014-11-21 07:01:59 -08:00
Brendan Burns 6c53d3b462 Add a swagger schema validator, for validating client side json files. 2014-11-20 22:16:55 -08:00
Deyuan Deng a4e7604266 Merge pull request #2478 from smarterclayton/refactor_minion_to_match_v1beta3
Move the internal minion representation to match v1beta3
2014-11-20 21:37:43 -05:00
Clayton Coleman 156000ef6d Move the internal minion representation to match v1beta3
Moves to 'Spec' and 'Status' internally and removes duplicate
fields.  Moves Capacity into Spec and drops use of NodeResources
2014-11-20 20:53:08 -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
Deyuan Deng a07661dcea Add pod restart policy validation for replication controller. 2014-11-17 23:08:23 -05:00
Deyuan Deng c20ceea170 Add more validation for updating node. 2014-11-17 13:42:31 -05:00
Deyuan Deng 241f3d702b Exclude service itself when checking conflict. 2014-11-15 10:40:40 -05:00
Deyuan Deng 29a56c4f18 Use Service.Name for validation error. 2014-11-14 19:36:34 -05:00
Brendan Burns c25ef89b24 Merge pull request #2367 from lavalamp/fix3
Yet more non-controversial fixes from #2277
2014-11-14 10:25:04 -08:00
Daniel Smith de75e5a9bb Fix server-side namespace handling for events; add validation 2014-11-14 09:43:28 -08:00
Yuki Yugui Sonoda 864bfb65da Fixes golint errors in pkg/api. 2014-11-14 13:14:23 +09: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
derekwaynecarr b326cbbe0c Centralize minion validation 2014-11-12 12:38:15 -05:00
Clayton Coleman 72bf12c86d Update the validation logic to test PodTemplateSpec 2014-11-10 11:33:51 -05:00
Brian Grant 535785e3b9 Update api/validation service validation with service fields moved by #2086 2014-11-05 06:52:06 +00:00
bgrant0607 fc0dab630c Merge pull request #2086 from markturansky/v1beta3_refactor
Refactor internal API for Services to match v1beta3
2014-11-04 21:48:02 -08:00
markturansky bd7643c033 refactor services to v1beta3 2014-11-04 14:23:53 -05:00
Brendan Burns f556f2f82f Add some validation for externalized service ports. 2014-11-03 13:36:34 -08:00
markturansky e2365b1f96 add RFC952 label validation 2014-10-24 16:01:52 -04:00
Tim Hockin d6effe3c6d Rename api ErrorList for clarity 2014-10-24 09:43:14 -07:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman 2475eb06cb Remove use of embedded TypeMeta accessor 2014-10-24 11:22:20 -04:00
Clayton Coleman 91d9a90e4e Replace use of "id" in strings with "name" 2014-10-22 15:59:12 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Clayton Coleman 892942af8f Read BoundPods from etcd instead of ContainerManifestList
There are three values that uniquely identify a pod on a host -
the configuration source (etcd, file, http), the pod name, and the
pod namespace. This change ensures that configuration properly
makes those names unique by changing podFullName to contain both
name (currently ID in v1beta1, Name in v1beta3) and namespace.

The Kubelet does not properly handle information requests for
pods not in the default namespace at this time.
2014-10-16 19:29:08 -04:00
Daniel Smith 2987747a0f Merge pull request #1794 from brendandburns/e2e
Add a pod update e2e test in go. Also adjust validation logic a little.
2014-10-15 11:59:30 -07:00
Brendan Burns 8d38f8890e Add an e2e test in go. Also adjust validation logic a little to make it more reasonable.
Not integrated into existing e2e yet.
2014-10-14 16:43:00 -07:00
Eric Tune bb5a17488f Use Forbidden valdiation error when no capability 2014-10-14 16:14:28 -07:00
Daniel Smith 841e9e87ff Merge pull request #1713 from brendandburns/update
Add update to the pod etcd handler.
2014-10-13 17:42:30 -07:00
Brendan Burns 4380637be7 Add update to the pod etcd handler. 2014-10-13 17:27:31 -07:00
Brendan Burns 695fbee343 Merge pull request #1742 from dchen1107/termination
Set EmptyDir when VolumeSource is absent.
2014-10-10 16:27:26 -07:00
Dawn Chen c511b7a0ce Fix #1683 2014-10-10 15:34:48 -07:00
Tim Hockin d84816aaec Merge pull request #1709 from erictune/move_line
Fix format specifiers in Printf-type functions.
2014-10-09 20:40:35 -07:00
Eric Tune 800284164a Fix format specifiers in Printf-type functions. 2014-10-09 17:06:32 -07:00
Danny Jones 4ec25f3b81 Adds support for attaching GCEPersitentDisks
Adds GCEPersistentDisk volume struct
Adds gce-utils to attach disk to kubelet's VM.
Updates config to give compute-rw to every minion.
Adds GCEPersistentDisk to API
Adds ability to mount attached disks
Generalizes PD and adds tests.
PD now uses an pluggable API interface.
Unit Tests more cleanly separates TearDown and SetUp
Modify boilerplate hook to omit build tags
Adds Mounter interface; mount is now built by OS
TearDown() for PD now detaches disk on final refcount
Un-generalized PD; GCE calls moved to cloudprovider

Address comments.
2014-10-08 20:03:59 -07:00
Daniel Smith 7ffe791486 fix error message in validation test 2014-10-07 13:54:41 -07: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
Clayton Coleman 0ff77ffcb3 Some field names in validation.go not consistent
Fields are (for now) JavaScript style field accessors
2014-10-02 23:43:30 -04:00
Eric Tune 9c0769422d Directory renamed to Dir to match json property 2014-10-01 13:35:21 -07:00
derekwaynecarr 016d394705 Remove redundant code in validation 2014-10-01 14:29:47 -04:00
derekwaynecarr 0312d80ffa Update test cases to use default context 2014-10-01 10:57:50 -04:00
derekwaynecarr e4ec49ee6b Require namespace on controller, pod, service objects 2014-10-01 10:57:50 -04:00
Tim Hockin 04cdf286a4 Make and use api.Protocol type 2014-09-27 20:31:37 -07:00
Brendan Burns dc5a4a8c3f Refactor to clean up names. 2014-09-16 15:19:02 -07:00
erictune 506f51b186 Merge pull request #1330 from brendandburns/privilege
Only allow privileged containers if API server flag set.  Adds capabilities package.
2014-09-16 15:12:26 -07:00
Brendan Burns 5b9e2a55b5 Add a flag to reject privileged containers in the apiserver. 2014-09-16 11:22:32 -07:00
Paul Morie f94198c7a3 Expose validation method for ReplicationControllerState 2014-09-16 12:55:27 -04:00
Dawn Chen d51c28d757 Merge pull request #1304 from brendandburns/valid
Add some lifecycle validation.
2014-09-15 16:50:03 -07:00
Brendan Burns 6efafb141f Add some lifecycle validation. 2014-09-15 16:45:26 -07:00
Tim Hockin 9f275c81ac add a 'protocol' field to api.Service 2014-09-12 16:38:17 -07:00
Tim Hockin b566339f0c make service validation test be table-driven 2014-09-12 16:38:17 -07:00
brendandburns e9d12fef05 Merge pull request #1250 from dchen1107/cleanup
Small clean up in validation.
2014-09-09 16:24:12 -07:00
Dawn Chen 80fa392f6b Small clean up in validation. errs is used as import path alias in validation.go, but it is reused
as a variable for validateVolume.
2014-09-09 16:08:21 -07:00
Dawn Chen 15cab4d053 Introduce the simplest RestartPolicy and handling. 2014-09-08 22:41:38 -07:00
Clayton Coleman 34c40e4e48 Errors should be part of api/errors, not apiserver
Renames constructor methods to be errors.New<name> which changed a few
places.
2014-09-03 17:16:00 -04:00
Daniel Smith 7615c00a9a Make validation work when not in the api package. 2014-09-02 10:42:06 -07:00
Daniel Smith 6121e61f99 Split api into api, api/common, api/validation & apitools 2014-09-02 10:40:52 -07:00