Commit Graph

535 Commits (f32b390cf08a9afd9f9899e0d97a90eb162b32a8)

Author SHA1 Message Date
Dr. Stefan Schimanski da3322c2d9 apimachinery: remove unneeded GetObjectKind() impls 2017-07-08 18:37:37 +02:00
Chao Xu 7d5dbdaa09 manually fix protogen 2017-06-22 11:30:58 -07:00
Chao Xu e74c17a0ed vendorless path for informer-gen 2017-06-22 11:30:57 -07:00
Chao Xu e364f5e8ee let conversion-gen to choose localSchemeBuiler 2017-06-22 10:27:42 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Clayton Coleman cdfbeff1ba
Generate protobuf with stable ordered maps
The default marshalers from gogo-protobuf do not order keys, which means
successive serializations of the same data would result in same bytes.
Kubernetes leverages stable serialization to avoid excessive writes to
etcd when body content has not changed, which reduces the amount of
watch traffic generated by successive callers.

This will have a small memory impact on objects which have maps -
allocating a new string array for each map key. All maps must be keys
because we serialize those to JSON, so non-string types are not
relevant.
2017-06-17 14:32:50 -04:00
Kubernetes Submit Queue e1efc5465d Merge pull request #45057 from caesarxuchao/fix-conversion-for-pr
Automatic merge from submit-queue (batch tested with PRs 45057, 47259)

Allow conversion-gen to take types that are not in the output path

Part of fixing https://github.com/kubernetes/kubernetes/issues/44065.

Partially address https://github.com/kubernetes/features/issues/282.

The first commit is the changes to the conversion-gen (and vendor).

The second commit moves the api/v1 types to staging, and the third commit shows the resulted changes in the generated conversions.
2017-06-09 15:16:41 -07:00
Chao Xu ab71a6ec60 fix conversion-gen 2017-06-07 16:23:25 -07:00
Kubernetes Submit Queue 6ed4bc7b97 Merge pull request #46828 from cblecker/links-update
Automatic merge from submit-queue (batch tested with PRs 46718, 46828, 46988)

Update docs/ links to point to main site

**What this PR does / why we need it**:
This updates various links to either point to kubernetes.io or to the kubernetes/community repo instead of the legacy docs/ tree in k/k
Pre-requisite for #46813

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```

@kubernetes/sig-docs-maintainers @chenopis @ahmetb @thockin
2017-06-06 11:43:18 -07:00
Dr. Stefan Schimanski 33e50da9f4 Rename {kube- ->}apiextensions-{-> api}server 2017-06-06 12:06:31 +02:00
Christoph Blecker 1bdc7a29ae
Update docs/ URLs to point to proper locations 2017-06-05 22:13:54 -07:00
Tim St. Clair d7d5435720
Generate protobuf for the audit API 2017-06-05 16:13:41 -07:00
Kubernetes Submit Queue aab12f217e Merge pull request #46726 from deads2k/crd-09-proto
Automatic merge from submit-queue

add protobuf for CRD

Adds protobuf encoding to CRD and simplifies loopback initialization.

xref: https://github.com/kubernetes/features/issues/95
2017-06-02 21:34:54 -07:00
Kubernetes Submit Queue caead74171 Merge pull request #45184 from DirectXMan12/feature/metrics-client-gen-tweaks
Automatic merge from submit-queue (batch tested with PRs 46801, 45184, 45930, 46192, 45563)

Tweak client-gen to support metrics API

This PR adds support to client-gen for readonly APIs as well as for customizing the resource name used for a given type.

This is required to support the clients generated for `k8s.io/metrics/pkg/apis/metrics`.

cc @caesarxuchao 

Currently based on #45180

**Release note**:
```release-note
NONE
```
2017-06-02 18:05:50 -07:00
deads2k 70006e13b2 add protobuf for CRD 2017-05-31 16:16:18 -04:00
Dan Winship 0683e55fc1 Add networking.k8s.io v1 API, with NetworkPolicy 2017-05-28 10:11:01 -04:00
Solly Ross 85c3ca1013 [go-to-protobuf] Quote tag cast{key,value,type}
When using a `cast{key,value,type}` that was injected via struct tag, we
need to make sure to quote the value when transfering it over to proto
tags.  Otherwise, it'll come through as unquoted, resulting in invalid
proto.

This was previously not a problem, since all values of `castkey` and
`casttype` were actually coming from the auto-injecting code which deals
with maps and aliases, which does correctly quote values.
2017-05-26 19:59:27 -04:00
Solly Ross 7b8e572d8a [go-to-protobuf] generate proto for k8s.io/metrics
This commit adds the `k8s.io/metrics` APIs to the list of packages for
which to generate protobuf.  Additionally, it adds
`k8s.io/client-go/pkg/apis/v1` as a non-generated (referenced) package.
2017-05-26 19:59:27 -04:00
Solly Ross fb40658f9d [go-to-protobuf] Skip private types and functions
Since go-to-protobuf doesn't care about functions or private types (only
public types), we can skip them.  This helps to clean up the generated
IDL: previously, the IDL contained erroneous imports due to matching
functions and private types which were not actually converted to protobuf,
but which were the same as functions and private types in other packages.
2017-05-26 19:59:06 -04:00
Chao Xu bc9b305f17 generated clients 2017-05-26 00:03:53 -07:00
Chao Xu 1500017111 go-to-protobuf take care of admissionregistration 2017-05-25 23:55:15 -07:00
Jeremy Whitlock 1b59dd887d add "admission" API group
This commit is an initial pass at providing an admission API group.
The API group is required by the webhook admission controller being
developed as part of https://github.com/kubernetes/community/pull/132
and could be used more as that proposal comes to fruition.
2017-05-19 10:17:37 -06:00
Kubernetes Submit Queue 8214f7bb29 Merge pull request #45839 from caesarxuchao/client-gen-vendor
Automatic merge from submit-queue

let client-gen understand vendor

This is extracted from #44784, where we move external api types to k8s.io/api. After the move, the types will locate at vendor/k8s.io/api/xxx. However, gengo index the parsed package using the import path, which is stripped of  the vendor/ prefix, so we'll need to strip the vendor/ prefix as necessary in client-gen.

This PR doesn't produce any change to the generated clientset yet since all types are still in the kubernetes repo.
2017-05-18 17:45:35 -07:00
Clayton Coleman bdd4d34c7d
generated: api changes 2017-05-18 10:07:47 -04:00
Kubernetes Submit Queue 6f4e0b66a7 Merge pull request #44685 from smarterclayton/serverside_get_api
Automatic merge from submit-queue (batch tested with PRs 44520, 45253, 45838, 44685, 45901)

API for server side tabular output

These are the APIs necessary to implement propsoal kubernetes/community#363

They consist of a new meta group (v1alpha1) that indicates these are alpha apis for the server as a whole, a new kind `TableList` which is a simple row + header arranged table capable of returning both object and columnar data, a `TableListOptions` for altering the behavior of the return, and `PartialObjectMetadata` which is an "interface" style API object which allows a client to ask any object for their metadata (without having to know how to parse the object or perform gymnastics).

Extracted from #40848

A few minor tweaks still required.
2017-05-16 21:28:00 -07:00
Chao Xu bd6a9604dc generated 2017-05-16 20:40:04 -07:00
Chao Xu 9288025c28 let client-gen understand vendor 2017-05-16 20:29:38 -07:00
Kubernetes Submit Queue 3f0ebbe884 Merge pull request #45247 from mbohlool/c3
Automatic merge from submit-queue (batch tested with PRs 45247, 45810, 45034, 45898, 45899)

Apiregistration v1alpha1→v1beta1

Promoting apiregistration api from v1alpha1 to v1beta1.

API Registration is responsible for registering an API `Group`/`Version` with
another kubernetes like API server. The `APIService` holds information
about the other API server in `APIServiceSpec` type as well as general
`TypeMeta` and `ObjectMeta`. The `APIServiceSpec` type have the main
configuration needed to do the aggregation. Any request coming for
specified `Group`/`Version` will be directed to the service defined by
`ServiceReference` (on port 443) after validating the target using provided
`CABundle` or skipping validation if development flag `InsecureSkipTLSVerify`
is set. `Priority` is controlling the order of this API group in the overall
discovery document.
The return status is a set of conditions for this aggregation. Currently
there is only one condition named "Available", if true, it means the
api/server requests will be redirected to specified API server.

```release-note
API Registration is now in beta.
```
2017-05-16 19:01:55 -07:00
Kubernetes Submit Queue e50ba62aa5 Merge pull request #45835 from ncdc/client-gen-more-groupName-override
Automatic merge from submit-queue (batch tested with PRs 45835, 45389)

client-gen: honor groupName overrides in customArgs

If there is a comment of the form "// +groupName=somegroup" or
"// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as
the name of the group in customArgs.GroupVersions and
customArgs.GroupVersionToInputPath.

@deads2k this lets OpenShift generate the correct group names for pkg/deploy (groupName=apps) and pkg/sdn (groupName=network), although we still need your hack to specify `--group`.

cc @smarterclayton @liggitt @sttts @kubernetes/sig-api-machinery-pr-reviews
2017-05-15 19:34:49 -07:00
Kubernetes Submit Queue 521d7d1ac5 Merge pull request #42472 from timchenxiaoyu/requesttypo
Automatic merge from submit-queue

fix request typo
2017-05-15 15:57:57 -07:00
mbohlool e2f20a3539 Promote apiregistration from v1alpha1 to v1beta1 2017-05-15 15:34:33 -07:00
Kubernetes Submit Queue 682f3a39a0 Merge pull request #45171 from ncdc/groupName-override
Automatic merge from submit-queue

Use groupName comment for listers/informers

If present, use the "// +groupName" doc comment as the desired group
name when generating listers and informers.

@kubernetes/sig-api-machinery-pr-reviews @smarterclayton @deads2k @liggitt @sttts
2017-05-15 14:14:21 -07:00
Andy Goldstein 84da322766 client-gen: honor groupName overrides in customArgs
If there is a comment of the form "// +groupName=somegroup" or
"// +groupName=somegroup.foo.bar.io", use the first field (somegroup) as
the name of the group in customArgs.GroupVersions and
customArgs.GroupVersionToInputPath.
2017-05-15 16:52:09 -04:00
Clayton Coleman c299a8049c
Add Table to meta.k8s.io/v1alpha1
Table is a generic tabular output that can be returned by servers to
enable clients to display data simply.
2017-05-15 10:50:49 -04:00
Solly Ross 1cbc825fb9 [client-gen] Support Read-Only APIs
This commit adds support for read-only APIs to client-gen.
If the tag `// +readonly=true` is used, only the {Get,List,Watch}
client methods will be generated.
2017-05-10 13:33:18 -04:00
Solly Ross 392b8da1d0 [client-gen] Allow overriding the resource name
This commit allows client-gen to generate clients where the resource
name does not directly correspond to the type name.

The tag `// +resourceName=<name>` can be used to override the resource
name.
2017-05-10 13:33:17 -04:00
Klaus Ma c78faec4ff Initialize scheduler cache with assigned non-terminated pods before scheduling. 2017-05-10 01:50:38 +08:00
Chao Xu 5f5a70f65f generated clientset changes
propagate to client-go
update-bazel.sh
2017-05-04 11:30:51 -07:00
Chao Xu bbb94e42c1 remove registry from testing/fixture.go; update client-gen to not use
registry in the generated clients
2017-05-04 11:30:51 -07:00
Andy Goldstein 11e4f149d9 Fix typo in lister-gen, regenerate
NamespaeLister -> NamespaceLister
2017-05-01 12:18:45 -04:00
Andy Goldstein a5761d8074 Use groupName comment for listers/informers
If present, use the "// +groupName" doc comment as the desired group
name when generating listers and informers.
2017-05-01 11:58:26 -04:00
deads2k b5f0e3d07e add APIService status conditions 2017-04-28 10:47:29 -04:00
Kubernetes Submit Queue b2d714a7ca Merge pull request #44888 from caesarxuchao/clean-deepcopy-init
Automatic merge from submit-queue

Prepare for move zz_generated_deepcopy.go to k8s.io/api

This is in preparation to move deep copies to with the types to the types repo (see https://github.com/kubernetes/gengo/pull/47#issuecomment-296855818). The init() function is referring the `SchemeBuilder` defined in the register.go in the same packge, so we need to revert the dependency.

This PR depends on https://github.com/kubernetes/gengo/pull/49, otherwise verification will fail.
2017-04-27 18:48:28 -07:00
Chao Xu d0b94538b9 make it possible to move SchemeBuilder with zz_generated.deepcopy.go 2017-04-27 16:57:29 -07:00
Chao Xu 0bac9b6aaa update list-gen to not import internal package in external listers 2017-04-26 14:41:09 -07:00
Andy Goldstein 54b6edc400 go-to-protobuf: actually skip - packages
If a package is prefixed with -, we are not supposed to be generating
protobuf for it. Make that actually happen :-)
2017-04-18 12:35:16 -04:00
Kubernetes Submit Queue a1684fea80 Merge pull request #42085 from cblecker/gofmt-fix
Automatic merge from submit-queue (batch tested with PRs 40055, 42085, 44509, 44568, 43956)

Fix gofmt errors

**What this PR does / why we need it**:
There were some gofmt errors on master. Ran the following to fix:
```
hack/verify-gofmt.sh | grep ^diff | awk '{ print $2 }' | xargs gofmt -w -s
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: none

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-04-17 15:39:07 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Kubernetes Submit Queue 7a1687dc93 Merge pull request #43081 from sttts/sttts-conversion-gen-dup-func-error
Automatic merge from submit-queue

conversion-gen: make duplicate func error message readable

Before you only got two hex pointer values.
2017-04-12 05:01:45 -07:00
Sahdev P. Zala 4af92ce967 Fix goling failure in conversion public function doc
The exported or public functions without a comment results into golint failure
in various generated files. The changes in this patch takes care of about 36
related lint failures.
Given below is an example lint error,
zz_generated.conversion.go:91:1: exported function
Convert_v1alpha1_Binding_To_servicecatalog_Binding should have comment or be
unexported
2017-04-11 15:04:57 -04:00