Commit Graph

482 Commits (ec6181d5d3cae2238d485ee75332ab9c09b619d9)

Author SHA1 Message Date
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot 32eccd413f Merge pull request #25562 from gtank/certificates-api-v9
Automatic merge from submit-queue

TLS bootstrap API group (alpha)

This PR only covers the new types and related client/storage code- the vast majority of the line count is codegen. The implementation differs slightly from the current proposal document based on discussions in design thread (#20439). The controller logic and kubelet support mentioned in the proposal are forthcoming in separate requests.

I submit that #18762 ("Creating a new API group is really hard") is, if anything, understating it. I've tried to structure the commits to illustrate the process.

@mikedanese @erictune @smarterclayton @deads2k

```release-note-experimental
An alpha implementation of the the TLS bootstrap API described in docs/proposals/kubelet-tls-bootstrap.md.
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-28 13:25:22 -07:00
k8s-merge-robot eb4b402d2e Merge pull request #28025 from ncdc/refactor-master-bootstrap-controller
Automatic merge from submit-queue

Add EndpointReconcilerConfig to master Config

Add EndpointReconcilerConfig to master Config to allow downstream integrators to customize the reconciler and reconciliation interval when starting a customized master

@kubernetes/sig-api-machinery @deads2k @smarterclayton @liggitt @kubernetes/rh-cluster-infra
2016-06-28 08:07:41 -07:00
George Tankersley 0439b694ca apiserver: enable certificates api 2016-06-27 14:29:16 -07:00
Andy Goldstein b55cede866 Add EndpointReconcilerConfig to master Config
Add EndpointReconcilerConfig to master Config to allow downstream integrators to customize the reconciler
and reconciliation interval when starting a customized master.
2016-06-27 09:22:30 -04:00
k8s-merge-robot 6dff5d24d1 Merge pull request #25769 from deads2k/remove-dead-discovery-code
Automatic merge from submit-queue

remove confusing, dead code from master.go

Found while chasing something else, looks completely dead.
2016-06-24 13:56:31 -07:00
Andy Goldstein 04ce042ff9 Extract interface for master endpoints reconciler.
Make the master endpoints reconciler an interface so its implementation can be overridden, if
desired.
2016-06-06 17:56:23 -04:00
k8s-merge-robot 99fab4a87d Merge pull request #25374 from brendandburns/plural
Automatic merge from submit-queue

Fix a bug with pluralization of third party resources

Fixes https://github.com/kubernetes/kubernetes/issues/25129

@kubernetes/sig-api-machinery 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-01 02:25:30 -07:00
deads2k 82096d1279 remove confusing, dead code from master.go 2016-05-31 15:48:36 -04:00
Eric Chiang ef40aa9572 pkg/master: enable certificates API and add rbac authorizer 2016-05-25 14:24:47 -07:00
Jordan Liggitt 29252acd1a Change rest storage Update interface to retrieve updated object
Add OldObject to admission attributes

Update resthandler Patch/Update admission plumbing
2016-05-23 21:09:26 -04:00
Casey Davenport 47248f3698 v1beta1 NetworkPolicy API definition and client support 2016-05-19 19:02:54 -07:00
Matt Liggett f5e8d41431 Finish implementing policy API.
Registry implementation and addition to the master.
2016-05-13 17:27:58 -07:00
k8s-merge-robot 667f586083 Merge pull request #25196 from luxas/auto_create_kube_system
Automatic merge from submit-queue

Automatically create the kube-system namespace

At the same time we ensure that the `default` namespace is present, it also creates `kube-system` if it doesn't exist.

`kube-system` will now exist from the beginning, and will be recreated every 10s if deleted, in the same manner as the `default` ns

This makes UX much better, no need for `kubectl`ing a `kube-system.yaml` file anymore for a function that is essential to Kubernetes (addons). For instance, this makes dashboard deployment much easier when there's no need to check for the `kube-system` ns first.

A follow up in the future may remove places where logic to manually create the kube-system namespace is present.

Also fixed a small bug where `CreateNamespaceIfNeeded` ignored the `ns` parameter and was hardcoded to `api.NamespaceDefault`.

@davidopp @lavalamp @thockin @mikedanese @bryk @cheld @fgrzadkowski @smarterclayton @wojtek-t @dlorenc @vishh @dchen1107 @bgrant0607 @roberthbailey

<!-- 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/25196)
<!-- Reviewable:end -->
2016-05-12 11:17:09 -07:00
Maciej Szulik 5ef870d4c7 Added JobTemplate, a preliminary step for ScheduledJob and Workflow 2016-05-10 21:48:39 +02:00
Brendan Burns b2bf960649 Add a test for pluralizing third party resources, fix bug. 2016-05-09 14:47:02 -07:00
Lucas Käldström 8ea3a9319c Automatically create the kube-system namespace 2016-05-05 22:27:49 +03:00
Clayton Coleman e0ebcf4216
Split the storage and negotiation parts of Codecs
The codec factory should support two distinct interfaces - negotiating
for a serializer with a client, vs reading or writing data to a storage
form (etcd, disk, etc). Make the EncodeForVersion and DecodeToVersion
methods only take Encoder and Decoder, and slight refactoring elsewhere.

In the storage factory, use a content type to control what serializer to
pick, and use the universal deserializer. This ensures that storage can
read JSON (which might be from older objects) while only writing
protobuf. Add exceptions for those resources that may not be able to
write to protobuf (specifically third party resources, but potentially
others in the future).
2016-05-05 12:08:23 -04:00
jianhuiz fdfe42ea44 move install of version handler to genericapiserver 2016-04-27 10:21:08 -07:00
k8s-merge-robot b04f6ffc48 Merge pull request #24646 from nikhiljindal/removeMasterDep
Automatic merge from submit-queue

Move SSHTunneler to genericapiserver and remove federated-apiserver's dependency on pkg/master

cc @jianhuiz
2016-04-25 19:50:37 -07:00
Wojciech Tyczynski c0020aff59 Merge pull request #24539 from smarterclayton/unify_stream_and_serial
Unify Streaming and normal Serializers
2016-04-25 11:25:16 +02:00
k8s-merge-robot 0d4b039d87 Merge pull request #24474 from deads2k/fix-version-registration
Automatic merge from submit-queue

stop changing the root path of the root webservice

We shouldn't mutate the root path of the root webservice (see usage).  Just write the path we want.
2016-04-23 17:51:56 -07:00
nikhiljindal f9f1e21e08 Moving master.SSHTunneler to genericapiserver 2016-04-22 11:47:05 -07:00
Clayton Coleman 3111985564 Handle streaming serializers more consistently
Add tests to watch behavior in both protocols (http and websocket)
against all 3 media types. Adopt the
`application/vnd.kubernetes.protobuf;stream=watch` media type for the
content that comes back from a watch call so that it can be
distinguished from a Status result.
2016-04-22 11:07:24 -04:00
deads2k 6670b73b18 make storage enablement, serialization, and location orthogonal 2016-04-21 08:18:55 -04:00
Prashanth Balasubramanian 0ac10c6cc2 PetSet type, apps apigroup 2016-04-20 18:49:31 -07:00
deads2k a79cb3c44e stop changing the root path of the root webservice 2016-04-19 13:08:46 -04:00
k8s-merge-robot e81663c824 Merge pull request #24006 from caesarxuchao/thirdparty-preferredversion
Automatic merge from submit-queue

Use the first version as thirdparty resource preferredVersion

First commit is a one-liner, which implements the server-half of #23985.

The other two commits rearrange the test code, and add back a commented out test of thirdparty resource.

@lavalamp @nikhiljindal
2016-04-17 16:02:59 -07:00
k8s-merge-robot 2b9637da6a Merge pull request #23945 from smarterclayton/move_reset_metrics
Automatic merge from submit-queue

Move /resetMetrics to DELETE /metrics

Reduces the surface area of the API server slightly and allows
downstream components to have deleteable metrics. After this change
genericapiserver will *not* have metrics unless the caller defines it
(allows different apiserver implementations to make that choice on their
own).

@wojtek-t
2016-04-17 05:58:26 -07:00
k8s-merge-robot d44457ebaf Merge pull request #23903 from zhouhaibing089/https-fix
Automatic merge from submit-queue

the component status health check should check whether the scheme of backend storage url is https or not

fix https://github.com/kubernetes/kubernetes/issues/23897, when querying the component status of etcd (backend storage), the scheme of url is not checked and use `http` always, this commit aims to fix this.
2016-04-16 20:22:57 -07:00
Clayton Coleman 0f95b91f96 Move /resetMetrics to DELETE /metrics
Reduces the surface area of the API server slightly and allows
downstream components to have deleteable metrics. After this change
genericapiserver will *not* have metrics unless the caller defines it
(allows different apiserver implementations to make that choice on their
own).
2016-04-15 11:44:17 -04:00
Chao Xu f315ffd8b1 make default thirdparty resource preferredVersion; adding back discovery tests 2016-04-12 10:09:09 -07:00
Clayton Coleman 3474911736 Implement a streaming serializer for watch
Changeover watch to use streaming serialization. Properly version the
watch objects. Implement simple framing for JSON and Protobuf (but not
YAML).
2016-04-11 11:22:05 -04:00
zhouhaibing089 597fdede5a the component status health check should check whether the scheme of backend storage url is https or not 2016-04-08 07:26:27 +08:00
deads2k e8fb35d4d8 refactor resource overrides as positive logic interface 2016-03-28 09:24:49 -04:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
Brendan Burns 1f5b4b8802 Address comments. 2016-03-24 15:44:31 -07:00
Brendan Burns 87a1635c93 Machine generated stuff 2016-03-22 14:41:37 -07:00
Brendan Burns a0fcbd1495 Enable third party resources. 2016-03-21 17:02:18 -07:00
CJ Cullen 5f3929f75d Add a SSHKey sync check to the master's healthz (when using SSHTunnels). 2016-03-17 19:14:25 -07: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
k8s-merge-robot 89c9c24987 Merge pull request #21964 from caesarxuchao/fix-thirdparty-parameter
Auto commit by PR queue bot
2016-03-07 00:59:17 -08:00
k8s-merge-robot a435537e27 Merge pull request #21966 from madhusudancs/scale-deployment-replicaset
Auto commit by PR queue bot
2016-03-04 14:40:10 -08:00
Madhusudan.C.S fa0794098f Define etcd storage methods for replicationcontrollers/scale subresource.
Also register replicationcontrollers/scale subresource. Along with
registering the resource, also specify the cross-group override for the
subresource since Scale belongs belongs to autoscaling/v1 but
ReplicationController belongs to api/v1.
2016-03-04 11:02:37 -08:00
Madhusudan.C.S 9e99f9fa0e Register scale subresource for Deployments and ReplicaSets.
Define etcd registry methods for scale subresource in Deployments and
ReplicaSets. Register them with the API server.
2016-03-04 11:01:36 -08:00
Wojciech Tyczynski 506899008f Parallelization of namespace deletion 2016-02-25 16:33:25 +01:00
Chao Xu 5b108acb38 fix ParameterCodec for thirdparty resource 2016-02-24 21:45:30 -08:00
Wojciech Tyczynski 4eadc5e97b Introduce RESTOptions to configure per-resource storage 2016-02-22 16:28:28 +01:00
Eric Tune ab8cfb968f Enabled batch API group in apiserver 2016-02-19 09:20:56 -08:00
k8s-merge-robot f1cbaed60f Merge pull request #17493 from feihujiang/supportSubresourceOfServiceProxy
Auto commit by PR queue bot
2016-02-18 18:22:59 -08:00