Commit Graph

9866 Commits (458eb5284abd6933c620ba8ea383032f225e0885)

Author SHA1 Message Date
Clayton Coleman 3262d8efd8 GENERATED: all 2016-01-22 13:27:28 -05:00
Clayton Coleman 4a6935b31f Remaining codec change refactors 2016-01-22 13:27:27 -05:00
Clayton Coleman 33085c0cf2 Update tests to handle codec changes 2016-01-22 13:27:26 -05:00
Clayton Coleman 2fd38a7dc0 Break kubectl from assuming details of codecs
Most of the logic related to type and kind retrieval belongs in the
codec, not in the various classes. Make it explicit that the codec
should handle these details.

Factory now returns a universal Decoder and a JSONEncoder to assist code
in kubectl that needs to specifically deal with JSON serialization
(apply, merge, patch, edit, jsonpath). Add comments to indicate the
serialization is explicit in those places. These methods decode to
internal and encode to the preferred API version as previous, although
in the future they may be changed.

React to removing Codec from version interfaces and RESTMapping by
passing it in to all the places that it is needed.
2016-01-22 13:27:26 -05:00
Clayton Coleman 181dc7c64c Update thirdpartyresourcecodec with new Decoder 2016-01-22 13:27:25 -05:00
Clayton Coleman fb4ea845f1 resource_printer was not leveraging runtime interfaces
In general, everything in kubectl/* needs to be ignorant of api/* unless
it deals with a concrete type - this change forces resource_printer to
accept interface abstractions (that are already part of kubectl).
2016-01-22 13:27:25 -05:00
Clayton Coleman efe88e0818 Update client library to react to changes in Decoding 2016-01-22 13:27:24 -05:00
Zach Loafman 68771fe26a Merge pull request #18169 from kargakis/smarter-scaling
kubectl: Make scaling smarter
2016-01-22 10:24:51 -08:00
Zach Loafman f3a638de31 Merge pull request #16067 from smarterclayton/backoff_conflict
Provide a RetryOnConflict helper for client libraries
2016-01-22 10:23:19 -08:00
Arsen Mamikonyan 8b5e9e2885 Change repository references to https://github.com/kubernetes/kubernetes 2016-01-22 10:23:14 -05:00
Clayton Coleman 24a7919002 Update clientcmd.Config to use new Decode methods 2016-01-22 01:10:23 -05:00
Clayton Coleman 4386e8cc38 Change legacy ABAC decode to use new Decoder
The new Decode() method is able to deserialize an unknown type when an
explicit Into is provided.
2016-01-22 01:10:23 -05:00
Clayton Coleman 4d127dc969 Initialize API servers with negotiated serializers
Pass down into the server initialization the necessary interface for
handling client/server content type negotiation. Add integration tests
for the negotiation.
2016-01-22 01:10:22 -05: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
Clayton Coleman 125ef6fbc8 Support content-type negotiation in the API server
A NegotiatedSerializer is passed into the API installer (and
ParameterCodec, which abstracts conversion of query params) that can be
used to negotiate client/server request/response serialization. All
error paths are now negotiation aware, and are at least minimally
version aware.

Watch is specially coded to only allow application/json - a follow up
change will convert it to use negotiation.

Ensure the swagger scheme will include supported serializations - this
now includes application/yaml as a negotiated option.
2016-01-22 00:12:50 -05:00
Clayton Coleman 6b2f70d553 Provide a JSON and YAML serializer, and a versioning wrapper
Add a recognizer that is capable of sniffing content type from data by
asking each serializer to try to decode - this is for a "universal
decoder/deserializer" which can be used by client logic.

Add codec factory, which provides the core primitives for content type
negotiation. Codec factories depend only on schemes, serializers, and
groupversion pairs.
2016-01-22 00:12:49 -05:00
Clayton Coleman 63a7a41ddf Simplify Codec and split responsibilities
Break Codec into two general purpose interfaces, Encoder and Decoder,
and move parameter codec responsibilities to ParameterCodec.

Make unversioned types explicit when registering - these types go
through conversion without modification.

Switch to use "__internal" instead of "" to represent the internal
version. Future commits will also add group defaulting (so that "" is
expanded internally into a known group version, and only cleared during
set).

For embedded types like runtime.Object -> runtime.RawExtension, put the
responsibility on the caller of Decode/Encode to handle transformation
into destination serialization. Future commits will expand RawExtension
and Unknown to accept a content encoding as well as bytes.

Make Unknown a bit more powerful and use it to carry unrecognized types.
2016-01-21 23:18:32 -05:00
Clayton Coleman 6582b4c2ea Remove codec awareness from conversion
Allow convertors to be specialized, some cleanup to how conversion
functions are stored internally to allow better reuse.
2016-01-21 23:18:32 -05:00
Clayton Coleman 9d5df20efe jsonpath: Handle interface{}(nil) as empty array 2016-01-21 23:18:31 -05:00
Alex Mohr ca69c2e310 Merge pull request #19967 from justinsb/fix_gce_npe
Fix for panic when instance not found
2016-01-21 17:20:58 -08:00
Nikhil Jindal cd2e0c490e Merge pull request #19674 from nikhiljindal/latestAndRegistered
Merge registered and latest and move to apimachinery
2016-01-21 17:19:49 -08:00
Justin Santa Barbara 2201c631b3 Fix for panic when instance not found
This removes a panic I mistakenly introduced when an instance is not
found, and also restores the exact prior behaviour for
getInstanceByName, where it returns cloudprovider.InstanceNotFound when
the instance is not found.
2016-01-21 19:15:09 -05:00
Alex Mohr 69b28ce7e5 Merge pull request #19892 from krousey/rtwrap
Add WrappedRoundTripper methods to round trippers
2016-01-21 16:04:51 -08:00
Alex Mohr 4ac2f7453d Merge pull request #19533 from kargakis/bloated-job-status-fix
Fix job status conditions bloat
2016-01-21 15:10:49 -08:00
Alex Mohr 9546909929 Merge pull request #19366 from ironcladlou/noop-zero-replicas
Support rolling update to 0 desired replicas
2016-01-21 15:08:20 -08:00
Alex Mohr 12845ba9a5 Merge pull request #18877 from markturansky/fix_18830
Trigger syncClaim after PV provisioning to reduce wait
2016-01-21 15:06:46 -08:00
Chao Xu 0734248e42 Use lowercase names in individual typed clients 2016-01-21 15:01:47 -08:00
Chao Xu 030043b5be Ingress's plural 2016-01-21 15:01:47 -08:00
Alex Mohr ba6c939b3e Merge pull request #19887 from liggitt/export_transports
Export transport constructors
2016-01-21 14:54:40 -08:00
nikhiljindal 2ad642d370 Merge registered and latest and move to apimachinery 2016-01-21 14:42:21 -08:00
Alex Mohr 7d96694c3f Merge pull request #19725 from timstclair/summary
Add blank /stats/summary kubelet endpoint
2016-01-21 14:27:53 -08:00
Alex Mohr 359c684d57 Merge pull request #19698 from kargakis/expose-deployments
kubectl: Support exposing deployments
2016-01-21 14:26:14 -08:00
Alex Mohr 21a5d57c75 Merge pull request #19481 from deads2k/fix-patch-admission
make patch call update admission chain after applying the patch
2016-01-21 14:23:19 -08:00
Alex Mohr ad5dce89f0 Merge pull request #19790 from mqliang/podgc-event
remove unused eventBroadcaster in gc controller
2016-01-21 13:54:12 -08:00
Mike Danese 1fc630caa0 add ip validation to componentconfig command line 2016-01-21 13:33:30 -08:00
Justin Santa Barbara cc8e11b8d4 Update generated code for NonMasqueradeCIDR field 2016-01-21 15:18:38 -05:00
Justin Santa Barbara 58191c446c Allow non-masquerade-cidr to be passed to the kubelet
Removing the hard-coding of 10.0.0.0/8

Issue #11204
2016-01-21 15:18:31 -05:00
Alex Mohr f64a40f315 Merge pull request #19863 from justinsb/aws_fix_loadbalancer_tcp_check
AWS: Eliminate assumptions about all load-balancer ports matching
2016-01-21 10:52:20 -08:00
Alex Mohr b8f8a62775 Merge pull request #19862 from justinsb/aws_fix_tcploadbalancer_comment
AWS: Fix comment to reflect new method name
2016-01-21 10:51:37 -08:00
Alex Mohr 8e9bebb424 Merge pull request #19861 from justinsb/aws_remove_dead_code
AWS: Remove dead code
2016-01-21 10:51:06 -08:00
Alex Mohr a77f7205ea Merge pull request #19506 from a-robinson/goversion
Resolve old TODO that was waiting on us to move off of go 1.3
2016-01-21 10:42:06 -08:00
Alex Mohr 94b2490eba Merge pull request #19580 from WeixuZhuang/node
resolve the bug when cluster CIDR is not /8
2016-01-21 10:34:19 -08:00
Alex Mohr 819cdc85d3 Merge pull request #19390 from danielschonfeld/optimize-kubelet-heartbeat-aws
optimize kubelet heartbeats instance data to be cached for AWS
2016-01-21 10:33:00 -08:00
Alex Mohr c52122cab5 Merge pull request #19675 from apcera/kubelet-report-runtime-version
Update container runtime to properly report the engine and version
2016-01-21 10:31:19 -08:00
Alex Mohr 1ab41d5238 Merge pull request #16509 from miminar/namespace_field_conv
Add missing field label conversions for Namespace
2016-01-21 10:27:02 -08:00
Alex Mohr d2d349bc84 Merge pull request #19334 from resouer/network
Networking should be used to hold network related pkgs
2016-01-21 10:26:13 -08:00
Alex Mohr 8c9aa2af33 Merge pull request #19733 from janetkuo/flaky-deployment-recreate
Fix e2e flake: Sync deployment status when with RecreateDeploymentStrategy
2016-01-21 10:23:21 -08:00
Alex Mohr eaa61a72b0 Merge pull request #17919 from justinsb/multizone_gce
Ubernetes Lite support for GCE
2016-01-21 10:22:34 -08:00
Alex Mohr 79e0c9f5e5 Merge pull request #19842 from yujuhong/status_update
Don't handle graceful deletion of mirror pods in status manager
2016-01-21 09:24:46 -08:00
Alex Mohr 9a264c4b41 Merge pull request #19838 from yujuhong/empty_add
Fix empty ADD update on kubelet restarts
2016-01-21 09:22:53 -08:00
k8s-merge-robot dda29bedd8 Merge pull request #18722 from deads2k/add-sar
Auto commit by PR queue bot
2016-01-21 07:06:05 -08:00
k8s-merge-robot cf8d05f420 Merge pull request #19042 from madhusudancs/replicaset
Auto commit by PR queue bot
2016-01-21 06:29:22 -08:00
k8s-merge-robot 6cf3a4b5f0 Merge pull request #18957 from jsafrane/devel/pv-name-tag
Auto commit by PR queue bot
2016-01-21 05:55:12 -08:00
k8s-merge-robot 0f6f521beb Merge pull request #18959 from jsafrane/devel/cinder-tags
Auto commit by PR queue bot
2016-01-21 03:33:58 -08:00
k8s-merge-robot 7f25a4f662 Merge pull request #18997 from mqliang/env-variable
Auto commit by PR queue bot
2016-01-21 03:03:19 -08:00
k8s-merge-robot e2c79915fd Merge pull request #18820 from mqliang/image-gc-bug
Auto commit by PR queue bot
2016-01-21 01:22:29 -08:00
k8s-merge-robot 3978c76a26 Merge pull request #18790 from erictune/secret-validate
Auto commit by PR queue bot
2016-01-21 00:46:49 -08:00
Madhusudan.C.S 572abe1c50 Introducing ReplicaSet, a new incarnation of Replication Controller.
This commit adds the API types, conversion, validation and defaulting code.
2016-01-21 00:38:42 -08:00
k8s-merge-robot 2374a3225a Merge pull request #18319 from madhusudancs/daemonset-update
Auto commit by PR queue bot
2016-01-21 00:17:42 -08:00
k8s-merge-robot d0f59e2126 Merge pull request #18172 from Random-Liu/generate-sync-event
Auto commit by PR queue bot
2016-01-20 22:48:35 -08:00
k8s-merge-robot 8ed248021e Merge pull request #17650 from jsafrane/devel/cinder-format
Auto commit by PR queue bot
2016-01-20 22:18:25 -08:00
k8s-merge-robot 03ecde1277 Merge pull request #17535 from mesosphere/jdef_abspath_breaks_proxies
Auto commit by PR queue bot
2016-01-20 21:46:47 -08:00
Chao Xu ee6f03f55a Fix UpdateStatus 2016-01-20 21:15:07 -08:00
Justin Santa Barbara 43cbfb74fe Ubernetes Lite GCE: Support multiple zones in GCE cloud provider
We adapt the existing code to work across all zones in a region.

We require a feature-flag to enable Ubernetes-Lite

Reasons:

* There are some behavioural changes if users create volumes with
the same name in two zones.
* We don't want to make one API call per zone if we're not running
Ubernetes-Lite.
* Ubernetes-Lite is still experimental.

There isn't a parallel flag implemented for AWS, because at the moment
there would be no behaviour changes from this.
2016-01-20 23:04:53 -05:00
Clayton Coleman 29028a1332 Fix unrelated log level error 2016-01-20 22:58:17 -05:00
Clayton Coleman 33660e001a Update service account tokens controller to use client.RetryOnConflict 2016-01-20 22:58:17 -05:00
Clayton Coleman 4342fccc0d Provide a RetryOnConflict helper for client libraries
Used like:

    var pod *api.Pod
    err := client.RetryOnConflict(client.DefaultBackoff, func() (err error) {
      pod, err = c.Pods("mynamespace").UpdateStatus(update)
      return
    })
    // err may be conflict
2016-01-20 22:58:16 -05:00
Ken Robertson a7b07c01df Update container runtime to properly report the engine and version
This address a TODO when collecting the node version information so it
will properly report the configured runtime and its version. Previously,
this was hardcoded to "docker://" and the docker version, and would show
"docker://1.9.1" even when the kubelet was configured to use rkt.

With this change, it will use the runtime's Type() and Version() data.

This also changes the container.Runtime interface to add an APIVersion()
method. This can be used when the runtime has separate versions for the
engine and the API, such as with Docker. The Docker minimum version
validation has been updated to use APIVersion(), and
DockerManager.Version() now returns the engine version.
2016-01-20 16:42:25 -08:00
Kris 8cc483dc74 Add WrappedRoundTripper methods to round trippers
Proxy dialing code relies on this to get to the underlying
http.Transport for custom dialers and TLSConfigs.
2016-01-20 15:39:57 -08:00
liggitt 605979673b Export transport constructors 2016-01-20 17:30:40 -05:00
Alex Mohr a9050679a5 Merge pull request #19520 from janetkuo/deployment-expectation-fix
Fix e2e flake: Fix incorrect expectation when deployment scaling down old rcs
2016-01-20 13:44:30 -08:00
deads2k e90c2bd7dc make patch call update admission chain after applying the patch 2016-01-20 16:21:27 -05:00
Madhusudan.C.S 664589df71 Auto-generated code. 2016-01-20 10:44:26 -08:00
Madhusudan.C.S bd3b476bbf Update types, add defaulting code, conversions and validation. 2016-01-20 10:44:19 -08:00
Madhusudan.C.S 6a6699a1b2 Add new types for DaemonSet update. 2016-01-20 10:33:49 -08:00
Yu-Ju Hong dc5b35a570 Set default status to pending for pods from non-apiserver sources 2016-01-20 09:36:01 -08:00
Justin Santa Barbara 0586d866de AWS: Eliminate assumptions about all load-balancer ports matching
It costs us basically nothing to just check all the ports, and
protects us against future changes to the controller.
2016-01-20 09:30:46 -05:00
Justin Santa Barbara 12dd568662 AWS: Fix comment to reflect new method name
TCPLoadBalancer.EnsureTCPLoadBalancer => LoadBalancer.EnsureLoadBalancer
2016-01-20 09:28:28 -05:00
Justin Santa Barbara 30882265b6 AWS: Remove dead code
I think I added these functions by mistake; they aren't used and
apparently never were.
2016-01-20 09:23:53 -05:00
Dan Mace eb778217ad Support rolling update to 0 desired replicas
Support a desired replica count of 0 for the new RC. Users sometimes
want to roll out a new "inactive" template with the intent of scaling
it up manually later.
2016-01-20 09:21:13 -05:00
deads2k 14396fc464 add subject access review types 2016-01-20 08:24:15 -05:00
k8s-merge-robot 1c861d43ac Merge pull request #18298 from pmorie/secret-env
Auto commit by PR queue bot
2016-01-20 03:55:40 -08:00
k8s-merge-robot 6c8bf484d2 Merge pull request #15322 from mattjmcnaughton/15229-rename-ValidatePositiveField-and-ValidatePositiveQuantity
Auto commit by PR queue bot
2016-01-20 02:35:12 -08:00
k8s-merge-robot ecf6038720 Merge pull request #19734 from caesarxuchao/generate-fake-client
Auto commit by PR queue bot
2016-01-19 20:42:59 -08:00
Chao Xu fb81b2278e client-gen now generates the fake client. 2016-01-19 17:27:17 -08:00
k8s-merge-robot 864065be97 Merge pull request #19621 from mikedanese/retrofit-controller-manager
Auto commit by PR queue bot
2016-01-19 17:22:42 -08:00
Yu-Ju Hong f1535a0d4c Don't handle graceful deletion of mirror pods in status manager 2016-01-19 16:47:57 -08:00
James DeFelice 75f487f7bf AbsPath should be compatible with proxy-prefixes:
- replace Config.Prefix with .Host and .APIPath
- Request .path promoted to .pathPrefix, .baseURL holds required prefix
2016-01-20 00:31:58 +00:00
Mike Danese 39c7ea57b0 test: make ValidateCount throw an error instead of a log
We can either fix it here or at every callsite. Every callsite is
currently using this method incorrectly.

Signed-off-by: Mike Danese <mikedanese@google.com>
2016-01-19 15:59:32 -08:00
Eric Tune 4a3d4defdf Validate kubernetes.io/dockerconfigjson secrets
Added unit test.
2016-01-19 12:35:30 -08:00
Jan Safranek f912870784 openstack: Use common SafeFormatAndMount() for mounting.
There is no reason for OpenStack + Cinder to use it's own variant of format
& mount.
2016-01-19 09:36:38 +01:00
Matt McNaughton 90d68a53b3 Rename Positive qualifier to Nonnegative
It makes more sense for `ValidatePositiveField` and
`ValidatePositiveQuantity` methods to be named `ValidateNonnegativeField`
and `ValidateNonnegativeQuantity` as that is what is truly being
checked. This commit simply updates the method names everywhere they are
used.
2016-01-18 17:29:15 -05:00
Mike Danese a885d84cc9 leaderelection: retrofit controller-manager with leaderelection client
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-01-18 14:05:55 -08:00
Paul Morie 60cf252e8b Add validation for variant-type of EnvVarSource 2016-01-18 15:07:48 -05:00
Paul Morie 394a7bb4d0 Regen for secrets in env 2016-01-18 12:32:32 -05:00
Paul Morie c548054560 Add ability to consume secrets in env vars 2016-01-18 12:20:51 -05:00
Marek Grabowski 810544633e Merge pull request #19751 from mikedanese/fix-nil
deployment: fix nil pointer panic
2016-01-18 18:08:33 +01:00
mqliang 6fe899b007 remove unused eventBroadcaster in gc controller 2016-01-18 20:40:11 +08:00
Piotr Szczesniak 9659057986 Revert "Enable kubecontainer.Cache in kubelet" 2016-01-18 13:35:41 +01:00
Lantao Liu 4c37dbe6e6 Merge pull request #19690 from Random-Liu/fix-bug-in-status-test
Fix bug in status/manager_test.go
2016-01-18 01:15:16 -08:00