Commit Graph

193 Commits

Author SHA1 Message Date
Devan Goodwin
bf69fb1747 kubeadm: Default to using token discovery.
Recent changes to support multiple methods for discovery meant that
"kubeadm init" no longer was sufficient and users would need to add
"--discovery token://" to achieve the same results.

Instead lets assume discovery if the user does not specify anything else
to maintain parity and the brevity of our original instructions.
2016-12-22 12:54:34 -04:00
Robert Rati
91931c138e [scheduling] Moved node affinity from annotations to api fields. #35518 2016-12-16 11:42:43 -05:00
Mike Danese
690c7e578b kubeadm: refactor discovery behind an interface 2016-12-15 13:54:49 -08:00
Clayton Coleman
3454a8d52c
refactor: update bazel, codec, and gofmt 2016-12-03 19:10:53 -05:00
Clayton Coleman
5df8cc39c9
refactor: generated 2016-12-03 19:10:46 -05:00
Dan Winship
b684f73e5c Fix a broken custom fuzzer
Trying to create IntStrs from int64s rather than int32s resulted in
lots of glog.Error messages that showed up when running tests with
"-v".
2016-12-01 09:24:44 -05:00
Dan Winship
b8b8b22a9e Test both nil and empty slices in fuzzer tests 2016-12-01 09:23:55 -05:00
Clayton Coleman
35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Maciej Szulik
41d88d30dd Rename ScheduledJob to CronJob 2016-11-07 10:14:12 +01:00
Marcin
26acced6d8 Add policy api version v1beta1 and disable v1alpha1 2016-11-03 13:26:27 +01:00
Mike Danese
030cb6927b kubeadm: fix central api tests 2016-11-01 16:48:45 -07:00
deads2k
8c788233e7 change rbac roleref type 2016-09-09 09:55:51 -04:00
Huamin Chen
dea4b0226d support Azure data disk volume
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-08-23 13:23:07 +00:00
Rodrigo Campos
568f4c2e63 Add mode permission bits to configmap, secrets and downwardAPI
This implements the proposal in:
docs/proposals/secret-configmap-downwarapi-file-mode.md

Fixes: #28317.

The mounttest image is updated so it returns the permissions of the linked file
and not the symlink itself.
2016-08-17 14:44:41 -04:00
Maciej Szulik
df124fed14 ScheduledJob suspend being pointer leftovers 2016-08-02 21:15:30 +02:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Maciej Szulik
feb43c5e6d Reapply ScheduledJob tests (2ab885a53a) 2016-06-21 14:55:00 +02:00
Piotr Szczesniak
ba1c8a2ac5 Revert "ScheduledJob tests" 2016-06-10 16:22:04 +02:00
Maciej Szulik
2ab885a53a Revert commit a31ca0dc98 and move batch/v2alpha1 tests to separate group in KUBE_TEST_API_VERSIONS 2016-06-10 01:11:56 +02:00
Huamin Chen
4b4048a084 correction on rbd volume object and defaults
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-06 17:27:47 +00:00
k8s-merge-robot
e543bd6452 Merge pull request #26007 from smarterclayton/watch_opt
Automatic merge from submit-queue

Additional optimizations to the encode/decode paths

Builds on top of #25983 with a number of other optimizations.
2016-05-28 06:27:00 -07:00
Avesh Agarwal
1931931494 Downward API implementation for resources limits and requests 2016-05-24 12:22:35 -04:00
Clayton Coleman
a24936355e
Precalculate String() for fuzzed Quantity
Avoids biasing serialization results where the value is assumed to
be in canonical form already.
2016-05-21 23:55:42 -04:00
k8s-merge-robot
c63ac4e664 Merge pull request #24331 from jsafrane/devel/refactor-binder
Automatic merge from submit-queue

Refactor persistent volume controller

Here is complete persistent controller as designed in https://github.com/pmorie/pv-haxxz/blob/master/controller.go

It's feature complete and compatible with current binder/recycler/provisioner. No new features, it *should* be much more stable and predictable.

Testing
--
The unit test framework is quite complicated, still it was necessary to reach reasonable coverage (78% in `persistentvolume_controller.go`). The untested part are error cases, which are quite hard to test in reasonable way - sure, I can inject a VersionConflictError on any object update and check the error bubbles up to appropriate places, but the real test would be to run `syncClaim`/`syncVolume` again and check it recovers appropriately from the error in the next periodic sync. That's the hard part.

Organization
---
The PR starts with `rm -rf kubernetes/pkg/controller/persistentvolume`. I find it easier to read when I see only the new controller without old pieces scattered around.
[`types.go` from the old controller is reused to speed up matching a bit, the code looks solid and has 95% unit test coverage].

I tried to split the PR into smaller patches, let me know what you think.

~~TODO~~
--

* ~~Missing: provisioning, recycling~~.
* ~~Fix integration tests~~
* ~~Fix e2e tests~~

@kubernetes/sig-storage

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24331)
<!-- Reviewable:end -->

Fixes #15632
2016-05-19 03:06:46 -07:00
Jan Safranek
0be1512f1c Add ClaimLost phase. 2016-05-17 15:14:07 +02:00
k8s-merge-robot
e0f7de94f5 Merge pull request #25279 from piosz/hpa-ga
Automatic merge from submit-queue

Move internal types of hpa from pkg/apis/extensions to pkg/apis/autoscaling

ref #21577

@lavalamp could you please review or delegate to someone from CSI team?
@janetkuo could you please take a look into the kubelet changes?

cc @fgrzadkowski @jszczepkowski @mwielgus @kubernetes/autoscaling
2016-05-11 13:19:42 -07:00
Phillip Wittrock
680b2b9d09 Kubectl support for validating nested objects with different ApiGroups (e.g. Lists containing objects in different api groups). Closes #24089 2016-05-09 19:38:40 -07:00
Piotr Szczesniak
212b459817 Move internal types of hpa from pkg/apis/extensions to pkg/apis/autoscaling 2016-05-09 09:18:13 +02:00
k8s-merge-robot
346ddc52c2 Merge pull request #24748 from Random-Liu/cleanup-with-new-engine-api
Automatic merge from submit-queue

Kubelet: Cleanup with new engine api

Finish step 2 of #23563

This PR:
1) Cleanup go-dockerclient reference in the code.
2) Bump up the engine-api version.
3) Cleanup the code with new engine-api.

Fixes #24076.
Fixes #23809.

/cc @yujuhong
2016-05-06 03:16:53 -07:00
Clayton Coleman
fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
Random-Liu
3876972d3f Clean up go-dockerclient reference. 2016-04-29 13:32:19 -07:00
Maciej Szulik
a3b4447305 Move internal types of job from pkg/apis/extensions to pkg/apis/batch 2016-04-25 11:03:54 +02:00
Brendan Burns
87a1635c93 Machine generated stuff 2016-03-22 14:41:37 -07:00
Wojciech Tyczynski
218d3e5923 Rename RawJSON to Raw in runtime.Unknown and add ContentType & ContentEncoding. 2016-03-16 16:43:58 +01:00
Madhusudan.C.S
fe26381c90 Support for both map-based and set-based selectors in extensions/v1beta1.Scale
Here are a list of changes along with an explanation of how they work:
1. Add a new string field called TargetSelector to the external version of
   extensions Scale type (extensions/v1beta1.Scale). This is a serialized
   version of either the map-based selector (in case of ReplicationControllers)
   or the unversioned.LabelSelector struct (in case of Deployments and
   ReplicaSets).
2. Change the selector field in the internal Scale type (extensions.Scale) to
   unversioned.LabelSelector.
3. Add conversion functions to convert from two external selector fields to a
   single internal selector field. The rules for conversion are as follows:
   i.   If the target resource that this scale targets supports LabelSelector
        (Deployments and ReplicaSets), then serialize the LabelSelector and
        store the string in the TargetSelector field in the external version
        and leave the map-based Selector field as nil.
   ii.  If the target resource only supports a map-based selector
        (ReplicationControllers), then still serialize that selector and
	store the serialized string in the TargetSelector field. Also,
	set the the Selector map field in the external Scale type.
   iii. When converting from external to internal version, parse the
        TargetSelector string into LabelSelector struct if the string isn't
	empty. If it is empty, then check if the Selector map is set and just
	assign that map to the MatchLabels component of the LabelSelector.
   iv.  When converting from internal to external version, serialize the
        LabelSelector and store it in the TargetSelector field. If only
	the MatchLabel component is set, then also copy that value to
	the Selector map field in the external version.
4. HPA now just converts the LabelSelector field to a Selector interface
   type to list the pods.
5. Scale Get and Update etcd methods for Deployments and ReplicaSets now
   return extensions.Scale instead of autoscaling.Scale.
6. Consequently, SubresourceGroupVersion override and is "autoscaling"
   enabled check is now removed from pkg/master/master.go
7. Other small changes to labels package, fuzzer and LabelSelector
   helpers to piece this all together.
8. Add unit tests to HPA targeting Deployments and ReplicaSets.
9. Add an e2e test to HPA targeting ReplicaSets.
2016-03-09 17:54:17 -08:00
Eric Tune
4d090bfb09 Rename PodSecurityPolicy fields
In podSecurityPolicy:
1. Rename .seLinuxContext to .seLinux
2. Rename .seLinux.type to .seLinux.rule
3. Rename .runAsUser.type to .runAsUser.rule
4. Rename .seLinux.SELinuxOptions

1,2,3 as suggested by thockin in #22159.
I added 3 for consistency with 2.
2016-03-03 11:49:48 -08:00
Eric Tune
875755f992 Added Selector Generation to Job.
Added selector generation to Job's
strategy.Validate, right before validation.
Can't do in defaulting since UID is not known.

Added a validation to Job to ensure that the generated
labels and selector are correct when generation was requested.
This happens right after generation, but validation is in a better
place to return an error.

Adds "manualSelector" field to batch/v1 Job to control selector generation.
Adds same field to extensions/__internal.  Conversion between those two
is automatic.

Adds "autoSelector" field to extensions/v1beta1 Job.  Used for storing batch/v1 Jobs
    - Default for v1 is to do generation.
    - Default for v1beta1 is to not do it.
    - In both cases, unset == false == do the default thing.

Release notes:
Added batch/v1 group, which contains just Job, and which is the next
version of extensions/v1beta1 Job.

The changes from the previous version are:
- Users no longer need to ensure labels on their pod template are unique to the enclosing
  job (but may add labels as needed for categorization).
- In v1beta1, job.spec.selector was defaulted from pod labels, with the user responsible for uniqueness.
  In v1, a unique label is generated and added to the pod template, and used as the selector (other
  labels added by user stay on pod template, but need not be used by selector).
- a new field called "manualSelector" field exists to control whether the new behavior is used,
  versus a more error-prone but more flexible "manual" (not generated) seletor.  Most users
  will not need to use this field and should leave it unset.

Users who are creating extensions.Job go objects and then posting them using the go client
will see a change in the default behavior.  They need to either stop providing a selector (relying on
selector generation) or else specify "spec.manualSelector" until they are ready to do the former.
2016-02-25 09:28:07 -08:00
Piotr Szczesniak
d9705940d6 Fixed and added tests 2016-02-15 21:39:00 +01:00
Madhusudan.C.S
ad9ba23995 Comment out DaemonSet update type fields and remove the code that depends on it.
Leaving the type fields as comments for reference and reminder. But
deleting the conversion, defaulting and validation code. They can
always be brough back from the previous PR once the types are
introduced. Because builds break without them anyway that serves as a
reminder, so there is no need to leave them commented out.
2016-02-10 15:44:01 -08:00
Paul Weil
03261146b0 api 2016-02-05 08:45:50 -05:00
Mike Danese
216a35d988 run serialization tests on all apigroups registered in testapi 2016-02-03 17:41:02 -08:00
Clayton Coleman
c1d932e44a Switch API objects to not register per version codecs
Remove Codec from versionInterfaces in meta (RESTMapper is now agnostic
to codec and serialization). Register api/latest.Codecs as the codec
factory and use latest.Codecs.LegacyCodec(version) as an equvialent to
the previous codec.
2016-01-22 01:10:21 -05:00
Tim St. Clair
e50059de07 Enforce minimum resource granularity
Enforce minimum resource granularity of milli-{core, bytes} for Storage,
Memory, and CPU resource types. For Storage and Memory, milli-bytes are
allowed for backwards compatability, but the behavior is
undefinied (depends on docker implementation).
2016-01-07 14:55:19 -08:00
k8s-merge-robot
500493a3ac Merge pull request #18925 from caesarxuchao/refactor-registration
Auto commit by PR queue bot
2015-12-24 15:19:36 -08:00
k8s-merge-robot
16e1de6db6 Merge pull request #18859 from deads2k/gv-grab-bag
Auto commit by PR queue bot
2015-12-23 23:57:24 -08:00
Chao Xu
2b5b708b70 Refactor the API registration and installation 2015-12-23 22:44:25 -08:00
deads2k
d41e7ecf53 miscellaneous group version updates 2015-12-21 09:52:50 -05:00
Wojciech Tyczynski
58336829be Switch to versioned ListOptions in server. 2015-12-21 14:23:37 +01:00
Tim St. Clair
8fdd321dc1 Add Allocatable to NodeStatus
Adds `Allocatable` to `NodeStatus`, as described in
[17201](https://github.com/kubernetes/kubernetes/pull/17201)
2015-12-16 11:01:15 -08:00
Wojciech Tyczynski
960808bf08 Switch to versioned ListOptions in client. 2015-12-14 14:26:09 +01:00
Anish Bhatt
6e46fa1fd4 Add support for open-iscsi transports.
This enables use of software or hardware transports viz. be2iscsi,
bnx2i, cxgb3i, cxgb4i, qla4xx, iser and ocs. The default transport
(tcp) happens to be called "default".

Use of non-default transports changes the disk path to the following format:
/dev/disk/by-path/pci-<pci_id>-ip-<portal>-iscsi-<iqn>-lun-<lun_id>
2015-12-08 17:28:06 -08:00
deads2k
f764e0099c Update ObjectTyper to GroupVersion 2015-12-07 08:35:05 -05:00
k8s-merge-robot
77e9066ebb Merge pull request #17099 from feihujiang/moveDefaultingFuncsFromInternalToV1
Auto commit by PR queue bot
2015-12-01 07:13:26 -08:00
Clayton Coleman
e9e02bdd50 Review comments 2015-11-26 11:53:38 -05:00
Clayton Coleman
9d19238f6c Fix tests to pass with changed external types 2015-11-26 11:53:37 -05:00
k8s-merge-robot
3bd23b185b Merge pull request #17730 from wojtek-t/use_unversioned_list_options_in_client
Auto commit by PR queue bot
2015-11-25 09:10:19 -08:00
k8s-merge-robot
3e56ce6490 Merge pull request #17327 from deads2k/gv-restmapper
Auto commit by PR queue bot
2015-11-24 19:08:49 -08:00
Wojciech Tyczynski
b6ef62af24 Use unversioned.ListOptions in clients. 2015-11-24 16:52:09 +01:00
deads2k
5077e9b644 make register.GroupVersion use GroupVersion 2015-11-24 09:45:36 -05:00
Wojciech Tyczynski
bf13bef955 Use unversioned.ListOptions in API server. 2015-11-24 14:42:21 +01: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
feihujiang
8cf6d785b7 Move defaulting funcs from internal to v1 2015-11-11 15:09:16 +08:00
k8s-merge-robot
9981f99949 Merge pull request #16849 from feihujiang/cleanupDeprecatedV1beta1Content
Auto commit by PR queue bot
2015-11-07 04:15:32 -08:00
Tim St. Clair
1e88a682da Add liveness/readiness probe parameters
- PeriodSeconds - How often to probe
- SuccessThreshold - Number of successful probes to go from failure to success state
- FailureThreshold - Number of failing probes to go from success to failure state

This commit includes to changes in behavior:

1. InitialDelaySeconds now defaults to 10 seconds, rather than the
kubelet sync interval (although that also defaults to 10 seconds).
2. Prober only retries on probe error, not failure. To compensate, the
default FailureThreshold is set to the maxRetries, 3.
2015-11-06 10:46:40 -08:00
feihujiang
eac8d6a997 Cleanup the content of deprecated V1beta1 2015-11-06 13:42:51 +08:00
Paul Morie
393e2bc019 Inline some SecurityContext fields into PodSecurityContext 2015-10-21 19:01:17 -04:00
Jerzy Szczepkowski
df732f061a HorizontalPodAutoscaler API: removal of ResourceConsumption target, introduction of CPU request utilization & other cleanups. 2015-10-16 07:15:50 +02:00
Chao Xu
7c9f4cc42f experimental. -> extensions. 2015-10-09 15:49:10 -07:00
Chao Xu
67f316dd19 apis/experimental->apis/extensions 2015-10-09 15:04:41 -07:00
Paul Morie
227dd82119 Add PodSecurityContext and backward compatibility tests 2015-10-05 21:05:27 -04:00
Daniel Martí
586cb9126a Move pkg/util.Time to pkg/api/unversioned.Time
Along with our time.Duration wrapper, as suggested by @lavalamp.
2015-09-17 17:51:27 -07:00
Kris
f4ad00d9ae Moving Status object to a common package 2015-09-17 14:09:53 -07:00
k8s-merge-robot
36eb7372c8 Merge pull request #13259 from soltysh/job_controller_logic
Auto commit by PR queue bot
2015-09-17 13:22:34 -07:00
Maciej Szulik
8cefa2ee55 Job controller logic 2015-09-17 10:05:33 +02:00
Sam Ghods
cc6754f8d9 Rename Deployment API structs 2015-09-15 14:46:41 -07:00
Daniel Smith
4c2adabf42 move; sed replace 2015-09-11 16:03:22 -07:00
Brendan Burns
2df5010834 Merge branch 'sdminonne-container_sidecar' 2015-09-02 10:42:08 -07:00
nikhiljindal
30a58321e8 Adding defaults to Deployment 2015-09-01 23:48:34 -07:00
Salvatore Dario Minonne
f4dc0653aa adding downward api volume plugin 2015-09-01 22:23:03 +02:00
Prashanth B
52f7833cd3 Revert "Revert "LimitRange updates for Resource Requirements Requests"" 2015-08-28 09:26:36 -07:00
Mike Danese
8460e3913d move daemon controller to the experimental api 2015-08-27 11:47:35 -07:00
Chao Xu
fc9c2ddf0c add a fuzz function for expapi.APIVersion 2015-08-26 15:23:36 -07:00
Clayton Coleman
02dbb95447 Add TerminationGracePeriodSeconds to API
Set defaulting for pod spec
2015-08-20 11:03:38 -04:00
Robert Bailey
08e6a43c1d Revert "Merge pull request #9165 from smarterclayton/graceful"
This reverts commit 4f856b595d, reversing
changes made to d78525a83b.

Conflicts:
	pkg/kubelet/status_manager.go
2015-08-18 17:34:49 -07:00
Clayton Coleman
b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00
Satnam Singh
bee48f4ce5 Merge pull request #12035 from AnanyaKumar/requests
Add support for request
2015-08-07 14:27:34 -07:00
AnanyaKumar
d9b85652ae Add Daemon API 2015-08-06 13:15:19 -07:00
Ananya Kumar
ef1e576810 Add support for request 2015-08-05 19:00:19 -07:00
Mike Danese
17defc7383 run gofmt on everything we touched 2015-08-05 17:52:56 -07:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Tim Hockin
1c3233a1d4 Remove v1beta3 2015-07-23 17:21:27 -07:00
nikhiljindal
fc4da6844e removing references to pre v1beta3 apis 2015-07-08 13:51:43 -07:00
Steve Kuznetsov
3008ff6150 Changed HTTPGetAction to allow user-defined schemes 2015-06-25 16:59:12 -04:00
Quinton Hoole
8b01ecb53a Merge pull request #9024 from markturansky/recyc_controllers
PersistentVolumeRecycler controller
2015-06-05 11:39:08 -07:00
Yifan Gu
f197a9db4e kubelet: Minor refactors.
Remove some TODOs.
Unexport DockerManager.Puller and DockerManager.PodInfraContainerImage.
Add "docker" for all "go-dockerclient" imports.
2015-06-04 16:08:45 -07:00
markturansky
2829fadfad PV Recycling API 2015-06-04 15:39:34 -04:00
Filip Grzadkowski
98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
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