Commit Graph

318 Commits (c10cc3decdd25717eaca5fccfd7cfebb3e09e5ec)

Author SHA1 Message Date
deads2k a6b655fb6a add back just enough empty packages to allow heapster cycles to succeed 2017-01-17 08:07:30 -05:00
deads2k 67fac70ea3 remove files moved to apimachinery 2017-01-17 07:46:34 -05:00
Clayton Coleman 211b1df998
Mark meta/v1 as writable temporarily
Allow openapi-gen tag to be removed from the directory.
2017-01-16 16:13:30 -05:00
Clayton Coleman 62d1ae96c1
Generate for staging directories that are not client-go 2017-01-16 16:13:29 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
deads2k facc34fea5 move tests which need to stay in k8s.io/kubernetes for API scheme 2017-01-10 10:04:32 -05:00
Kubernetes Submit Queue 07ce35a325 Merge pull request #39490 from deads2k/generic-16-bump-gengo
Automatic merge from submit-queue (batch tested with PRs 39466, 39490, 39527)

bump gengo to latest

bumping gengo to limit surprises while working on https://github.com/kubernetes/kubernetes/pull/39475

@kubernetes/sig-api-machinery-misc
2017-01-06 11:30:13 -08:00
deads2k f86447c9a0 files regenerated after update 2017-01-06 11:45:40 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Jeff Grafton fae627dd65 Update generated for 2017 2017-01-01 23:11:09 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Kubernetes Submit Queue 36c20d1f5e Merge pull request #38525 from juanvallejo/jvallejo/fix-panic-on-invalid-json-syntax
Automatic merge from submit-queue (batch tested with PRs 38525, 38977)

Prevent json decoder panic on invalid input

Related downstream issue: https://github.com/openshift/origin/issues/12132
```
# Can be replicated on kubectl with:
$ cat panic.json
{
  "kind": "Pod",
  "apiVersion": "v1",
  "metadata": {
    "name": "",
    "labels": {
      "name": ""
    },
    "generateName": "",
    "namespace": "",
    "annotations": []
  },
  "spec": {}
},

$ kubectl create -f panic.json --validate=false
```

**Release note**:
```release-note
release-note-none
```

This patch handles cases where `ioutil.ReadAll` will return a single
character output on an invalid json input, causing the `Decode` method
to panic when it tries to calculate the line number for the syntax
error. The example below would cause a panic due to the trailing comma
at the end:

```
{
  "kind": "Pod",
  "apiVersion": "v1",
  "metadata": {
    "name": "",
    "labels": {
      "name": ""
    },
    "generateName": "",
    "namespace": "",
    "annotations": []
  },
  "spec": {}
},
```

@kubernetes/cli-review @fabianofranz
2016-12-19 13:23:03 -08:00
Kubernetes Submit Queue 641654836b Merge pull request #36518 from apelisse/owners-pkg-runtime
Automatic merge from submit-queue

Curating Owners: pkg/runtime

cc @lavalamp @smarterclayton @deads2k @caesarxuchao

In an effort to expand the existing pool of reviewers and establish a
two-tiered review process (first someone lgtms and then someone
experienced in the project approves), we are adding new reviewers to
existing owners files.


If You Care About the Process:
------------------------------

We did this by algorithmically figuring out who’s contributed code to
the project and in what directories.  Unfortunately, that doesn’t work
well: people that have made mechanical code changes (e.g change the
copyright header across all directories) end up as reviewers in lots of
places.

Instead of using pure commit data, we generated an excessively large
list of reviewers and pruned based on all time commit data, recent
commit data and review data (number of PRs commented on).

At this point we have a decent list of reviewers, but it needs one last
pass for fine tuning.

Also, see https://github.com/kubernetes/contrib/issues/1389.

TLDR:
-----

As an owner of a sig/directory and a leader of the project, here’s what
we need from you:

1. Use PR https://github.com/kubernetes/kubernetes/pull/35715 as an example.

2. The pull-request is made editable, please edit the `OWNERS` file to
remove the names of people that shouldn't be reviewing code in the
future in the **reviewers** section. You probably do NOT need to modify
the **approvers** section. Names asre sorted by relevance, using some
secret statistics.

3. Notify me if you want some OWNERS file to be removed.  Being an
approver or reviewer of a parent directory makes you a reviewer/approver
of the subdirectories too, so not all OWNERS files may be necessary.

4. Please use ALIAS if you want to use the same list of people over and
over again (don't hesitate to ask me for help, or use the pull-request
above as an example)
2016-12-13 13:27:17 -08:00
Antoine Pelisse 220daccfd7 Update OWNERS approvers and reviewers: pkg/runtime 2016-12-12 16:49:23 -08:00
Mike Danese c87de85347 autoupdate BUILD files 2016-12-12 13:30:07 -08:00
Clayton Coleman c52d510a24
refactor: generated 2016-12-10 18:05:53 -05:00
Clayton Coleman 42d410fdde
Switch to use pkg/apis/meta/v1/unstructured and the new interfaces
Avoid directly accessing an unstructured type if it is not required.
2016-12-10 18:05:28 -05:00
Clayton Coleman 8eb3e9a518
Move unstructured to its own package under v1
It is a versioned type.
2016-12-10 18:05:24 -05:00
juanvallejo 07ca219828 Prevent json decoder panic on invalid input
This patch handles cases where `ioutil.ReadAll` will return a single
character output on an invalid json input, causing the `Decode` method
to panic when it tries to calculate the line number for the syntax
error. The example below would cause a panic due to the trailing comma
at the end:

```
{
  "kind": "Pod",
  "apiVersion": "v1",
  "metadata": {
    "name": "",
    "labels": {
      "name": ""
    },
    "generateName": "",
    "namespace": "",
    "annotations": []
  },
  "spec": {}
},
```
2016-12-09 16:32:46 -05:00
Kubernetes Submit Queue 14ae96adbb Merge pull request #36736 from tianshapjq/json_test
Automatic merge from submit-queue (batch tested with PRs 36736, 35956, 35655, 37713, 38316)

delete one testcase from json_test.go for duplicated data

in json_test.go there are 2 duplicated tesecases. Here I'm going to delete one of them. Please review for this. thanks!
2016-12-08 19:51:52 -08:00
Chao Xu 8af15f4d30 let DirectEncoder take a hint of what gvk to set during its construction 2016-12-07 14:17:34 -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
Kubernetes Submit Queue 129d37bde5 Merge pull request #34775 from ivan4th/remove-copies-of-objectdiff
Automatic merge from submit-queue

Remove copies of ObjectDiff function
2016-12-02 06:18:34 -08:00
tianshapjq 617a1e74e0 delete one testcase from json_test.go for duplicated data 2016-11-30 09:08:08 +08:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
Clayton Coleman a43960da3b Move GroupVersion* to pkg/runtime/schema 2016-11-23 21:03:36 -06:00
Clayton Coleman 051382687d
Unversioned types should decode no matter what the requested version is
Status is exposed as v1 in the current schema (so all groups are
returning v1.Status).  However, if you give a codec only "mygroup"
"myversion", it will fail to convert Status to v1. For now, unversioned
types should be allowed to be projected into all group versions, and
when we add the server group we'll rip out the unversioned concept
entirely.
2016-11-01 22:55:59 -04:00
Clayton Coleman ca2f1b87ad
Replace negotiation with a new method that can extract info
Alter how runtime.SerializeInfo is represented to simplify negotiation
and reduce the need to allocate during negotiation. Simplify the dynamic
client's logic around negotiating type. Add more tests for media type
handling where necessary.
2016-10-28 11:30:11 -04:00
Clayton Coleman f9f680a937
Simplify RESTHander getter and remove specialized serializers 2016-10-28 11:30:11 -04:00
Mike Danese 3b6a067afc autogenerated 2016-10-21 17:32:32 -07:00
Clayton Coleman 1694cfb72d
Make defaulting part of versioning codec
Most normal codec use should perform defaulting. DirectCodecs should not
perform defaulting. Update the defaulting_test to fuzz the list of known
defaulters. Use the new versioning.NewDefaultingCodec() method.
2016-10-18 21:07:35 -04:00
Clayton Coleman 68a9983ec7
Add a new Default() method on Scheme
Allow defaulter functions to be registered with the scheme.
2016-10-18 21:07:32 -04:00
Kubernetes Submit Queue 6e2f5f8f6d Merge pull request #28742 from jessfraz/test-go1.7rc1
Automatic merge from submit-queue

Update to go 1.7

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

Closes #33070
Closes #32999

```release-note
Updated Go to 1.7
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

This is to test go version 1.7
2016-10-18 05:59:04 -07:00
mbohlool 0191433d58 Generated protobufs 2016-10-17 09:11:20 -07:00
mbohlool 25afcc5522 Add +optional tag to all fields with omitempty json tag 2016-10-17 08:52:13 -07:00
Jess Frazelle db33b491cc
update generated protobuf
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-13 21:22:59 -07:00
Ivan Shvedunov a4597c2d60 Remove copies of ObjectDiff function 2016-10-14 01:46:21 +03:00
Kubernetes Submit Queue 049ad98581 Merge pull request #34010 from soltysh/fix_edit_sj
Automatic merge from submit-queue

Match GroupVersionKind against specific version

Currently when multiple GVK match a specific kind in `KindForGroupVersionKinds` only the first will be matched, which not necessarily will be the correct one. I'm proposing to extend this to pick the best match, instead.

Here's my problematic use-case, of course it involves ScheduledJobs 😉:
I have a `GroupVersions` with `batch/v1` and `batch/v2alpha1` in that order. I'm calling `KindForGroupVersionKinds` with kind `batch/v2alpha1 ScheduledJob` and that currently results this matching first `GroupVersion`, instead of picking more concrete one. There's a [clear description](ee77d4e6ca/pkg/api/unversioned/group_version.go (L183)) why it is on single `GroupVersion`, but `GroupVersions` should pick this more carefully.

@deads2k this is your baby, wdyt?
2016-10-10 06:16:29 -07:00
deads2k 518d5500c7 remove testapi.Default.GroupVersion 2016-10-07 10:10:54 -04:00
Maciej Szulik 69f751a2a4 Match GroupVersionKind against specific version 2016-10-05 20:58:56 +02:00
Doug Davis 9d5bac6330 Change minion to node
Contination of #1111

I tried to keep this PR down to just a simple search-n-replace to keep
things simple.  I may have gone too far in some spots but its easy to
roll those back if needed.

I avoided renaming `contrib/mesos/pkg/minion` because there's already
a `contrib/mesos/pkg/node` dir and fixing that will require a bit of work
due to a circular import chain that pops up. So I'm saving that for a
follow-on PR.

I rolled back some of this from a previous commit because it just got
to big/messy. Will follow up with additional PRs

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-09-28 10:53:30 -07:00
Kubernetes Submit Queue edbe71ad58 Merge pull request #32529 from smarterclayton/move_unstructured
Automatic merge from submit-queue

Unstructured methods belong in unstructured.go

Simple code move

@krousey just movement
2016-09-15 01:05:31 -07:00
mbohlool 8153267ea8 Update generated proto and swagger docs 2016-09-12 18:47:03 -07:00
mbohlool 702f55e61d Add +k8s:openapi-gen tag to API types 2016-09-12 18:47:03 -07:00
Clayton Coleman c95b9df894 Unstructured methods belong in unstructured.go
Simple code move
2016-09-12 18:52:47 -04:00
jianhuiz 7be20b0dac add ClusterName field to ObjectMeta 2016-08-22 21:09:57 -07:00
Kara Alexandra d12a66a422 Rename IsEmpty to Empty
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
2016-08-19 14:19:19 -07:00
Clayton Coleman 12d7032c39
Encoding nested objects must support unregistered runtime.Objects
The nested object could be using a different scheme, or want to handle
runtime.Unknown.
2016-08-18 14:45:40 -04:00
Clayton Coleman 5f8366aac3
Convert() should accept the new conversion Context value
Allows Convert() to reuse the same conversions as ConvertToVersion
without being overly coupled to the version.
2016-08-18 14:45:20 -04:00