Commit Graph

19255 Commits (bb7cc740694368c673c7790a19c8f0e9e2899ce6)

Author SHA1 Message Date
Kubernetes Submit Queue bb7cc74069 Merge pull request #40013 from jsafrane/storage-ga-class-attributes
Automatic merge from submit-queue

Add ClassName attributes to PV and PVC

This just adds new attributes to PV/PVC. Real code that uses the attributes instead of beta annotations will follow when we agree on the attribute names / style.
2017-02-23 06:39:41 -08:00
Jan Safranek dcb3e19a85 Regenerate everything 2017-02-23 12:23:03 +01:00
Jan Safranek 4df96e2c79 Add ClassName attributes to PV and PVC 2017-02-23 12:23:02 +01:00
Kubernetes Submit Queue 713919990e Merge pull request #41755 from liggitt/cert-user-extra
Automatic merge from submit-queue

Include all user.Info data in CSR object

In order to use authorization checks to auto-approve CSRs in the future, we need all the info from the user.Info interface.

This mirrors the API fields in the TokenReview API used to return user info, and in the SubjectAccessReview API we use to check authorization.

```release-note
The CertificateSigningRequest API added the `extra` field to persist all information about the requesting user. This mirrors the fields in the SubjectAccessReview API used to check authorization.
```
2017-02-23 02:24:32 -08:00
Kubernetes Submit Queue 787b1a2388 Merge pull request #41281 from ericchiang/bootstrap-token-authenticator
Automatic merge from submit-queue (batch tested with PRs 41812, 41665, 40007, 41281, 41771)

kube-apiserver: add a bootstrap token authenticator for TLS bootstrapping

Follows up on https://github.com/kubernetes/kubernetes/pull/36101

Still needs:

* More tests.
* To be hooked up to the API server.
  - Do I have to do that in a separate PR after k8s.io/apiserver is synced?
* Docs (kubernetes.io PR).
* Figure out caching strategy.
* Release notes.

cc @kubernetes/sig-auth-api-reviews @liggitt @luxas @jbeda

```release-notes
Added a new secret type "bootstrap.kubernetes.io/token" for dynamically creating TLS bootstrapping bearer tokens.
```
2017-02-23 00:11:40 -08:00
Kubernetes Submit Queue 17175b24a2 Merge pull request #40007 from JulienBalestra/rktnetes-systemd-ops-helpers
Automatic merge from submit-queue (batch tested with PRs 41812, 41665, 40007, 41281, 41771)

Kubelet-rkt: Add useful informations for Ops on the Kubelet Host

Create a Systemd SyslogIdentifier inside the [Service]
Create a Systemd Description inside the [Unit]

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

#### Overview
Logged against the host, it's difficult to identify who's who.
This PR add useful information to quickly get straight to the point with the **DESCRIPTION** field:

```
systemctl list-units "k8s*"
UNIT                                             LOAD   ACTIVE SUB     DESCRIPTION
k8s_b5a9bdf7-e396-4989-8df0-30a5fda7f94c.service loaded active running kube-controller-manager-172.20.0.206
k8s_bec0d8a1-dc15-4b47-a850-e09cf098646a.service loaded active running nginx-daemonset-gxm4s
k8s_d2981e9c-2845-4aa2-a0de-46e828f0c91b.service loaded active running kube-apiserver-172.20.0.206
k8s_fde4b0ab-87f8-4fd1-b5d2-3154918f6c89.service loaded active running kube-scheduler-172.20.0.206

```

#### Overview and Journal

Always on the host, to easily retrieve the pods logs, this PR add a SyslogIdentifier named as the PodBaseName.


```
# A DaemonSet prometheus-node-exporter is running on the Kubernetes Cluster
systemctl list-units "k8s*" | grep prometheus-node-exporter
k8s_c60a4b1a-387d-4fce-afa1-642d6f5716c1.service loaded active running prometheus-node-exporter-85cpp

# Get the logs from the prometheus-node-exporter DaemonSet 
journalctl -t prometheus-node-exporter | wc -l
278
```

Sadly the `journalctl` flag `-t` / `--identifier` doesn't allow a pattern to catch the logs.

Also this field improve any queries made by any tools who exports the Journal (E.g: ES, Kibana):
```
{
	"__CURSOR" : "s=86fd390d123b47af89bb15f41feb9863;i=164b2c27;b=7709deb3400841009e0acc2fec1ebe0e;m=1fe822ca4;t=54635e6a62285;x=b2d321019d70f36f",
	"__REALTIME_TIMESTAMP" : "1484572200411781",
	"__MONOTONIC_TIMESTAMP" : "8564911268",
	"_BOOT_ID" : "7709deb3400841009e0acc2fec1ebe0e",
	"PRIORITY" : "6",
	"_UID" : "0",
	"_GID" : "0",
	"_SYSTEMD_SLICE" : "system.slice",
	"_SELINUX_CONTEXT" : "system_u:system_r:kernel_t:s0",
	"_MACHINE_ID" : "7bbb4401667243da81671e23fd8a2246",
	"_HOSTNAME" : "Kubelet-Host",
	"_TRANSPORT" : "stdout",
	"SYSLOG_FACILITY" : "3",
	"_COMM" : "ld-linux-x86-64",
	"_CAP_EFFECTIVE" : "3fffffffff",
	"SYSLOG_IDENTIFIER" : "prometheus-node-exporter",
	"_PID" : "88827",
	"_EXE" : "/var/lib/rkt/pods/run/c60a4b1a-387d-4fce-afa1-642d6f5716c1/stage1/rootfs/usr/lib64/ld-2.21.so",
	"_CMDLINE" : "stage1/rootfs/usr/lib/ld-linux-x86-64.so.2 stage1/rootfs/usr/bin/systemd-nspawn [....]",
	"_SYSTEMD_CGROUP" : "/system.slice/k8s_c60a4b1a-387d-4fce-afa1-642d6f5716c1.service",
	"_SYSTEMD_UNIT" : "k8s_c60a4b1a-387d-4fce-afa1-642d6f5716c1.service",
	"MESSAGE" : "[ 8564.909237] prometheus-node-exporter[115]: time=\"2017-01-16T13:10:00Z\" level=info msg=\" - time\" source=\"node_exporter.go:157\""
}
```
2017-02-23 00:11:38 -08:00
Kubernetes Submit Queue 0d5a638d24 Merge pull request #41665 from freehan/cri-checkpoint-fix
Automatic merge from submit-queue (batch tested with PRs 41812, 41665, 40007, 41281, 41771)

initialize directory while creating checkpoint file store

fixes: #41616 
ref: https://github.com/kubernetes/kubernetes/issues/41225
2017-02-23 00:11:35 -08:00
Kubernetes Submit Queue c36eee2a0c Merge pull request #41784 from dixudx/fix_issue_41746
Automatic merge from submit-queue (batch tested with PRs 41146, 41486, 41482, 41538, 41784)

fix issue #41746

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

**Which issue this PR fixes** : fixes #41746 

**Special notes for your reviewer**:

cc @feiskyer
2017-02-22 21:09:38 -08:00
Kubernetes Submit Queue c99ae4b436 Merge pull request #41538 from xingzhou/clusterrole
Automatic merge from submit-queue (batch tested with PRs 41146, 41486, 41482, 41538, 41784)

Added `kubectl create clusterrole` command.

Added `kubectl create clusterrole` command.

Fixed part of #39596 

**Special notes for your reviewer**:
@deads2k, please help to review this patch, thanks

**Release note**:
```
   Added one new command `kubectl create clusterrole` to help user create a single ClusterRole from command line.
```
2017-02-22 21:09:36 -08:00
Kubernetes Submit Queue 4396f19c61 Merge pull request #41482 from ncdc/shared-informers-11-statefulset
Automatic merge from submit-queue (batch tested with PRs 41146, 41486, 41482, 41538, 41784)

Switch statefulset controller to shared informers

Originally part of #40097 

I *think* the controller currently makes a deep copy of a StatefulSet before it mutates it, but I'm not 100% sure. For those who are most familiar with this code, could you please confirm?

@beeps @smarterclayton @ingvagabund @sttts @liggitt @deads2k @kubernetes/sig-apps-pr-reviews @kubernetes/sig-scalability-pr-reviews @timothysc @gmarek @wojtek-t
2017-02-22 21:09:35 -08:00
Kubernetes Submit Queue e49f44d89c Merge pull request #41486 from sttts/sttts-clientset-scheme
Automatic merge from submit-queue (batch tested with PRs 41146, 41486, 41482, 41538, 41784)

client-gen: independent scheme for clientsets

This PR adds a clientset internal scheme instead of using `pkg/api.Scheme`. **The clientset API stays the same.**

In detail:

- introduce a scheme for each clientset, i.e. do not use `pkg/api.Scheme+Registry+Codec+ParameterCodecs`.

  This makes it easier to compose client-go's clientset (which is rewritten in `staging/copy.sh` and therefore hardcoded to use `k8s.io/client-go/pkg/api.Scheme+Registry+Codecs+ParameterCodecs`) with third-party clientsets (kube-aggregator, openshift, federation) which are not rewritten using `copy.sh` as all of them are self-contained and therefore relocatable.

  This fixes https://github.com/kubernetes/kubernetes/pull/41403/files#diff-76edfb07dee54ff7ddeda25c33c10d29R81 and prepares client-gen for use in OpenShift.

- register types into the clientset scheme via `AddToScheme` for versioned clientsets. This decouples the client-go clients from announce+registration (internal clients continue using announce+registry and apigroup installers).

  This reduces complexity for client-go, possibly remove the necessity for the announce+register machinery for many use-cases, maybe even to delete it mid-term.
- port federation and testgroup  `install/install.go` to `announced.GroupMetaFactory` in order to have a proper `Install.Install(...)` func for registration.

With the first change it's easy to add the types of one clientset to the scheme of the other using the `clientset/scheme.AddToScheme` method. This allows to use cross-clientset `runtime.RawExtensions`:

```golang
import (
     "k8s.io/client-go/kubernetes"
     clientsetscheme "k8s.io/client-go/kuberentes/scheme"
     aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
)

kclientset, _ := kubernetes.NewForConfig(c)
aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
```
Kubernetes types with a `RawExtension` can en/decode aggregator types after this.

TODO:
- [x] fix fake clientsets
- [x] get the `*Options` types registered correctly for core, compare DO-NOT-MERGE commit.
- [x] get prefered version right in internal client. Do we need all versions registered in the internal client to support negotiation?
- [x] run `staging/copy.sh` and run tests: https://github.com/kubernetes/kubernetes/pull/41744
- ~~[ ] fixup usage through-out the code-base~~
- **Follow-up**: move `import_known_versions.go` files somewhere such that import of the `api.Scheme` package automatically installs the apigroups. It looks like we depended on the import fo the clientset for this purpose.
2017-02-22 21:09:33 -08:00
Kubernetes Submit Queue afd3db25cf Merge pull request #41146 from shiywang/apply-view1
Automatic merge from submit-queue (batch tested with PRs 41146, 41486, 41482, 41538, 41784)

 Add apply view-last-applied subcommand

reopen pr https://github.com/kubernetes/kubernetes/pull/40984, implement part of https://github.com/kubernetes/community/pull/287
for now unit test all pass, the output looks like:

```console
shiywang@dhcp-140-33 template $ ./kubectl apply view last-applied deployment nginx-deployment 
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  creationTimestamp: null
  name: nginx-deployment
spec:
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: nginx
    spec:
      containers:
      - image: nginx:1.12.10
        name: nginx
        ports:
        - containerPort: 80
        resources: {}
status: {}
```

```release-note
Support new kubectl apply view-last-applied command for viewing the last configuration file applied
```

not sure if there is any flag I should updated or the some error handling I should changed.
will generate docs when you guys think is ok.
cc @pwittrock @jessfraz @AdoHe @ymqytw
2017-02-22 21:09:31 -08:00
Kubernetes Submit Queue 3560ac3193 Merge pull request #40667 from brendandburns/i18n7
Automatic merge from submit-queue (batch tested with PRs 38957, 41819, 41851, 40667, 41373)

Wrap and extract some flag description strings.

Moving on from help strings to flag descriptions.

@zen @fabianofranz @kubernetes/sig-cli-pr-reviews
2017-02-22 19:59:36 -08:00
Kubernetes Submit Queue 7cca0d1867 Merge pull request #41851 from janetkuo/deployment-duplicate-rs
Automatic merge from submit-queue (batch tested with PRs 38957, 41819, 41851, 40667, 41373)

Fix deployment helper - no assumptions on only one new ReplicaSet

#40415

**Release note**:

```release-note
NONE
```

@kubernetes/sig-apps-bugs
2017-02-22 19:59:34 -08:00
Kubernetes Submit Queue 6024f56f80 Merge pull request #38957 from aveshagarwal/master-taints-tolerations-api-fields
Automatic merge from submit-queue (batch tested with PRs 38957, 41819, 41851, 40667, 41373)

Change taints/tolerations to api fields

This PR changes current implementation of taints and tolerations from annotations to API fields. Taint and toleration are now part of `NodeSpec` and `PodSpec`, respectively. The annotation keys: `scheduler.alpha.kubernetes.io/tolerations` and `scheduler.alpha.kubernetes.io/taints`  have been removed.

**Release note**:
Pod tolerations and node taints have moved from annotations to API fields in the PodSpec and NodeSpec, respectively. Pod tolerations and node taints that are defined in the annotations will be ignored. The annotation keys: `scheduler.alpha.kubernetes.io/tolerations` and `scheduler.alpha.kubernetes.io/taints`  have been removed.
2017-02-22 19:59:31 -08:00
Kubernetes Submit Queue ae8f537c87 Merge pull request #41688 from humblec/iscsi-reviewer
Automatic merge from submit-queue

Update reviewer list for iscsi volume plugin.

Contributed nodiskconflict, multipath feature .etc to iscsi volume plugin. 
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-02-22 18:18:22 -08:00
Janet Kuo 3718749c4a Fix deployment helper - no assumptions on only one new ReplicaSet 2017-02-22 13:18:33 -08:00
Dr. Stefan Schimanski 595f4ed2cb Update generated files 2017-02-22 19:03:25 +01:00
Dr. Stefan Schimanski 92c36bed4a client-set: use clientset internal scheme 2017-02-22 19:03:25 +01:00
Kubernetes Submit Queue c58266c826 Merge pull request #41532 from ericchiang/kubectl-auth-providers
Automatic merge from submit-queue (batch tested with PRs 41349, 41532, 41256, 41587, 41657)

client-go: don't import client auth provider packages

Both of these auth providers are useful for kubectl but not so much for everyone importing client-go. Let users optionally import them (example [0]) and reduce the overall number of imports that client-go requires.

Quick grep seems to imply it wont import it after.

```
$ grep -r 'client-go/plugin/pkg/client/auth' staging/
staging/src/k8s.io/client-go/plugin/pkg/client/auth/plugins.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
staging/src/k8s.io/client-go/plugin/pkg/client/auth/plugins.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/oidc"
staging/src/k8s.io/client-go/examples/third-party-resources/main.go:	_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/clientset.go:	_ "k8s.io/client-go/plugin/pkg/client/auth"
staging/src/k8s.io/kube-aggregator/pkg/client/clientset_generated/internalclientset/clientset.go:	_ "k8s.io/client-go/plugin/pkg/client/auth"
```

closes https://github.com/kubernetes/client-go/issues/49
updates https://github.com/kubernetes/client-go/issues/79 (removes cloud.google.com/go import)

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

```release-notes
client-go no longer imports GCP OAuth2 and OpenID Connect packages by default.
```

[0] 8b466d64c5/examples/third-party-resources/main.go (L34-L35)
2017-02-22 08:12:40 -08:00
Kubernetes Submit Queue d1687d2f67 Merge pull request #41349 from derekwaynecarr/enable-pod-cgroups
Automatic merge from submit-queue (batch tested with PRs 41349, 41532, 41256, 41587, 41657)

Enable pod level cgroups by default

**What this PR does / why we need it**:
It enables pod level cgroups by default.

**Special notes for your reviewer**:
This is intended to be enabled by default on 2/14/2017 per the plan outlined here:
https://github.com/kubernetes/community/pull/314

**Release note**:
```release-note
Each pod has its own associated cgroup by default.
```
2017-02-22 08:12:37 -08:00
Avesh Agarwal b679e13c91 Auto generated stuff. 2017-02-22 09:27:42 -05:00
Avesh Agarwal b4d3d24eaf Update tests. 2017-02-22 09:27:42 -05:00
Avesh Agarwal 9b640838a5 Change taint/toleration annotations to api fields. 2017-02-22 09:27:42 -05:00
Andy Goldstein f6a186b1e1 Switch statefulset controller to shared informers 2017-02-22 08:53:51 -05:00
Kubernetes Submit Queue e8ff10ce29 Merge pull request #39116 from caesarxuchao/fix-event-expansion
Automatic merge from submit-queue (batch tested with PRs 41844, 41803, 39116, 41129, 41240)

core/v1/event_expansion.go use v1.GetReference

Fix https://github.com/kubernetes/client-go/issues/47.
2017-02-22 05:48:40 -08:00
Wojciech Tyczynski e81f1cbba3 Merge pull request #41816 from DirectXMan12/bug/hpa-dont-call-unsafe-convert
HPA: Don't mutate the shared informer cache
2017-02-22 13:34:22 +01:00
Brendan Burns f1de40b448 Extract some flag description strings to be translated. 2017-02-21 22:07:30 -08:00
Xing Zhou 433941f1fd Added `kubectl create clusterrole` command.
Added `kubectl create clusterrole` command.
2017-02-22 10:30:41 +08:00
Tim Hockin 98d693e9d2 Merge pull request #39837 from foxyriver/modify-comment
modify-comment
2017-02-21 16:33:47 -06:00
Tim Hockin c88b2d9bf4 Merge pull request #41029 from jingxu97/Feb/mountonwer
Add owner file in /pkg/util/mount package
2017-02-21 16:29:51 -06:00
JulienBalestra 7de2d51f90 gofmt rkt.go, rkt_test.go 2017-02-21 23:06:13 +01:00
Derek Carr 43ae6f49ad Enable per pod cgroups, fix defaulting of cgroup-root when not specified 2017-02-21 16:34:22 -05:00
Derek Carr 7fe105ebc7 stop double encoding systemd style cgroup names 2017-02-21 16:34:21 -05:00
Kubernetes Submit Queue b201ac2f8f Merge pull request #41457 from alejandroEsc/ae/kubelet/debug2
Automatic merge from submit-queue

Log that debug handlers have been turned on.

**What this PR does / why we need it**: PR allows user to have a message in logs that debug handlers are on. It should allow the operator to know and automate a check for the case where debug has been left on. 

**Release note**:
```
NONE
```
2017-02-21 10:51:32 -08:00
Chao Xu ec00f67ab3 should use v1.GetReference 2017-02-21 10:35:17 -08:00
Eric Chiang 163f37f775 *: update codegen and bazel 2017-02-21 09:26:03 -08:00
Solly Ross 592f5c091f HPA: Don't mutate the shared informer cache
Conversions can mutate the underlying object (and ours were).
Make a deepcopy before our first conversion at the very start
of the reconciler method in order to avoid mutating the shared
informer cache during conversion.

Fixes #41768
2017-02-21 11:57:08 -05:00
Eric Chiang a0df658b20 kube-apiserver: add a bootstrap token authenticator for TLS bootstrapping 2017-02-21 08:43:55 -08:00
Kubernetes Submit Queue a67e78e4fa Merge pull request #40317 from kpgriffith/recycle-vol-plug-cleanup
Automatic merge from submit-queue (batch tested with PRs 41364, 40317, 41326, 41783, 41782)

changes to cleanup the volume plugin for recycle

**What this PR does / why we need it**:
Code cleanup. Changing from creating a new interface from the plugin, that then calls a function to recycle a volume, to adding the function to the plugin itself.

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

**Special notes for your reviewer**:
Took same approach from closed PR #28432.

Do you want the approach to be the same for NewDeleter(), NewMounter(), NewUnMounter() and should they be in this same PR or submit different PR's for those?

**Release note**:

```NONE
```
2017-02-21 07:45:40 -08:00
Kubernetes Submit Queue e65ac460eb Merge pull request #37237 from jpeeler/implementation-volumeaio
Automatic merge from submit-queue (batch tested with PRs 41709, 41685, 41754, 41759, 37237)

Projected volume plugin

This is a WIP volume driver implementation as noted in the commit for https://github.com/kubernetes/kubernetes/pull/35313.
2017-02-21 04:27:51 -08:00
Kubernetes Submit Queue 41bee6de16 Merge pull request #41754 from jbeda/bootstrap-secret-name
Automatic merge from submit-queue (batch tested with PRs 41709, 41685, 41754, 41759, 37237)

Ignore Bootstrap Token secrets that don't use predictable names.
2017-02-21 04:27:48 -08:00
Kubernetes Submit Queue 43fec5afb5 Merge pull request #41685 from liggitt/edit-refactor-unknown-field
Automatic merge from submit-queue (batch tested with PRs 41709, 41685, 41754, 41759, 37237)

Tolerate unknown fields in strategic merge patch

When using `apply` or `edit` with an object that has a compiled-in struct, if an unknown server-side field is sent, or is present in a provided file, the strategic merge patch computation fails looking up type info from the go struct

If the field only exists in one side of the patch (is being added or removed), or is identical in both sides of the patch, we should tolerate missing type info, since it doesn't affect the patch.
2017-02-21 04:27:46 -08:00
Kubernetes Submit Queue 4ace781a78 Merge pull request #41709 from luxas/kubeadm_hide_fuzz_flag
Automatic merge from submit-queue

kubeadm: Hide the unnecessary --fuzz-iters flag

super straightforward. We don't want this flag to leak into our UX.

cc @jbeda @dmmcquay @deads2k
2017-02-21 04:26:35 -08:00
shiywang 557c18694a Add apply view last-applied subcommand
change to GetOriginalConfiguration

add bazel

refactor apply view-last-applied command

update some changes

minor change

add unit tests, update

update some codes and genreate docs

update LongDesc
2017-02-21 20:08:25 +08:00
Di Xu 49098d08b7 fix issue #41746 2017-02-21 18:41:27 +08:00
Kubernetes Submit Queue 1cb737fb97 Merge pull request #41576 from deads2k/cli-04-remove-outputversion
Automatic merge from submit-queue (batch tested with PRs 41706, 39063, 41330, 41739, 41576)

deprecate and disconnect --output-version

For at least two releases, there haven't been multiple versions of API groups and we don't plan to support conversions in commands other than `kubectl convert`.  This disconnects the `--output-version` option to be consistent with conversion agnostic command before it becomes an issue.

@kubernetes/sig-cli-pr-reviews @fabianofranz @smarterclayton

```release-note
`--output-version` is ignored for all commands except `kubectl convert`.  This is consistent with the generic nature of `kubectl` CRUD commands and the previous removal of `--api-version`.  Specific versions can be specified in the resource field: `resource.version.group`, `jobs.v1.batch`.
```
2017-02-21 02:24:45 -08:00
Kubernetes Submit Queue 98962212a3 Merge pull request #41330 from feiskyer/fix
Automatic merge from submit-queue (batch tested with PRs 41706, 39063, 41330, 41739, 41576)

Fix regex match doc of procfs.PidOf

Fixes #41247.

cc @bboreham
2017-02-21 02:24:41 -08:00
Wojciech Tyczynski a21b08d00f Revert "Use watch param instead of deprecated /watch/ prefix" 2017-02-21 08:37:51 +01:00
Jordan Liggitt f8d2e4fa1c
Add 'kubectl edit' testcase for unknown field in known group/version/kind 2017-02-20 20:40:03 -05:00