Commit Graph

480 Commits (72745f226a6b18eab71e25231614956d306e39f7)

Author SHA1 Message Date
Dawn Chen 0710976d43 Merge pull request #8490 from thockin/diff-proto
Allow same-hostport-different-protocol
2015-05-21 09:16:16 -07:00
CJ Cullen bf646abf8d Revert "Revert "Modify nodes to register directly with the master.""
This reverts commit c53786ab31.
2015-05-20 14:21:03 -07:00
Quinton Hoole c53786ab31 Revert "Modify nodes to register directly with the master." 2015-05-20 13:47:51 -07:00
Eric Tune 1f4172d23c Merge pull request #6949 from roberthbailey/node-register
Modify nodes to register directly with the master.
2015-05-19 11:29:43 -07:00
Tim Hockin cb49843ccb Merge pull request #8140 from vishh/namespace
Update Namespace names to follow DNS label format
2015-05-19 11:25:32 -07:00
Vishnu Kannan d10af89493 Updating namespaces to be DNS labels instead of DNS names. 2015-05-19 11:09:09 -07:00
Daniel Smith 181124bc9b Merge pull request #7974 from deads2k/attach-pull-secrets-to-pods
Attach pull secrets to pods
2015-05-19 10:26:39 -07:00
Tim Hockin 711fa2f2c6 fix 2015-05-19 10:17:53 -07:00
Tim Hockin c7bf373d98 Allow same-hostport-different-protocol 2015-05-19 10:00:35 -07:00
Robert Bailey 01467e0bb8 Modify nodes to register directly with the master.
- Delete nodes when they are no longer ready and don't exist in the
cloud provider.
 - Label each node with it's hostname.
 - Add flag to skip node registration.
 - Add a test for registering an existing node.
2015-05-19 09:55:07 -07:00
deads2k 5458f05679 create LocalObjectReference 2015-05-19 08:39:46 -04:00
Tim Hockin 65833e42c4 rename CapabilityType Capability 2015-05-18 17:21:30 -07:00
Tim Hockin f66ca25d9f Rename AccessMode to PersistentVolumeAccessMode 2015-05-18 17:21:30 -07:00
Tim Hockin a548d542db Rename AffinityType to ServiceAffinity 2015-05-18 17:21:30 -07:00
deads2k 0c14e0cbdb add pull secret references to pods 2015-05-18 16:18:16 -04:00
deads2k be0f2d2930 add dockercfg secret types 2015-05-18 08:25:27 -04:00
deads2k d404a17f0a allow leading dots in secret keys 2015-05-18 08:17:58 -04:00
derekwaynecarr 8216332611 Kubelet kills a pod that exceeds ActiveDeadlineSeconds 2015-05-15 16:33:37 -04:00
Tim Hockin 2f59aa4f25 Somewhat better error messages for common formats
Clearer strings with examples.
2015-05-13 13:59:16 -07:00
Tim Hockin b429e89251 Spec qualified names (label keys) more tightly
It can be a (DNS_SUBDOMAIN/)?label, but we were validating it
incorrectly before.
2015-05-13 13:59:16 -07:00
markturansky 0191574f7e Bi-directional bind between pv.Spec.ClaimRef and pvc.Spec.VolumeName 2015-05-13 14:05:21 -04:00
Nikhil Jindal d75bd8bf2a Merge pull request #7101 from liggitt/service_account
ServiceAccounts
2015-05-12 10:23:41 -07:00
feihujiang 4bb594b34d Duplicate service port name can't be validated
Duplicate service port name can't be validated

Duplicate service port name can't be validated

Duplicate service port name can't be validated
2015-05-12 15:18:27 +08:00
Jordan Liggitt 53d55f4192 Add ServiceAccount API type, client 2015-05-11 17:18:05 -04:00
Jordan Liggitt 6e1e7dbb24 Add ServiceAccountToken SecretType 2015-05-11 17:18:05 -04:00
Nikhil Jindal 2cc8696425 Merge pull request #7919 from brendandburns/kubectl
Fix validation by moving it into the resource builder.
2015-05-11 10:20:14 -07:00
Tim Hockin 3aa39d54b6 Service port names are required for multi-port
There is no provision for the first port to be unnamed.  I think I
initially allowed that, but then the Subset struct became a sorted
struct, so the first-ness of the port got lost.  If you have a Service
with one named and one unnamed port, what happens is that the
EndpointController fails to create Endpoints (validation error).
2015-05-09 20:11:48 -07:00
Brendan Burns 7f11585972 Fix validation by moving it into the resource builder.
Also always print an error for unknown field.
2015-05-08 14:00:33 -07:00
Abhi Shah 87e85e25f1 Revert "Added ISCSI to PV structs" 2015-05-08 11:31:35 -07:00
markturansky 4c9eac6c3d Added ISCSI to PV structs 2015-05-07 18:13:03 -04:00
markturansky 68ce264a6d Added NFS to PV structs 2015-05-07 12:38:27 -04:00
Zach Loafman 875e83a741 Revert "Revert "Security context - types, kubelet, admission"" 2015-05-05 16:02:13 -07:00
Zach Loafman f48904fd5e Revert "Security context - types, kubelet, admission" 2015-05-05 15:20:39 -07:00
Paul Weil 982bf19c20 security context initial implementation - squash 2015-05-05 13:46:13 -04:00
Paul Morie f6f34d0493 Allow int64 types in API; update swagger spec 2015-05-05 12:15:12 -04:00
Paul Morie e949a623ff Change EnvVarSource.FieldPath -> FieldRef and add example 2015-05-04 18:41:09 -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
Jordan Liggitt ac67fff1cf Convert Secret registry to use update/create strategy, allow filtering by Type 2015-04-28 15:00:20 -04:00
Tim Hockin 635c393a5a Merge pull request #6105 from markturansky/yoko_pv_mgr
PersistentVolumeClaimBinder
2015-04-27 13:35:44 -07:00
Paul Morie 7d30f09ebf Add downward API for environment vars 2015-04-27 14:13:11 -04:00
markturansky 2fe8ed5358 fixed prefix name in validation 2015-04-27 12:05:12 -04:00
markturansky 37d7f3f4f1 Added integration test, fixed a validation issue 2015-04-27 12:05:12 -04:00
markturansky 2cf4e6564b Added more to README, tweaked pod, added service, fixed validation 2015-04-27 12:05:12 -04:00
Maciej Szulik cd183bbb72 Fixed validation message when trying to submit incorrect secret 2015-04-27 15:18:32 +02:00
Deyuan Deng c73ce1db34 Validate Node IPs; clean up validation code 2015-04-23 21:08:18 -04:00
Clayton Coleman e6e034af4f Rename PodTemplate.Spec to PodTemplate.Template 2015-04-22 12:54:27 -04:00
Clayton Coleman 10c2ace6bf Pod Templates 2015-04-22 12:54:25 -04:00
Brian Grant fc50201f89 Merge pull request #7059 from derekwaynecarr/fixup
Improve container resource requirements validation
2015-04-22 07:13:34 -07:00
Rohit Jnagal bfb4b7280d Convert error strings to validation errors. 2015-04-21 20:35:46 +00:00
derekwaynecarr 5036289b5e Improve container resource requirements validation 2015-04-20 15:08:18 -04:00
Tim Hockin c2bacd588d Stop using dockerfile/* images
As per
http://blog.docker.com/2015/03/updates-available-to-popular-repos-update-your-images/
docker has stopped answering dockerfile/redis and dockerfile/nginx.  Fix all
users in our tree.  Sadly this means a lot of published examples are now broken.
2015-04-16 12:20:43 -07:00
Brian Grant 775787bb4c Merge pull request #6849 from nikhiljindal/validation
Updating api/validation/schema_test to test testapi.Version rather than just v1beta1
2015-04-15 10:25:54 -07:00
nikhiljindal 40842e4471 Updating api/validation/schema_test to test testapi.Version rather than just v1beta1 2015-04-14 23:51:49 -07:00
Alex Robinson 9a351e3670 Move validation of load balancers only supporting TCP ports to validation.go. 2015-04-14 18:56:51 +00:00
Justin Santa Barbara 933cf60af7 Style: volumeId -> volumeID 2015-04-10 13:25:44 -07:00
Justin Santa Barbara 9711e771c5 Rename AWSPersistentDisk -> AWSElasticBlockStore, aws-pd -> aws-ebs
Per comments from @markturansky - thanks!
2015-04-10 13:25:43 -07:00
Justin Santa Barbara 95b68ae0b0 Rename pdName -> volumeId for AWS persistent volumes 2015-04-10 13:25:43 -07:00
Justin Santa Barbara edf0292d4a Add initial support for Volumes to AWS 2015-04-10 13:25:42 -07:00
derekwaynecarr 8364055f0f Improve validation and fix not throwing an error during ns delete 2015-04-10 11:41:28 -04:00
Tim Hockin 4661cedf4a Merge pull request #5709 from gmarek/client5
Add validation for Endpoint
2015-04-09 15:13:45 -07:00
Brendan Burns 5d4f1cf8da Add Validate in addition to ValidateUpdate to validation for most resources. 2015-04-08 20:15:49 -07:00
gmarek c20efb6bae Add validation for Endpoints 2015-04-08 20:12:07 +02:00
Huamin Chen a278ceeb0a implement glusterfs volume plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-04-07 09:14:39 -04:00
Huamin Chen 7a82af31de add iscsi volume plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-04-06 16:20:28 -04:00
markturansky a5ebacb043 changed claimed validation from length check to specific storage check 2015-04-06 08:46:44 -04:00
markturansky c4a53a23bd Added validation to prevent mutating Claim.Spec after binding 2015-04-06 08:46:44 -04:00
markturansky 95bd170ca2 PV & PVC Client implementation 2015-04-06 08:46:43 -04:00
Piotr Szczesniak 5c6439d449 Removed PodStatus.Host
Fixes #6165
2015-04-02 16:38:45 +02:00
Rohit Jnagal e0ff139279 Remove validation for Capacity as it got moved from Spec to Status.
Also fix breakage from ExternalID validation: Default ExternalID to node name when not specified.
2015-04-02 00:51:52 +00:00
Clayton Coleman dec3209229 Merge pull request #6246 from derekwaynecarr/finalize_fix
Fix Namespace Termination
2015-04-01 17:34:56 -04:00
derekwaynecarr b745f51c65 Client must specifiy a resource version on finalize 2015-04-01 11:16:45 -04:00
Tim Hockin e19f4939b1 fix tests broken by stronger validation 2015-03-31 11:13:44 -07:00
Tim Hockin b420871a11 fixes from testing 2015-03-31 09:30:56 -07:00
Tim Hockin 186818d787 WIP: Implement multi-port Services 2015-03-30 19:28:11 -07:00
Eric Tune 8bf104503c Fix nil pointer when validating in kubectl. 2015-03-27 15:49:51 -07:00
Tim Hockin 8ae203825b Implement multi-port endpoints
Instead of endpoints being a flat list, it is now a list of "subsets"
where each is a struct of {Addresses, Ports}.  To generate the list of
endpoints you need to take union of the Cartesian products of the
subsets.  This is compact in the vast majority of cases, yet still
represents named ports and corner cases (e.g. each pod has a different
port number).

This also stores subsets in a deterministic order (sorted by hash) to
avoid spurious updates and comparison problems.

This is a fully compatible change - old objects and clients will
keepworking as long as they don't need the new functionality.

This is the prep for multi-port Services, which will add API to produce
endpoints in this new structure.
2015-03-27 12:36:32 -07:00
Brian Grant a4bf91c8c0 Merge pull request #5690 from satnam6502/failputnover
Give better error message for PUTs with no resource version
2015-03-27 07:12:56 -07:00
Dawn Chen f662d7d11c Kubelet reports node related events with empty namespace for now. 2015-03-26 16:30:23 -07:00
gmarek 5a11748018 Move Capacity from NodeSpec to NodeStatus 2015-03-26 15:28:48 +01:00
Satnam Singh cd05c8b9bc Give better error message for PUTs with no resource version 2015-03-25 15:52:48 -07:00
Rohit Jnagal 49ff04765b Add validation for node creation. 2015-03-25 21:55:03 +00:00
Clayton Coleman 367284b63b Merge pull request #5767 from kazegusuri/endpoints_storage
port endpoints to generic etcd
2015-03-25 11:32:01 -04:00
markturansky f762b303ad PersistentVolume & PersistentVolumeClaim API types 2015-03-25 10:09:25 -04:00
Wojciech Tyczynski c8e89bc717 Merge pull request #5853 from fgrzadkowski/better_errors
Improve error message for invalid pod spec update
2015-03-25 14:31:13 +01:00
Masahiro Sano 410e11c305 port endpoints to generic etcd 2015-03-25 22:15:19 +09:00
Filip Grzadkowski 7085a0cb44 Merge pull request #5508 from fgrzadkowski/validate_ips
Validate Service.Spec.publicIPs to be a valid IP that is not a localhost
2015-03-25 12:11:29 +01:00
Abhi Shah f1872d36cf Merge pull request #5814 from vmarmol/net-host
Add HostNetworking container option to API.
2015-03-24 15:55:27 -07:00
Victor Marmol 2a0793c155 Add HostNetworking container option to API.
This allows a container to run within the same networking namespace as
the host. This will be locked down by default using a flag on the master
and nodes (similar to how privileged is handled today).
2015-03-24 14:40:28 -07:00
Tim Hockin 064b7dec42 Merge pull request #5807 from pmorie/secret_volume_ref
Change secret volume plugin reference to name
2015-03-24 14:18:35 -07:00
Paul Morie e40ba109a1 Change SecretVolumeSource to use a secret name instead of ObjRef 2015-03-24 13:58:41 -04:00
Clayton Coleman 97560c409f Merge pull request #5554 from derekwaynecarr/namespace_controller
Namespace Controller to support Namespace Termination
2015-03-24 12:59:00 -04:00
Filip Grzadkowski b74b203da2 Improve error message for invalid pod spec update 2015-03-24 17:11:16 +01:00
derekwaynecarr 29c491ef2e Namespace.Spec.Finalizer support 2015-03-24 10:36:06 -04:00
Filip Grzadkowski 6bc1e2ef40 Add validation error explanation for long annotations. 2015-03-24 11:01:26 +01:00
Filip Grzadkowski 24eb1a08f3 Validate Service.Spec.publicIPs to be a valid IP that is not a localhost 2015-03-24 10:48:46 +01:00
Clayton Coleman d19aac80ea Merge pull request #5533 from smarterclayton/burn_yaml_with_fire
Burn YAML with fire (kind of)
2015-03-23 13:45:52 -04:00
Clayton Coleman 65425f690c Move field errors to pkg/util/fielderrors
Allows pkg/api to take a reference to labels.Selector and fields.Selector
2015-03-22 17:43:34 -04:00
Dawn Chen 7a6490f572 Merge pull request #5729 from thockin/plural_endpoints_30_restart
Rename Service.ContainerPort to TargetPort in v1b3
2015-03-20 14:37:46 -07:00
Tim Hockin 4375376e9c Rename Service.ContainerPort to TargetPort in v1b3
Fix all callers and examples.  Part of multi-port service cleanup.
2015-03-20 13:50:06 -07:00
Abhishek Gupta b0c23c1046 Headless Services: Adding option to specify None for PortalIP 2015-03-20 12:10:03 -07:00
Clayton Coleman 6918a4d32e Replace automatic YAML decoding with opt-in YAML decoding
Base codecs no longer automically handle YAML.  Instead, clients
must convert to JSON first via yaml.ToJSON and runtime.YAMLDecoder.
2015-03-20 00:03:56 -04:00
Chris Alfonso 1a45e37d17 NFSMount storage plugin for kubelet.
* If you want to test this out when an actual NFS export a good place
 to start is by running the NFS server in a container:

docker run -d --name nfs --privileged cpuguy83/nfs-server /tmp

More detail can be found here:
https://github.com/cpuguy83/docker-nfs-server
2015-03-19 13:37:38 -04:00
Filip Grzadkowski f89f91b7bd Validate that there is at least one container in the pod 2015-03-19 12:31:53 +01:00
Victor Marmol 9586b39bb7 Merge pull request #5555 from fgrzadkowski/sync_pod_status
Periodically update pod status from kubelet.
2015-03-18 10:14:07 -07:00
Filip Grzadkowski 1a352b74ba Periodically update pod status from kubelet. 2015-03-18 12:11:39 +01:00
gmarek a3b137ce8e Cleanup of validation.go 2015-03-18 08:59:35 +01:00
Victor Marmol 668e2dbcd8 Merge pull request #5502 from wojtek-t/completely_remove_bound_pods
Remove BoundPod type from source code
2015-03-17 08:09:50 -07:00
Filip Grzadkowski 18b728ff44 Revert "Periodically update pod status from kubelet." 2015-03-17 13:51:45 +01:00
Wojciech Tyczynski e6d188fca8 Remove BoundPod structure 2015-03-17 10:27:41 +01:00
Filip Grzadkowski 336525a27d Periodically update pod status from kubelet. 2015-03-16 23:03:03 +01:00
Jeff Lowdermilk e37fd2a84d Merge pull request #5477 from dchen1107/clean
Convert RestartPolicy to string for v1beta3.
2015-03-16 10:23:52 -07:00
derekwaynecarr 2d13dfaf13 Improvements to namespace registry to align with pod model 2015-03-16 10:16:28 -04:00
Dawn Chen 34e9c82c70 Convert RestartPolicy to string for v1beta3.
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00
derekwaynecarr 799e3fa9cc Eliminate ResourceQuotaUsage in favor of ResourceQuota status 2015-03-13 16:52:09 -04:00
Brian Grant 98fedf6b2e Merge pull request #5407 from nikhiljindal/newSwagger
Updating go-restful to the latest version
2015-03-12 16:26:16 -07:00
nikhiljindal b2276b5d4b Updating pkg/api/validation/ to consider swagger.items as object and not array 2015-03-12 16:04:11 -07:00
Nikhil Jindal d9249a26e0 Merge pull request #5175 from thockin/plural_services_10
Make testing service validation easier
2015-03-12 15:48:37 -07:00
Ravi Sankar Penta f6ecec5880 Allow admin user to explicitly unschedule the node
Setting Unschedulable on the node will not touch any existing pods
on the node but will block scheduling of new pods on the node.
2015-03-12 14:27:27 -07:00
Clayton Coleman d016f478e0 Ignore changes to creation timestamp from clients on update
CreationTimestamp is not an authoritative field (like UID) so mismatches
can be safely ignored.
2015-03-09 12:04:35 -04:00
Tim Hockin 0b888e8673 Make testing service validation easier
Part of multi-port services.

If people like this, we could start to apply this pattern elsewhere.

TL;DR: don't redefine objects over and over changing one thing each
time.  Instead provide a func that mutates a base object to test facets
of validation.  Much easier to read and to update.
2015-03-08 21:41:37 -07:00
gmarek bb8a4f5ed3 apply comments 2015-03-06 08:23:22 +01:00
gmarek 726a5af075 Loosen label and annotation validation and related tests 2015-03-06 08:23:22 +01:00
Deyuan Deng 9b0af8df63 Node addresses 2015-03-04 16:47:31 -05:00
Brendan Burns fb90b56bf6 Embed VolumeSource in v1beta3 and internal. 2015-03-04 02:25:40 -08:00
Brian Grant fca9fd68c7 Merge pull request #4779 from smarterclayton/status_endpoints
Minimal status mutation change
2015-03-03 11:00:02 -08:00
Clayton Coleman 0ac49d77a0 TCPSocket could not be used as it was not checked in validation
Attempting to use it gave the error "must register one handler".
Added more tests for it.
2015-03-02 15:27:11 -05:00
Zach Loafman 4937008ae0 Revert "TCPSocket could not be used as it was not checked in validation" 2015-03-02 11:14:27 -08:00
Brendan Burns c7cbc5c991 Merge pull request #4883 from smarterclayton/fix_tcpsocket_validation
TCPSocket could not be used as it was not checked in validation
2015-03-02 10:53:48 -08:00
Brendan Burns fe973461f5 Merge pull request #4916 from thockin/plural_21_endpoints
Rename type Port to ContainerPort
2015-03-02 10:53:32 -08:00
Tim Hockin 532c39c336 Add defaults for HTTGetAction.Path & test actions
The comment says optional - this makes it optional.  Test handler actions.
2015-03-01 21:23:18 -08:00
Clayton Coleman 3d290089ae Minimal status mutation change
PUT /api/v1beta3/namespaces/default/pods/foo/status
    {
      "metadata": {...}, // allowed for valid values
      "spec": {}, // ignored
      "status": {...}, // allowed, except for Host
    }

Exposes the simplest possibly change. Needs a slight refactoring
to RESTUpdateStrategy to split merging which can be done in a
follow up.
2015-03-01 22:35:17 -05:00
Clayton Coleman d3a5a48d00 TCPSocket could not be used as it was not checked in validation
Attempting to use it gave the error "must register one handler".
Added more tests for it.
2015-03-01 22:31:57 -05:00
Tim Hockin ea548b8260 Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-27 21:05:59 -08:00
Daniel Smith 650f6cb826 Revert "Multi-port Endpoints" 2015-02-23 13:53:21 -08:00
Tim Hockin eed36455a7 Merge pull request #4653 from thockin/secret_fixups
Secrets fixups
2015-02-23 13:49:19 -08:00
Tim Hockin 607b736a3f Rename volume source types to be consistent. 2015-02-23 12:39:57 -08:00
Tim Hockin 8bdfc352ce minor fixups as I review secrets 2015-02-23 12:39:47 -08:00
Tim Hockin e0fd83096c Rename type Port to ContainerPort
Sadly I had to do this by hand - I just could not get gorename to fix up
users of it.
2015-02-21 22:26:38 -08:00
Paul Morie a42ff94c8f Add secret volume plugin and e2e test 2015-02-18 16:27:44 -05:00
Paul Morie fb001ada21 Secret API resource 2015-02-18 11:54:56 -05:00
Mike Danese f7df9b9d37 add validation for api.Probe 2015-02-16 21:56:03 -08:00
Clayton Coleman abe8adc2e2 Expose new REST strategy methods for Pods 2015-02-13 12:12:50 -05:00
derekwaynecarr 0bd0e12bbc Add support for Namespace as Kind
Add example for using namespaces
2015-02-10 09:50:50 -05:00
Vishnu Kannan d0524d4778 Rename ResourceRequirementSpec to ResourceRequirements. 2015-02-09 23:19:38 +00:00
Marek Grabowski 72a066a992 Add more information to Validator error messages. 2015-02-09 18:07:09 +01:00
Brendan Burns 31ce2a9411 Adjust replication controller validation to be more flexible about
read/write volumes.
Update docs to reflect reality as it is implemented.
2015-02-06 14:58:21 -08:00
Brendan Burns 50e855953f Merge pull request #4131 from a-robinson/validate
Add a few extra test cases for API validation of labels
2015-02-05 15:37:45 -08:00
Yu-Ju Hong 283919e8b1 Fix tests in validation_test
Some tests expect the error cases to fail for a specific reason, but they could
fail for other reasons and still pass. This caused some changes to break the
tests without noticing the breakage. Example are the recent defaulting PR

This change fixes such tests and also updates some obsolete tests.
2015-02-04 15:44:46 -08:00
Alex Robinson 6bb374ca54 Add a few extra test cases for API validation of labels that would have
caught a bug that was in past versions. Also, copy the label key format
requirements from the API types.go comments into the labels doc.
2015-02-04 22:24:46 +00:00
Yu-Ju Hong 4a72addaeb Factor out API defaulting from validation logic
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).

 * This change is based on pull request 2587.

 * Most defaulting has been migrated to defaults.go where the defaulting
   functions are added.

 * validation_test.go and converter_test.go have been adapted to not testing the
   default values.

 * Fixed all tests with that create invalid objects with the absence of
   defaulting logic.
2015-02-03 00:55:42 -08: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 a7c9a12286 Add name generation and normalize common create flows
Adds `ObjectMeta.GenerateName`, an optional string field that defines
name generation behavior if a Name is not provided.

Adds `pkg/api/rest`, which defines the default Kubernetes API pattern
for creation (and will cover update as well). Will allow registries
and REST objects to be merged by moving logic on api out of those places.

Add `pkg/api/rest/resttest`, which will be the test suite that verifies
a RESTStorage object follows the Kubernetes API conventions and begin
reducing our duplicated tests.
2015-02-02 14:44:53 -05:00
Brian Grant 6e415f760b Merge pull request #4017 from smarterclayton/relax_annotation_validations
Slightly relax annotation validation
2015-02-02 11:42:38 -08:00
Clayton Coleman b30173658f Slightly relax annotation validation
The more aggressive validation on annotations broke openshift (and
backwards compat for our data).  This change relaxes to allow mixed
case so we can continue working in the short term, try to see if we
can agree on relaxation, and if we can't, apply the stronger
validation here.
2015-02-01 19:03:04 -05:00
Vishnu Kannan 5e36f63f8b Adding ResourceRequirementSpec to v1beta1, v1beta2, and v1beta3 APIs. The old resource
quantities 'CPU' and 'Memory' will be preserved until support for v1beta1 and v1beta2 APIs are
dropped.
Improved resource validation in the process.
2015-02-01 02:19:55 +00:00
Satnam Singh 3c3b016b8b Merge pull request #3917 from yujuhong/dedup
Refactor API object fuzzer
2015-01-30 08:07:25 -08:00
Deyuan Deng c793c4f0ab Sync node status from node controller to master. 2015-01-29 23:17:15 -05:00
Yu-Ju Hong 4cb730dad5 Refactor API object fuzzer
API object fuzzer is used to randomly populate API object for testing. Similar
code of the fuzzer was duplicated in multiple files. This change refactors the
tests and moves the fuzzer to a separate file.
2015-01-29 18:14:09 -08:00
Tim Hockin d01ea11a6e Merge pull request #3856 from smarterclayton/validation_logic_needs_cleanup
Validation of ObjectMeta is inconsistently applied
2015-01-29 14:12:44 -08:00
derekwaynecarr 829fa69527 Introduce a ResourceQuota object 2015-01-28 15:03:19 -05:00
Clayton Coleman a0356bca96 Unify validation logic for create and update paths
Ensure ObjectMeta is consistently validated on both create and update

Make PortalIP uncleareable
2015-01-28 13:10:37 -05:00
Tim Hockin a480794efc Tighten validation of Name and Namespace 2015-01-27 17:04:59 -05:00
derekwaynecarr 4faf27e63d Validate limit.Min and limit.Max resource names using ValidateResourceName 2015-01-27 16:41:28 -05:00
derekwaynecarr 74f368f50e Modified LimitRangeItem.Kind to LimitRangeItem.Type, added example files 2015-01-27 16:41:28 -05:00
derekwaynecarr 091cbe5fa2 Add a limit range resource 2015-01-27 16:41:27 -05:00
Brendan Burns 99583fc8c5 Fix a bug in validation that was leftover from the previous way of externalizing services. 2015-01-26 13:19:27 -08:00
markturansky 131ce993c4 Added validation for annotations 2015-01-26 09:32:09 -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 30219f8dfa Merge pull request #3664 from thockin/pull-if
Pull if
2015-01-21 13:05:28 -08:00
Tim Hockin c729f345f0 Merge pull request #3660 from dchen1107/image
Using switch in validatePullPolicyWithDefault
2015-01-21 12:54:12 -08:00
Tim Hockin 81343aac63 Change PullPolicy constants to match 2015-01-21 12:48:56 -08:00
Tim Hockin 819803b79f Make VolumeSource not be a pointer
There's no reason for it to be a pointer.
2015-01-20 17:54:04 -08:00
Dawn Chen cf54dcb689 Using switch in validatePullPolicyWithDefault 2015-01-20 17:41:09 -08:00
Brian Grant dd45246150 Merge pull request #3587 from dchen1107/image
Clean up Kubernetes PullPolicy
2015-01-20 17:18:26 -08:00
Tim Hockin 60ec08db93 Rename HostDir to HostPath in v1beta3 2015-01-20 15:56:44 -08:00
Dawn Chen aec4594a8d Introduce validatePullPolicyWithDefault to validation. 2015-01-20 11:54:22 -08:00
Tim Hockin 6ff26d924c Merge pull request #3619 from smarterclayton/expose_validate_labels
Expose ValidateLabels in validation.go for reuse by other components
2015-01-20 09:11:08 -08:00
Clayton Coleman 48146e01cd Expose ValidateLabels in validation.go for reuse by other components
Label validation is common to anyone building kube resources.
2015-01-19 22:33:52 -05:00
Andrew Seidl 6dee1d7fa4 Fix typos in user-facing strings 2015-01-18 01:32:34 -06:00
Paul Morie fd834ae84d Pods should see services only from their own ns 2015-01-14 17:06:36 -05:00
Sam Ghods 7845ab90f8 Upgrade from gopkg.in/v2/yaml to gopkg.in/yaml.v2 everywhere 2015-01-13 15:06:25 -08:00
Tim Hockin 2ea27c3df3 Fix wrong field check in validation 2015-01-12 14:27:34 -08:00
Tim Hockin 4fcd496d59 change everything to use new util/errors 2015-01-08 22:10:03 -08:00
Daniel Smith 2050131b9a ParseOrDie -> MustParse; stop returning pointer 2015-01-07 15:21:35 -08:00
Daniel Smith 0d628b3bff Make semantic deep equal public feature
* Use semantic deep equal when validating
* More test cases for deep equal
2015-01-07 15:21:34 -08:00
Daniel Smith 7f49ba0dcf Put quantity into packages
kubelet, GCE, validation, client
2015-01-07 15:21:34 -08:00
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