Commit Graph

14482 Commits (52b3ef6f9c0326b5df19fa041cea920a59e7c2f3)

Author SHA1 Message Date
Kubernetes Submit Queue 52b3ef6f9c Merge pull request #30722 from timstclair/aa-validation
Automatic merge from submit-queue

Validate AppArmor annotations in the API server

This is important because it applies the same validation to the annotations that we would eventually want for the AppArmor fields, which will smooth the upgrade path.

/cc @pmorie @pweil- @jfrazelle @vishh
2016-08-21 22:55:04 -07:00
Kubernetes Submit Queue a316e6def2 Merge pull request #30880 from markturansky/add_encryption
Automatic merge from submit-queue

Add encryption to EBS dynamic provisioner

Resolves https://github.com/kubernetes/kubernetes/issues/30792

Adds encryption to the EBS cloud provider and provisioner.

Follow up to #29006 (all commits but the one in this PR will drop out).

@kubernetes/sig-storage 


```release-note
```
2016-08-21 21:29:55 -07:00
Tim St. Clair 839034b46b
Validate AppArmor annotations in the API server 2016-08-21 20:59:11 -07:00
Tim St. Clair f94df59791
Remove apparmor dependency on pkg/kubelet/lifecycle 2016-08-21 20:59:11 -07:00
Kubernetes Submit Queue 5b6e1c37c6 Merge pull request #29481 from kargakis/available-replicas-on-replica-sets
Automatic merge from submit-queue

Add readyReplicas to replica sets

@bgrant0607 for the api changes

@bprashanth for the controllers changes

@deads2k fyi
2016-08-21 19:44:50 -07:00
Kubernetes Submit Queue 0039d75dd0 Merge pull request #30896 from mfojtik/add-get
Automatic merge from submit-queue

Add Get() to cache listers

@kargakis @deads2k  PTAL
2016-08-21 17:31:26 -07:00
Kubernetes Submit Queue b51d5c3cc0 Merge pull request #30638 from krousey/metrics_registration
Automatic merge from submit-queue

Remove implicit Prometheus metrics from client

**What this PR does / why we need it**: This PR starts to cut away at dependencies that the client has.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
The implicit registration of Prometheus metrics for request count and latency have been removed, and a plug-able interface was added. If you were using our client libraries in your own binaries and want these metrics, add the following to your imports in the main package: "k8s.io/pkg/client/metrics/prometheus". 
```

cc: @kubernetes/sig-api-machinery @kubernetes/sig-instrumentation @fgrzadkowski  @wojtek-t
2016-08-21 16:47:05 -07:00
Kubernetes Submit Queue 1def4a0458 Merge pull request #30690 from wongma7/claimref-capacity
Automatic merge from submit-queue

Don't bind pre-bound pvc & pv if size request not satisfied

as discussed briefly here https://github.com/kubernetes/kubernetes/pull/30522 , volume size ought to be verified before binding a pv & pvc regardless of what's in the pv's claimRef. @thockin
2016-08-21 16:02:14 -07:00
Kubernetes Submit Queue 9669eaaa39 Merge pull request #31082 from liggitt/pvc_test_race
Automatic merge from submit-queue

Fix data race in PVC Run/Stop methods

Fixes #30947
Fixes #30775
2016-08-21 14:42:35 -07:00
Kubernetes Submit Queue d1ed6f598f Merge pull request #30614 from AdoHe/run_pull_policy
Automatic merge from submit-queue

kubectl run add pull-policy flag to control image pull policy

```release-note
Add support for --image-pull-policy to 'kubectl run'
```

Fix #30493 
@pwittrock @thockin ptal
2016-08-21 14:04:15 -07:00
Jordan Liggitt 387f9ea952
Fix data race in PVC Run/Stop methods 2016-08-21 15:15:33 -04:00
Kubernetes Submit Queue 5d54c55710 Merge pull request #30212 from feiskyer/kuberuntime-flag
Automatic merge from submit-queue

Kubelet: add --container-runtime-endpoint and --image-service-endpoint

Flag `--container-runtime-endpoint` (overrides `--container-runtime`) is introduced to identify the unix socket file of the remote runtime service. And flag `--image-service-endpoint` is introduced to identify the unix socket file of the image service.

This PR is part of #28789 Milestone 0. 

CC @yujuhong @Random-Liu
2016-08-21 12:03:10 -07:00
Kubernetes Submit Queue 5a98379bca Merge pull request #29696 from brendandburns/kubecfg
Automatic merge from submit-queue

Add initial support for TokenFile to to the client config file.

@smarterclayton @deads2k @cjcullen @krousey 

Part of the fix for #28260
2016-08-21 11:18:21 -07:00
Kubernetes Submit Queue 7979801e54 Merge pull request #28860 from ericchiang/separate-apiserver-authz-options
Automatic merge from submit-queue

pkg/genericapiserver/options: don't import pkg/apiserver

Refactor the authorization options for the API server so
pkg/apiserver isn't directly imported by the options package.

Closes #28544

cc @smarterclayton

@madhusudancs, @nikhiljindal I've updated `federation/cmd/federation-apiserver/app/server.go` to include the RBAC options with this change. I don't know if this was intentionally left out in the first place but would like your feedback.
2016-08-21 09:49:14 -07:00
Kubernetes Submit Queue a956dd1c25 Merge pull request #25524 from AdoHe/kubectl_reorg
Automatic merge from submit-queue

update kubectl help output for better organization

## Pull Request Guidelines

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
1. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
1. 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.

```release-note
* Use the release-note-* labels to set the release note state 
* Clear this block to use the PR title as the release note 
-OR-
* Enter your extended release note here
```


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-21 09:08:56 -07:00
Kubernetes Submit Queue 6dabf60114 Merge pull request #29919 from tmrts/kubelet-rkt-cri/container-api
Automatic merge from submit-queue

Kubelet rkt CRI stubs & fakes

Adds stubs for CRI interfaces and creates a fake for `ContainerRuntime` interface
2016-08-21 07:14:03 -07:00
Michail Kargakis 46291d51df api: generated code for readyReplicas 2016-08-21 15:47:23 +02:00
Kubernetes Submit Queue 00a474a108 Merge pull request #31020 from mikedanese/ds-taint
Automatic merge from submit-queue

daemonset controller should respect taints

cc @dchen1107 @davidopp
2016-08-21 06:30:44 -07:00
Michail Kargakis ab3bc03a4f api: add readyReplicas in RC/RS 2016-08-21 14:49:45 +02:00
Kubernetes Submit Queue e9bd805888 Merge pull request #31026 from erictune/betainit
Automatic merge from submit-queue

Move init-container feature from alpha to beta.

```release-note
Moved init-container feature from alpha to beta.

In 1.3, an init container is specified with this annotation key
on the pod or pod template: `pods.alpha.kubernetes.io/init-containers`.

In 1.4, either that key or this key: pods.beta.kubernetes.io/init-containers`,
can be used.

When you GET an object, you will see both annotation keys with the same values.

You can safely roll back from 1.4 to 1.3, and things with init-containers
will still work (pods, deployments, etc).

If you are running 1.3, only use the alpha annotation, or it may be lost when
rolling forward.

The status has moved from annotation key
`pods.beta.kubernetes.io/init-container-statuses` to
`pods.beta.kubernetes.io/init-container-statuses`.
Any code that inspects this annotation should be changed to use the new key.

State of Initialization will continue to be reported in both pods.alpha.kubernetes.io/initialized
and in `podStatus.conditions.{status: "True", type: Initialized}`
```

Mini-design for this change:

Goals:
1. A user can create an object with the beta annotation
  on 1.4, and it works.  The fact that the annotation has beta
  in it communicates to the user that the feature is beta,
  and so the user should have confidence in using it.  Preferably,
  when the user gets the annotation back, he see the beta
  annotation.
1) If someone had an existing alpha object in their apiserver,
  such as a RS with a pod template with an init-containers
  annotation on it, it should continue to work (init containers
  run) when stack upgraded to 1.4.
2) If someone is using a chart or blog post that has alpha
  annotation on it and they create it on a 1.4 cluster, it should
  work.
3) If someone had something with an init container in 1.4
  and they roll back stack to 1.3, it should not silently stop
  working (init containers don't run anymore).

To meet all these, we mirror an absent beta label from the alpha
key and vice versa.  If they are out of sync, we use the alpha
one. We do this in conversion since there was already logic there.

In 1.3 code, all annotations are preserved across a round trip
(v1 -> api -> v1), and the alpha annotation turns into the internal
field that kubelet uses.

In 1.4 code, the alpha annotation is always preserved across
a round trip, and a beta annotation is always set equal to
the alpha one, after a round trip.

Currently, the kubelet always sees the object after a round trip
when it GETs it.  But, we don't want to rely on that behavior,
since it will break when fastpath is implemented.

So, we rely on this:
all objects either are created with an alpha annotation (1.3 or 1.4
code) or are created with a beta annotation under 1.4.  In the later
case, they are round tripped at creation time, and so get both
annotations.  So all subsequent GETs see both labels.
2016-08-21 05:04:11 -07:00
Kubernetes Submit Queue a41e6e3817 Merge pull request #30922 from yifan-gu/tls_bootstrap_refactor
Automatic merge from submit-queue

Implement TLS bootstrap for kubelet using `--experimental-bootstrap-kubeconfig`  (2nd take)

Ref kubernetes/features#43 (comment)

cc @gtank @philips @mikedanese @aaronlevy @liggitt @deads2k @errordeveloper @justinsb 


Continue on the older PR https://github.com/kubernetes/kubernetes/pull/30094 as there are too many comments on that one and it's not loadable now.
2016-08-21 03:47:07 -07:00
Kubernetes Submit Queue f75910b7b4 Merge pull request #30934 from yifan-gu/fix_subpath
Automatic merge from submit-queue

rkt: Support subPath volume mounts feature

So that at most one volume object will be created for every unique
host path. Also the volume's name is random generated UUID to avoid
collision since the mount point's name passed by kubelet is not
guaranteed to be unique when 'subpath' is specified.

Should partially fix https://github.com/kubernetes/kubernetes/issues/26986 
The non-existing host path creation issue is not touched here.

cc @kubernetes/sig-rktnetes 
also cc @kubernetes/sig-node for the Mount name comments I added.
2016-08-21 03:07:20 -07:00
Kubernetes Submit Queue 4e571eafab Merge pull request #31032 from tmrts/fix/os-release-check
Automatic merge from submit-queue

pkg/kubelet/rkt: skip empty lines in getOSReleaseInfo

Follow-up of #31022
2016-08-21 02:29:33 -07:00
Kubernetes Submit Queue ad6eed40ec Merge pull request #30888 from humblec/mypr/29006
Automatic merge from submit-queue

GlusterFS dynamic provisioner and deleter interface based on storageclass claims

This PR depends on PR#29006
2016-08-21 01:50:16 -07:00
Kubernetes Submit Queue 7272cd09e3 Merge pull request #26541 from sttts/sttts-kubectl-exec-rc
Automatic merge from submit-queue

Return container command exit codes in kubectl run/exec

Fixes https://github.com/kubernetes/kubernetes/issues/26424
Based on https://github.com/kubernetes/kubernetes/pull/25273.

TODO:
- [x] add e2e tests
- [x] investigate `kubectl run` exit code for `--restart=Never` (compare issue #24533 and PR #25253)
- [x] document exit codes
2016-08-21 00:44:55 -07:00
Kubernetes Submit Queue f4ed73cace Merge pull request #31003 from pmorie/kubelet-status-mgr-shadow
Automatic merge from submit-queue

kubelet status manager: Fix nil in error message due to var shadowing

Variable shadowing can cause this log message to print a nil:

```go
glog.Warningf("Failed to update status for pod %q: %v", format.Pod(pod), err)
```

@kubernetes/rh-cluster-infra
2016-08-21 00:04:07 -07:00
Kubernetes Submit Queue 0075144475 Merge pull request #30569 from girishkalele/esipp_healthchecker
Automatic merge from submit-queue

Load Balancer Health Check responder library for ESIPP

This is an independent component that is needed for the Load Balancer health traffic steering functionality (part of the 1.4 ESIPP work)
2016-08-20 22:34:33 -07:00
Kubernetes Submit Queue a8577f9816 Merge pull request #30800 from mml/db.controller.followup
Automatic merge from submit-queue

Followup fixes for disruption controller.

Part of #12611.
- Record an event when a pod does not have exactly 1 controller.
- Add TODO comment suggesting we simplify the two cases: integer and percentage.
2016-08-20 21:26:32 -07:00
Kubernetes Submit Queue 7b78631754 Merge pull request #30713 from smarterclayton/incorrect_default
Automatic merge from submit-queue

ResourceNames() should prohibit unnamed arguments
2016-08-20 20:48:56 -07:00
Kubernetes Submit Queue c7a82463e7 Merge pull request #30950 from liggitt/support-name-field-selector
Automatic merge from submit-queue

Add support for the standard objectmeta field selectors

certificates API was missing standard field selectors (noticed in 4120179db5 (r75413160))

also silences client-side warnings when using field selectors that don't have a registered client-side transformation (no functional change, since we were already returning the original field/value). if we want to trend toward embedding less conversion logic in our clients, I don't see us fully duplicating field selector conversions client-side to make that warning disappear.
2016-08-20 20:11:00 -07:00
Girish Kalele 282880f549 Code review changes 2016-08-20 19:49:30 -07:00
Girish Kalele 29188c68d5 Load Balancer Health Check responder library for ESIPP 2016-08-20 19:45:56 -07:00
Kubernetes Submit Queue db777bb9a3 Merge pull request #30940 from madhusudancs/fed-issue-30790
Automatic merge from submit-queue

Return the current kubeconfig as the starting config in ClientConfigGetter.

This fixes issue #30790.

cc @kubernetes/sig-cluster-federation
2016-08-20 19:29:31 -07:00
Jordan Liggitt 3e5acd8476
Make client-side fieldSelector stop complaining about identity transforms 2016-08-20 21:34:33 -04:00
Jordan Liggitt 6524fd0727
Add metadata.name fieldSelector support to csr API 2016-08-20 21:34:33 -04:00
Kubernetes Submit Queue cbbcfe8ad8 Merge pull request #29849 from aveshagarwal/master-kubectl-describe-default-limits
Automatic merge from submit-queue

Fix kubectl describe to display a container's resource limit env vars as node allocatable when the limits are not set
2016-08-20 16:53:28 -07:00
Clayton Coleman abded5c6c5
generated: Docs 2016-08-20 15:56:53 -04:00
Clayton Coleman e1ebde9f92
Add spec.nodeName and spec.serviceAccountName to downward env var
The serviceAccountName is occasionally useful for clients running on
Kube that need to know who they are when talking to other components.

The nodeName is useful for PetSet or DaemonSet pods that need to make
calls back to the API to fetch info about their node.

Both fields are immutable, and cannot easily be retrieved in another
way.
2016-08-20 15:50:36 -04:00
Kubernetes Submit Queue 0abda6bd74 Merge pull request #30533 from liggitt/event-validation
Automatic merge from submit-queue

Validate involvedObject.Namespace matches event.Namespace

Fixes https://github.com/kubernetes/kubernetes/issues/16036
2016-08-20 12:19:12 -07:00
Kubernetes Submit Queue b18b56d5b3 Merge pull request #30658 from hongchaodeng/r2
Automatic merge from submit-queue

Make labels, fields expose selectable requirements

What?
This is to change the labels/fields Selector interface and make them expose selectable requirements. We reuse labels.Requirement struct for label selector and add fields.Requirement for field selector.

Why?
In order to index labels/fields, we need them to tell us three things: index key (a field or a label), operator (greater, less, or equal), and value (string, int, etc.). By getting selectable requirements, we are able to pass them down and use them for indexing in storage layer.
2016-08-20 11:36:35 -07:00
Kubernetes Submit Queue e9947d9ad7 Merge pull request #30813 from bprashanth/kubectl_petset
Automatic merge from submit-queue

Basic scaler/reaper for petset

Currently scaling or upgrading a petset is more complicated than it should be. Would be nice if this made code freeze on friday. I'm planning on a follow up change with generation number and e2es post freeze.
2016-08-20 10:51:07 -07:00
Hongchao Deng 1871a22039 make labels, fields expose selectable requirements 2016-08-20 10:10:51 -07:00
Kubernetes Submit Queue d07348dd84 Merge pull request #30803 from deads2k/impersonate-groups
Automatic merge from submit-queue

allow group impersonation

Adds an "Impersonate-Group" header that can be used to specify exactly which groups to use on an impersonation request.  

This also restructures the code to make it easier to add the scopes header next.  This closely parallels the "Impersonate-User" header, so I figured I'd start easy.

@kubernetes/sig-auth 
@ericchiang are you comfortable reviewing?
2016-08-20 10:10:32 -07:00
bindata-mockuser e792d4117d Add return code support to kubectl-exec and -run 2016-08-20 15:58:47 +02:00
bindata-mockuser 6dcb0c9130 Rectify kubectl error output 2016-08-20 15:58:10 +02:00
bindata-mockuser ce7f003f57 Add protocol versions to pkg/util/wsstream 2016-08-20 15:58:10 +02:00
Kubernetes Submit Queue 7b3c08d7d3 Merge pull request #30789 from yujuhong/image_match
Automatic merge from submit-queue

Fix image inspection and matching

An image string could contain a hostname (e.g., "docker.io") or not. The same
applies to the RepoTags returned from an image inspection. To determine whether
the image docker pulled matches what the user ask for, we check if the either
string is the suffix of the other.

/cc @dims @dchen1107 @Random-Liu

This fixes #30710
2016-08-20 06:18:41 -07:00
Kubernetes Submit Queue 1b79bc1812 Merge pull request #30731 from ncdc/exec-probe-message
Automatic merge from submit-queue

Always return command output for exec probes and kubelet RunInContainer

Always return command output for exec probes and kubelet RunInContainer, even if the command invocation returns nonzero.

When #24921 replaced RunInContainer with ExecInContainer, it introduced a change where an exec probe that failed no longer included the stdout/stderr from the probe in the event. For example, when running at log level 4, you see:

```
I0816 15:01:36.259826 29713 exec.go:38] Exec probe response: "Failed to access the status endpoint : HTTP Error 404: Not Found.\nHawkular metrics has only been running for 7\n seconds not aborting yet.\n"
```

But the event looks like this:

```
54s 22s 5 hawkular-metrics-hjme4 Pod spec.containers{hawkular-metrics} Warning Unhealthy {kubelet corbeau} Readiness probe failed:
```

Note the absence of the exec probe response after "Readiness probe failed". This PR restores the previous behavior.

cc @kubernetes/rh-cluster-infra @mwringe 

xref https://github.com/openshift/origin/issues/10424
2016-08-20 05:41:44 -07:00
Tamer Tas f82a41b329 Create a stub PodSandboxManager for rkt 2016-08-20 12:50:28 +03:00
Tamer Tas dcc8e9d4de Add a fake rkt app-level API to rktshim pkg 2016-08-20 12:45:57 +03:00