Commit Graph

296 Commits (f229aa0ad65a0378645a68ebc7ca2bf65e4957e9)

Author SHA1 Message Date
Clayton Coleman 72ee028cab Gracefully delete pods from the Kubelet
This commit wires together the graceful delete option for pods
on the Kubelet.  When a pod is deleted on the API server, a
grace period is calculated that is based on the
Pod.Spec.TerminationGracePeriodInSeconds, the user's provided grace
period, or a default.  The grace period can only shrink once set.
The value provided by the user (or the default) is set onto metadata
as DeletionGracePeriod.

When the Kubelet sees a pod with DeletionTimestamp set, it uses the
value of ObjectMeta.GracePeriodSeconds as the grace period
sent to Docker.  When updating status, if the pod has DeletionTimestamp
set and all containers are terminated, the Kubelet will update the
status one last time and then invoke Delete(pod, grace: 0) to
clean up the pod immediately.
2015-06-01 19:23:59 -04:00
Chao Xu 0798ea9ff7 remove ReplicationControllerSpec.TemplateRef from v1beta3/types.go and v1/types.go for now 2015-05-28 17:41:47 -07:00
Justin Santa Barbara 7346cc8042 Add ServiceType = NodePort; wire everything up 2015-05-22 19:14:28 -04:00
Justin Santa Barbara 973c2e4819 Add Type to ServiceSpec: ClusterIP or LoadBalancer 2015-05-22 19:14:21 -04:00
Tim Hockin 65833e42c4 rename CapabilityType Capability 2015-05-18 17:21:30 -07:00
Tim Hockin a548d542db Rename AffinityType to ServiceAffinity 2015-05-18 17:21:30 -07: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 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
Clayton Coleman 12ba4e2452 Do not automatically decode runtime.RawExtension
Make clients opt in to decoding objects that are stored
in the generic api.List object by invoking runtime.DecodeList()
with a set of schemes. Makes it easier to handle unknown
schema objects because decoding is in the control of the code.

Add runtime.Unstructured, which is a simple in memory
representation of an external object.
2015-04-29 12:53:07 -04:00
Tim Hockin 635c393a5a Merge pull request #6105 from markturansky/yoko_pv_mgr
PersistentVolumeClaimBinder
2015-04-27 13:35:44 -07:00
markturansky beacd8722a addressed feedback. added opt-in cmd line flag 2015-04-27 15:00:01 -04:00
Paul Morie 7d30f09ebf Add downward API for environment vars 2015-04-27 14:13:11 -04:00
markturansky a04420e548 Added pending phase for volumes. added defaults for PV/PVC. refactored to better phase transitioning in control loops 2015-04-27 12:05:12 -04:00
Tim Hockin c320931d6a Easier fuzzing for volumes 2015-04-20 16:29:52 -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 b3666ed08c Add AWSPersistentDisk to fuzzer 2015-04-10 13:25:43 -07:00
Vishnu Kannan f4f08c3378 Fix duplicate fuzz config. 2015-04-07 23:29:24 +00: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
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
Tim Hockin 186818d787 WIP: Implement multi-port Services 2015-03-30 19:28:11 -07:00
Brian Grant f0da47b2dd Merge pull request #5763 from smarterclayton/get_input_parameters_versioned
Expose versioned query parameters and make watch an operation on List
2015-03-27 14:35:23 -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
Clayton Coleman 1618c39a46 Convert List query parameters via object conversion
Convert url.Values -> an object, with appropriate versioning. ListOptions
should also expose parameter names to swagger.
2015-03-27 15:03:57 -04:00
derekwaynecarr 29c491ef2e Namespace.Spec.Finalizer support 2015-03-24 10:36:06 -04: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
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
Dawn Chen 34e9c82c70 Convert RestartPolicy to string for v1beta3.
Fixed #3607 and spiritually support #5475
2015-03-13 18:38:07 -07:00
derekwaynecarr 7de138a9bb Add a NamespacePhase to Namespace 2015-03-10 14:11:54 -04:00
Clayton Coleman dfc19185f5 Add a subbindings resource as /pods/{name}/binding
Allows POST to create a binding as a child. Also refactors internal
and v1beta3 Binding to be more generic (so that other resources can
support Bindings).
2015-03-09 15:37:19 -04:00
Tim Hockin fd1e49ce2f Use new gofuzz features 2015-03-07 00:04:14 -08:00
Tim Hockin 5aadd6ecae Change the v1b3 default for service ContainerPort
In v1b1 and v1b2 we choose the "first defined port" if you do not specify a
ContainerPort.  I am proposing that v1b3 just assume the ContainerPort is the
same as the service port unless explicitly provided.  This leaves named ports
for now, but that is under discussion on its own.

This is strictly compatible, though to implement this we have to leave the
internal objects with the looser behavior until v1b[12] die.  This also adds a
link dependency so that when we DO kill v1b[12] the endpoints controller will
blow up, prompting a fix.
2015-03-03 09:40:18 -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
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 8bdfc352ce minor fixups as I review secrets 2015-02-23 12:39:47 -08:00
Tim Hockin 160f288832 Implement multi-port Endpoints
This is a part of multi-port services.
2015-02-22 09:35:12 -08:00
Tim Hockin ae0062d001 Part 2 of plural ports: make endpoints a struct
Includes conversions for v1b[12] and tests and fixups for call sites.
2015-02-18 19:54:15 -08:00
Paul Morie fb001ada21 Secret API resource 2015-02-18 11:54:56 -05:00
saadali 79cbcf918e Modify Event struct to allow compressing multiple recurring events in to a single event.
# *** ERROR: *** Some API files are missing the required field descriptions
# Add description tags to all non-inline fields in the following files:
#   pkg/api/v1beta1/types.go
#   pkg/api/v1beta2/types.go
#
# Your commit will be aborted unless you fix these.
#   COMMIT_BLOCKED_ON_DESCRIPTION
2015-02-05 21:50:29 -08: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
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