Commit Graph

2194 Commits (cd25bbee468fe00c2bc6ea7eefc7de7e6846e526)

Author SHA1 Message Date
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
Kubernetes Submit Queue fcde4c9b24 Merge pull request #51958 from deads2k/scheduler-03-typo
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>.

fix annoying leader election typo

Small typo that annoyed me. It expected `configmaps`
2017-10-09 14:55:18 -07:00
Kubernetes Submit Queue 6ac018af01 Merge pull request #53202 from sttts/sttts-unify-generator-mains
Automatic merge from submit-queue (batch tested with PRs 53434, 53202). 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>.

code-generator: unify generator main funcs and prepare for launching from one binary

- remove "generated by client-gen with custom arguments" message as this does not
  make sense in the times of k8s.io/code-generator
- unify generator main funcs and explicitly call pflag.AddFlags and pflag.Parse. This
  will allow to instantiate the generators also from other places.

Requires https://github.com/kubernetes/gengo/pull/80.

Closes https://github.com/kubernetes/kubernetes/issues/53522.
2017-10-06 11:13:32 -07:00
Dr. Stefan Schimanski 60a0eb260c Update generated files 2017-10-06 12:36:51 +02:00
Mik Vyatskov 9ba84ae717 Enable prometheus client metrics in apiserver
Signed-off-by: Mik Vyatskov <vmik@google.com>
2017-10-04 15:21:41 +02:00
Clayton Coleman 8b571bb63b
Disable default paging in list watches
For 1.8 this will be off by default. In 1.9 it will be on by default.
Add tests and rename some fields to use the `chunking` terminology.

Note that the pager may be used for other things besides chunking.
2017-09-06 23:10:59 -04:00
David Eads 11ed2bd714 fix annoying leader election typo 2017-09-05 14:08:21 -04: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 35ffb5c6cf Merge pull request #48921 from smarterclayton/paging_prototype
Automatic merge from submit-queue (batch tested with PRs 50832, 51119, 51636, 48921, 51712)

Alpha list paging implementation

Design in kubernetes/community#896

Support `?limit=NUMBER`, `?continue=CONTINUATIONTOKEN`, and a `continue` field
on ListMeta and pass through to etcd. Perform minor validation as an example.

```
# first out of three
$ curl http://127.0.0.1:8080/api/v1/namespaces?limit=1
{
  "kind": "NamespaceList",
  "apiVersion": "v1",
  "metadata": {
    "selfLink": "/api/v1/namespaces",
    "resourceVersion": "146",
    "next": "ZGVmYXVsdA"
  },
  "items": [
    {
      "metadata": {
        "name": "default",
        "selfLink": "/api/v1/namespaces/default",
        "uid": "f95e1390-6852-11e7-ab03-7831c1b76042",
        "resourceVersion": "4",
        "creationTimestamp": "2017-07-14T05:12:03Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    }
  ]
}
...
# last
$ curl "http://127.0.0.1:8080/api/v1/namespaces?limit=1&continue=a3ViZS1wdWJsaWM"
{
  "kind": "NamespaceList",
  "apiVersion": "v1",
  "metadata": {
    "selfLink": "/api/v1/namespaces",
    "resourceVersion": "145"
  },
  "items": [
    {
      "metadata": {
        "name": "kube-system",
        "selfLink": "/api/v1/namespaces/kube-system",
        "uid": "f95e9484-6852-11e7-ab03-7831c1b76042",
        "resourceVersion": "5",
        "creationTimestamp": "2017-07-14T05:12:03Z"
      },
      "spec": {
        "finalizers": [
          "kubernetes"
        ]
      },
      "status": {
        "phase": "Active"
      }
    }
  ]
}
```
2017-09-02 19:26:29 -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
Clayton Coleman 500b130ff0
Enable paging for all list watchers 2017-09-01 10:47:01 -04: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
ymqytw 7500b55ce4 move retry to client-go 2017-08-14 14:16:26 -07: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
Kubernetes Submit Queue a25a51cc0f Merge pull request #45946 from atlassian/expose-informer-constructors
Automatic merge from submit-queue (batch tested with PRs 48224, 45431, 45946, 48775, 49396)

Expose informer constructors

**What this PR does / why we need it**:
See #45939

**Which issue this PR fixes**
Fixes #45939

**Release note**:

```release-note
NONE
```
2017-07-25 11:06:51 -07:00
Kubernetes Submit Queue 9bdf464bd5 Merge pull request #49286 from kargakis/remote-myself-from-some-places
Automatic merge from submit-queue (batch tested with PRs 49286, 49550)

Remove myself from a bunch of places

I am assigned in reviews which I never get to do. I prefer drive-bys whenever I can do them rather than the bot choosing myself in random, ends up being mere spam.

@smarterclayton please approve.
2017-07-25 06:41:08 -07:00
Mikhail Mazurskiy 37f909a274
Re-generate informers 2017-07-25 12:19:18 +10: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
jianglingxia c412849722 statefulset_expansion.go delete ps define 2017-07-24 14:24:16 +08: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
Michail Kargakis e884eac6fe
Remove myself from a bunch of places
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-07-20 12:10:46 +02:00
Kubernetes Submit Queue 19e4fac129 Merge pull request #49218 from caesarxuchao/limit-clientset-visibility
Automatic merge from submit-queue (batch tested with PRs 49218, 48253, 48967, 48460, 49230)

Restrict the visibility of two generated packages in pkg/client/

These two packages are deprecated. Please use the client-go copy of these two packages.

Currently staging/copy.sh copied these two packages to client-go. I'll send follow-up PRs to let code-gen output to client-go directly and remove these two packages. The purpose of this PR is to prevent more imports of these packages while I refactor the codegen.
2017-07-19 20:05:29 -07:00
Kubernetes Submit Queue 8d26afa8a6 Merge pull request #48377 from bsalamat/priority_class
Automatic merge from submit-queue

Add PriorityClass API object under new "scheduling" API group

**What this PR does / why we need it**: This PR is a part of a series of PRs to add pod priority to Kubernetes. This PR adds a new API group called "scheduling" with a new API object called "PriorityClass". PriorityClass maps the string value of priority to its integer value.

**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**: Given the size of this PR, I will add the admission controller for the PriorityClass in a separate PR.

**Release note**:

```release-note
Add PriorityClass API object under new "scheduling" API group
```

ref/ #47604
ref/ #48646
2017-07-19 19:04:29 -07:00
Chao Xu c6f09f0c9c Restrict the visibility of two packages in pkg/client/
These two packages are deprecated. Please use the client-go copy of these two
packages.
2017-07-19 11:23:04 -07:00
Kubernetes Submit Queue 772c352992 Merge pull request #49197 from malc0lm/master
Automatic merge from submit-queue

fix leader-elect-resource-lock's description

**What this PR does / why we need it**:
    The leader-elect-resource-lock description miss a space in pkg/client/leaderelectionconfig/config.go. It will effect other component's help document which use leader election.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
    I think it's is needless to open a issue.
**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-07-19 08:44:08 -07:00
malcolm lee e02fec7b21 fix leader-elect-resource-lock's description 2017-07-19 22:14:11 +08:00
Bobby (Babak) Salamat e827e1ba87 autogenerated files 2017-07-18 17:47:57 -07:00
Bobby Salamat 33e6a476ba Add PriorityClass API
Add PriorityClass to pkg/registry

Add PriorityClass to pkg/master/master.go

Add PriorityClass to import_know_versions.go

Update linted packages

minor fix
2017-07-18 17:47:57 -07:00
Dr. Stefan Schimanski 5925a0a1df Move pkg/api/v1/ref -> client-go/tools/reference 2017-07-18 22:45:43 +02:00
Kubernetes Submit Queue e0dcaa3409 Merge pull request #45440 from verb/nit-too-much-m
Automatic merge from submit-queue (batch tested with PRs 49017, 45440, 48384, 45894, 48808)

Fix typo in ExecCommandParam

**What this PR does / why we need it**: Makes ExecCommandParam look like all of the other "Param"s

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-07-17 16:26:53 -07:00
Kubernetes Submit Queue a933551aaa Merge pull request #48892 from ericchiang/client-go-canonical-import
Automatic merge from submit-queue (batch tested with PRs 47066, 48892, 48933, 48854, 48894)

client-go: add canonical import comment

Ensure users check out client-go to the correct location. The install error now reads:

```
can't load package: package github.com/kubernetes/client-go/kubernetes: code in directory /home/eric/src/github.com/kubernetes/client-go/kubernetes expects import "k8s.io/client-go/kubernetes"
```

ref https://github.com/kubernetes/client-go/issues/223

/cc @caesarxuchao @lavalamp 

```release-note
NONE
```
2017-07-14 12:50:49 -07:00
Lee Verberne 786e993338 Fix typo in ExecCommandParam 2017-07-14 13:54:51 +00:00
Eric Chiang 90a555545e client-go: add canonical import comment 2017-07-13 13:03:12 -07:00
Mike Danese c201553f27 remove some people from OWNERS so they don't get reviews anymore
These are googlers who don't work on the project anymore but are still
getting reviews assigned to them:
- bprashanth
- rjnagal
- vmarmol
2017-07-13 10:02:21 -07:00
Kubernetes Submit Queue 77b6b126cb Merge pull request #48641 from smarterclayton/refactor_exec
Automatic merge from submit-queue (batch tested with PRs 48594, 47042, 48801, 48641, 48243)

Prepare to introduce websockets for exec and portforward

Refactor the code in remotecommand to better represent the structure of
what is common between portforward and exec.

Ref #48633
2017-07-12 14:08:10 -07:00
Kubernetes Submit Queue 0e461035cb Merge pull request #48734 from tallclair/namechange
Automatic merge from submit-queue (batch tested with PRs 48698, 48712, 48516, 48734, 48735)

Name change: s/timstclair/tallclair/

I changed my name, and I'm migrating my user name to be consistent.
2017-07-12 04:56:32 -07:00
Tim Allclair a2f2e1d491 Name change: s/timstclair/tallclair/ 2017-07-10 14:05:46 -07:00