Commit Graph

275 Commits (452b8c9e0da3c979e565557623cbe2cfa5302666)

Author SHA1 Message Date
Kubernetes Submit Queue d4b678036f
Merge pull request #63200 from deads2k/api-09-duplicate
Automatic merge from submit-queue (batch tested with PRs 62911, 63200). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

stop duplicating preferred version order 

`GroupMeta` includes two fields for a preferred groupVersion, `.GroupVersion` and `.GroupVersion[0]`.  This collapses onto the latter.

@kubernetes/sig-api-machinery-pr-reviews 

lots of ripples, but eliminate of duplication is good.
/assign @sttts 
/assign @cheftako 


```release-note
NONE
```
2018-04-26 09:43:06 -07:00
David Eads a9518acacd generated 2018-04-26 10:03:37 -04:00
David Eads a68c57155e remove KUBE_API_VERSIONS 2018-04-26 08:27:49 -04:00
David Eads e931158128 generated 2018-04-25 09:02:32 -04:00
David Eads e7fbbe0e3c eliminate indirection from type registration 2018-04-25 09:02:31 -04:00
Kubernetes Submit Queue 5dde701b87
Merge pull request #62412 from bhcleek/go1.10
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

generated code should pass go vet for go1.10

**What this PR does / why we need it**:

Update code generator and the code it generates to pass `go vet`.

go1.10 runs `go vet` whenever `go test` is run. Because of this, generated code for CRDs needs to pass `go vet`.

**Release note**:

```release-note
Code generated for CRDs now passes `go vet`.
```
2018-04-20 06:22:31 -07:00
Billie Cleek 95ad9009c3 regenerate fakes 2018-04-18 16:09:36 -07:00
Kubernetes Submit Queue 71e00a6b8e
Merge pull request #61608 from php-coder/psp_move_internal_types_to_policy
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

PSP: move internal types to policy API group

**What this PR does / why we need it**:
This is a part of the PSP migration from extensions to policy API group. This PR moves internal types to the its final destination.

**Which issue(s) this PR fixes**:
Addressed to https://github.com/kubernetes/features/issues/5
2018-04-13 05:22:24 -07:00
Slava Semushin 6767e233ed Update generated files.
In order to make it compilable I had to remove these files manually:

pkg/client/listers/extensions/internalversion/podsecuritypolicy.go
pkg/client/informers/informers_generated/internalversion/extensions/internalversion/podsecuritypolicy.go
pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/podsecuritypolicy.go
pkg/client/clientset_generated/internalclientset/typed/extensions/internalversion/fake/fake_podsecuritypolicy.go
2018-04-11 18:35:24 +02:00
Mikhail Mazurskiy c3e57fceb3
Re-generate clientsets 2018-04-09 19:12:47 +10:00
fisherxu b49ef6531c regenerated all files and remove all YEAR fields 2018-03-08 17:52:48 +08:00
jennybuckley c8dacd8e63 Run hack/update-all.sh 2018-02-26 17:16:14 -08:00
pigletfly 5eba676508 Fix typo 2018-02-01 19:11:19 +08:00
hzxuzhonghu 1f013b7dea run update code-gen 2018-01-24 16:45:23 +08:00
Kubernetes Submit Queue 268555a30a
Merge pull request #57504 from yue9944882/fix-fake-client-dummy-watch
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

feat(fakeclient): push event on watched channel on add/update/delete

**What this PR does / why we need it**:

This PR enables watch function for kubernetes [fakeclient](1bcf0b0a22/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go (L88)). 

This fake client add watchReactorFunction by wrapping [watch.NewFake](1bcf0b0a22/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go (L98)) which is a `chan Event` but actually nothing pushes objects into this channel. So all watch function called by fake client will never return or never receive any object. 

This PR intercepts ReactionFunc of `Create / Update / DeleteActionImpl` and will push the requested object to channel. 

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

Fixes #54075

**Special notes for your reviewer**:

**Release note**:

```dev-release-note
enable watch function for fake client
```
2018-01-16 08:39:03 -08:00
yue9944882 6f381ab2cd Regenerating code of fake clientset 2018-01-16 22:11:43 +08:00
Allen Petersen 3d69cea1e5 Update generated files 2018-01-02 22:13:19 -08:00
Christoph Blecker 80e344644e
Regenerate all generated code 2018-01-02 00:21:07 -08:00
Marek Grabowski ef6f0b8c6e generated 2017-11-22 18:40:09 +00:00
Saad Ali 9f294c1ad0 Generated files for new VolumeAttachemnt object 2017-11-14 17:08:49 -08:00
Kubernetes Submit Queue ae2edc439e
Merge pull request #55413 from liggitt/internal-autoscaling
Automatic merge from submit-queue (batch tested with PRs 53047, 54861, 55413, 55395, 55308). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Switch internal scale type to autoscaling, enable apps/v1 scale subresources

xref #49504

* Switch workload internal scale type to autoscaling.Scale (internal-only change)
* Enable scale subresources for apps/v1 deployments, replicasets, statefulsets

```release-note
NONE
```
2017-11-10 07:00:44 -08:00
mbohlool 4568e0530c Update generated files for MutatingWebhookConfiguration 2017-11-09 15:33:50 -08:00
mbohlool cb43840492 Update generated files 2017-11-09 11:39:52 -08:00
Jordan Liggitt f927f2ab89
generated files 2017-11-09 13:42:15 -05:00
Dr. Stefan Schimanski bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski 012b085ac8 pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
Dr. Stefan Schimanski d13b936a2a pkg/apis/core: fixup conversion func names in dependencies 2017-11-09 12:14:07 +01:00
Nikhita Raghunath e9bb42d3bc remove generated files with tpr 2017-11-03 21:16:51 +05:30
Nikhita Raghunath 6a87d99a38 generated files: remove tpr 2017-11-03 21:16:10 +05:30
Dr. Stefan Schimanski cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Dr. Stefan Schimanski 60a0eb260c Update generated files 2017-10-06 12:36:51 +02:00
Kubernetes Submit Queue bee221cca9 Merge pull request #51638 from mfojtik/client-gen-custom-methods
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

Allow custom client verbs to be generated using client-gen

This change will allow to define custom verbs for resources using the following new tag:

```
// +genclient:method=Foo,verb=create,subresource=foo,input=Bar,output=k8s.io/pkg/api.Blah
```

This will generate client method `Foo(bar *Bar) (*api.Blah, error)` (format depends on the particular verb type)

With this change we can add `UpdateScale()` and `GetScale()` into all scalable resources. Note that intention of this PR is not to fix the Scale(), but that is used as an example of this new capability.
Additionally this will also allow us to get rid of `// +genclient:noStatus` and fix guessing of the "updateStatus" subresource presence based on the existence of '.Status' field.
Basically you will have to add following into all types you want to generate `UpdateStatus()` for:

```
// +genclient:method=UpdateStatus,verb=update,subresource=status
```

This allows further extension of the client without writing an expansion (which proved to be pain to maintain and copy...). Also allows to customize native CRUD methods if needed (input/output types).

```release-note
NONE
```
2017-09-03 11:10:09 -07:00
Kubernetes Submit Queue 94d9457e4e Merge pull request #51130 from luxas/fake_discovery
Automatic merge from submit-queue (batch tested with PRs 51335, 51364, 51130, 48075, 50920)

Add the possibility to set return values for the FakeDiscovery implementation

**What this PR does / why we need it**:

As an user of the fake clientset (with the fake discovery), I want to be able to set the fake server's version on demand like this for example:

```go
func TestFakingServerVersion(t *testing.T) {
	client := fakeclientset.NewSimpleClientset()
	fakeDiscovery, ok := client.Discovery().(*fakediscovery.FakeDiscovery)
	if !ok {
		t.Fatalf("couldn't convert Discovery() to *FakeDiscovery")
	}

	testGitCommit := "v1.0.0"
	fakeDiscovery.FakedServerVersion = &version.Info{
		GitCommit: testGitCommit,
	}

	sv, err := client.Discovery().ServerVersion()
	if err != nil {
		t.Fatalf("unexpected error: %v", err)
	}
	if sv.GitCommit != testGitCommit {
		t.Fatalf("unexpected faked discovery return value: %q", sv.GitCommit)
	}
}
```

This PR makes that possible, in wait for a more sophisticated FakeDiscovery implementation generally.

**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-api-machinery-pr-reviews
2017-09-02 18:18:51 -07:00
Michal Fojtik 7d2be1c521
generate UpdateScale and GetScale verbs for scalable resources 2017-09-01 14:25:46 +02:00
Michal Fojtik ba731a6cca
update bazel 2017-09-01 14:25:46 +02:00
xilabao 790374da10 create the methods in the generated expansion files 2017-09-01 19:15:59 +08:00
Chen Rong ed8adf6e51 generated 2017-09-01 19:11:19 +08:00
Lucas Käldström e1cff67aa6
autogenerated code 2017-08-27 18:32:14 +03:00
Dr. Stefan Schimanski 6bc9f3fba6 Update generated files 2017-08-15 11:56:46 +02:00
Dr. Stefan Schimanski b0b5de6eaf Port internal extensions/Network* to networking.k8s.io API group 2017-08-15 11:56:46 +02:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Dr. Stefan Schimanski 3b310d8989 Update generated code 2017-08-06 15:32:28 +02:00
Eric Chiang baa536fbca generated
Commands run:

	./hack/update-codegen.sh
2017-08-02 10:27:36 -07:00
Michal Fojtik e6be341a64
regenerate clients 2017-07-24 22:35:19 +02:00
Michal Fojtik dad4ee3108
regenerate clients to pickup updated genclient:noStatus comment 2017-07-24 22:05:21 +02:00
Chao Xu 09ee053ceb remove external clientset, listers, informers from kubernetes 2017-07-21 13:35:23 -07:00
Janet Kuo 56f16346d2 Autogen
make clean && make generated_files && hack/update-all.sh
2017-07-20 14:16:43 -07:00