Commit Graph

68157 Commits (0a284c1cdea3b1921f46dead918a6d0186ee363e)

Author SHA1 Message Date
Kubernetes Submit Queue 0a284c1cde
Merge pull request #66082 from sjenning/fix-is-critical-checks
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>.

move feature gate checks inside IsCriticalPod

Currently `IsCriticalPod()` calls throughout the code are protected by `utilfeature.DefaultFeatureGate.Enabled(features.ExperimentalCriticalPodAnnotation)`.

However, with Pod Priority, this gate could be disabled which skips the priority check inside IsCriticalPod().

This PR moves the feature gate checking inside `IsCriticalPod()` and handles both situations properly.

@aveshagarwal @ravisantoshgudimetla @derekwaynecarr 
/sig node
/sig scheduling
/king bug
2018-08-01 11:47:08 -07:00
Kubernetes Submit Queue 9a61384a7d
Merge pull request #66786 from mkurylec/65721-part-1-refactor
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>.

Part 1: Allowing volumes to choose when to use securityContext 

This PR is the result of [splitting this PR]( https://github.com/kubernetes/kubernetes/pull/65793) into 2 sections:
1) This part, addressing the refactor so eligible-test-for-conformance can use get rid of privileged security context.
2) a second part that will address the promotion of the testcases to be in conformance suite.

Changes:
a) demoted privileged mode for these tests (not needed)
b) regular tests (the other ones existing in the file) will still be using privileged security context.
b) adding privilegedSecurityContext field to VolInfo, so each volume-flavor can let the test know if the security context has to be privileged or not.
This allows granular changes and updates per volume).
2018-08-01 10:28:33 -07:00
Kubernetes Submit Queue fda2b024d2
Merge pull request #66741 from dims/switch-to-multi-arch-images-with-manifests-2
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>.

Switch to multi arch test/images with manifests

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

Recently we updated the test container images to use multi-arch fat manifests and pushed the new images to the `gcr.io/kubernetes-e2e-test-images` repository. In this changeset, we are switching to using the new images and cleaning up some of the unused image definitions from manifest.go. We are removing the folders corresponding to the unused images as well.

**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 #66626

**Special notes for your reviewer**:
/cc @mkumatag 
/cc @luxas 

**Release note**:

```release-note
NONE
```
2018-08-01 08:28:24 -07:00
Kubernetes Submit Queue 4bec356e01
Merge pull request #66818 from foxyriver/expectnoerror-check
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>.

need ExpectNoError check

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

err need ExpectNoError check



**Release note**:

```release-note
NONE
```
2018-08-01 06:02:37 -07:00
Kubernetes Submit Queue 007bf90e32
Merge pull request #66725 from juanvallejo/jvallejo/update-patch-return-code-logic
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>.

update exit code to 0 if patch not needed

**Release note**:
```release-note
The `kubectl patch` command no longer exits with exit code 1 when a redundant patch results in a no-op
```

The specific logic in the `patch` command that exited with code 1, was only doing so when there was no diff between an existing object and its patched counterpart. (In case of errors, we just return those, which eventually ends up exiting with code 1 anyway). This patch removes this block, as we should not be treating patch no-ops as errors.

Fixes https://github.com/kubernetes/kubernetes/issues/58212

cc @soltysh
2018-08-01 03:31:35 -07:00
foxyriver 4baeb09f6c need ExpectNoError check 2018-08-01 18:10:14 +08:00
Kubernetes Submit Queue 8e2d37ee63
Merge pull request #60548 from brahmaroutu/conf_node
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>.

Adding details to Conformance Tests using RFC 2119 standards.

This PR is part of the conformance documentation. This is to provide more formal specification using RFC 2119 keywords to describe the test so that who ever is running conformance tests do not have to go through the code to understand why and what is tested.
The documentation information added here into each of the tests eventually result into a document which is currently checked in at location https://github.com/cncf/k8s-conformance/blob/master/docs/KubeConformance-1.9.md

I would like to have this PR reviewed for v1.10 as I consider it important to strengthen the conformance documents.
2018-07-31 23:14:36 -07:00
Kubernetes Submit Queue 8928046a2a
Merge pull request #66824 from hanxiaoshuai/fix07311
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>.

should get return err and check it

**What this PR does / why we need it**:
should get return err and check it
**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-31 21:58:53 -07:00
Kubernetes Submit Queue 930dd43841
Merge pull request #60550 from brahmaroutu/conf_network
Automatic merge from submit-queue (batch tested with PRs 66827, 60550). 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>.

Adding details to Conformance Tests using RFC 2119 standards.

This PR is part of the conformance documentation. This is to provide more formal specification using RFC 2119 keywords to describe the test so that who ever is running conformance tests do not have to go through the code to understand why and what is tested.
The documentation information added here into each of the tests eventually result into a document which is currently checked in at location https://github.com/cncf/k8s-conformance/blob/master/docs/KubeConformance-1.9.md

I would like to have this PR reviewed for v1.10 as I consider it important to strengthen the conformance documents.
2018-07-31 20:42:10 -07:00
Kubernetes Submit Queue 77bac51db8
Merge pull request #66827 from shyamjvs/fix-expected-pod-churn-in-load-test
Automatic merge from submit-queue (batch tested with PRs 66827, 60550). 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 expected pod creations/deletions estimate in load test

Fixing a wrongly computed expectation for first round of scaling in load test. Luckily as a side-effect, this should also speed up load test by:

- 25s on 100-node cluster
- 2m on 500-node cluster (so helps our presubmit - https://github.com/kubernetes/test-infra/issues/8348)
- 20m on 5000-node cluster

That said, I'm not 100% sure if this won't start causing failures in practice.

/cc @gmarek @mborsz 

```release-note
NONE
```
2018-07-31 20:42:04 -07:00
Kubernetes Submit Queue f4d8220df5
Merge pull request #65616 from cofyc/fix56163
Automatic merge from submit-queue (batch tested with PRs 65570, 65616). 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>.

Retry scheduling on StorageClass events

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

**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 #56163

**Special notes for your reviewer**:

I have taken over #60006.
It's hard to test in e2e, because we cannot know reschedule of pod is triggered by which event (periodically service/node events will move pods to active queue too). ~~I'll add integration tests for this functionality after [this PR](https://github.com/kubernetes/kubernetes/pull/65296) get merged.~~ (already added)

**Release note**:

```release-note
NONE
```
2018-07-31 19:18:00 -07:00
Kubernetes Submit Queue d5e7059bf3
Merge pull request #65570 from max8899/patch-gofmt
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 some style error using gofmt

**What this PR does / why we need it**:
fix some style error using gofmt

**Release note**:
```release-note
NONE
```
2018-07-31 18:58:53 -07:00
hangaoshuai e0796ab913 should get return err and check it 2018-08-01 09:34:41 +08:00
Kubernetes Submit Queue 48b3786cb4
Merge pull request #66631 from mikedanese/milestones
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>.

add myself to milestone maintainers

I am a lead of sig-auth.

```release-note
NONE
```
2018-07-31 17:23:32 -07:00
Srini Brahmaroutu dcb7bc313f Adding details to Conformance Tests using RFC 2119 standards. 2018-07-31 17:21:18 -07:00
Kubernetes Submit Queue 99133f510d
Merge pull request #60551 from brahmaroutu/conf_CRD
Automatic merge from submit-queue (batch tested with PRs 66445, 66643, 60551). 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>.

Adding details to Conformance Tests using RFC 2119 standards.

This PR is part of the conformance documentation. This is to provide more formal specification using RFC 2119 keywords to describe the test so that who ever is running conformance tests do not have to go through the code to understand why and what is tested.
The documentation information added here into each of the tests eventually result into a document which is currently checked in at location https://github.com/cncf/k8s-conformance/blob/master/docs/KubeConformance-1.9.md

I would like to have this PR reviewed for v1.10 as I consider it important to strengthen the conformance documents.
2018-07-31 15:56:10 -07:00
Kubernetes Submit Queue f49708bd49
Merge pull request #66643 from smarterclayton/improve_events
Automatic merge from submit-queue (batch tested with PRs 66445, 66643, 60551). 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>.

Improve the output of `kubectl get events`

Events have long shown the most data of the core objects in their output, but that data is of varying use to a user. Following the principle that events are intended for the system to communicate information back to the user, and that Message is the primary human readable field, this commit alters the default columns to ensure event is shown with the most width given to the message, and all other fields organized by their relevance to the message.

1. Events are no longer sorted in the printer (this was a bug and was broken with paging and server side rendering)
2. Only the last seen, type, reason, kind, and message fields are shown by default, which makes the message prominent
3. Source, subobject, count, and first seen are only shown under `-o wide`
4. The duration fields were changed to be the more precise output introduced for job duration (2-3 sig figs)
5. Prioritized the column order for scanning - when, how important, what kind of error, what kind of object, and the message.
6. Trim trailing newlines on the message.

```release-note
Improved the output of `kubectl get events` to prioritize showing the message, and move some fields to `-o wide`.
```

```
$ kubectl get events --sort-by lastTimestamp
LAST SEEN TYPE      REASON                   KIND                    MESSAGE
16m       Normal    SawCompletedJob          CronJob                 Saw completed job: image-mirror-origin-v3.11-quay-1532581200
16m       Normal    SuccessfulDelete         CronJob                 Deleted job image-mirror-origin-v3.11-quay-1532577600
14m       Normal    Scheduled                Pod                     Successfully assigned 50c42204-9091-11e8-b2a1-0a58ac101869 to origin-ci-ig-n-fqfh
14m       Normal    Pulling                  Pod                     pulling image "docker-registry.default.svc:5000/ci/commenter:latest"
14m       Normal    Created                  Pod                     Created container
14m       Normal    Pulled                   Pod                     Successfully pulled image "docker-registry.default.svc:5000/ci/commenter:latest"
14m       Normal    Started                  Pod                     Started container
14m       Normal    SandboxChanged           Pod                     Pod sandbox changed, it will be killed and re-created.
4m14s     Normal    ScaleDown                Pod                     deleting pod for node scale down
4m14s     Normal    ScaleDown                Pod                     deleting pod for node scale down
4m14s     Normal    ScaleDown                Pod                     deleting pod for node scale down
4m14s     Normal    ScaleDown                Pod                     deleting pod for node scale down
4m14s     Normal    ScaleDown                Pod                     deleting pod for node scale down
4m14s     Normal    ScaleDown                Pod                     deleting pod for node scale down
4m14s     Normal    ScaleDown                Pod                     deleting pod for node scale down
4m13s     Normal    SuccessfulCreate         ReplicationController   Created pod: tide-30-hmncf
4m13s     Normal    Scheduled                Pod                     Successfully assigned tide-30-hmncf to origin-ci-ig-n-x64l
4m12s     Normal    SuccessfulCreate         ReplicationController   Created pod: console-jenkins-operator-16-dd5k8
4m12s     Normal    SuccessfulCreate         ReplicationController   Created pod: sinker-23-scfmt
```
2018-07-31 15:56:07 -07:00
Kubernetes Submit Queue 65ba40c2b0
Merge pull request #66445 from rosti/kubeadm-test-cmd-init
Automatic merge from submit-queue (batch tested with PRs 66445, 66643, 60551). 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>.

kubeadm: Improve kubeadm init cmd tests

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

This PR improves kubeadm init cmd tests in the following ways:

- Fix a few cases that were always successful (despite completely wrong).
- Add more test cases (for different configs in particular)
- Use dry run, to avoid modifying the system and using kubeadm reset

**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 NONE

**Special notes for your reviewer**:
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/assign @luxas
/assign @timothysc

**Release note**:

```release-note
NONE
```
2018-07-31 15:56:04 -07:00
Srini Brahmaroutu aef6cd9bac Adding details to Conformance Tests using RFC 2119 standards. 2018-07-31 14:19:28 -07:00
Maria Alejandra Kurylec 677eaa5b88 Note:
this PR is the result of splitting https://github.com/kubernetes/kubernetes/pull/65793 into 2 sections
1) This part, addressing the refactor so eligible-test-for-conformance can use get rid of privileged security context.
2) a second part that will address the promotion of the testcases to be in conformance suite

Changes:
a) demoted privileged mode for these tests (not needed)
b) regular tests (the other ones existing in the file) will still be using privileged security context.
c) adding privilegedSecurityContext field to VolInfo, so each volume-flavor can let the test know if the security context has to be privileged or not.
This allows granular changes and updates per volume).
d) fixing formatting issue.
2018-07-31 17:23:46 -03:00
Kubernetes Submit Queue 167a513f07
Merge pull request #66816 from cofyc/revert66061
Automatic merge from submit-queue (batch tested with PRs 66270, 60554, 66816). 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>.

Revert "Passing `KUBE_TEST_ARGS` variable to make through process environment"

This reverts commit fda0edcd1c.



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

**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 #66782

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-31 12:23:01 -07:00
Kubernetes Submit Queue 2579ecd7ad
Merge pull request #60554 from brahmaroutu/conf_sched
Automatic merge from submit-queue (batch tested with PRs 66270, 60554, 66816). 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>.

Adding details to Conformance Tests using RFC 2119 standards.

This PR is part of the conformance documentation. This is to provide more formal specification using RFC 2119 keywords to describe the test so that who ever is running conformance tests do not have to go through the code to understand why and what is tested.
The documentation information added here into each of the tests eventually result into a document which is currently checked in at location https://github.com/cncf/k8s-conformance/blob/master/docs/KubeConformance-1.9.md

I would like to have this PR reviewed for v1.10 as I consider it important to strengthen the conformance documents.
2018-07-31 12:22:59 -07:00
Kubernetes Submit Queue c0bf2e680f
Merge pull request #66270 from Pingan2017/delevent
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>.

delete unused events

**What this PR does / why we need it**:
 events (HostNetworkNotSupported, UndefinedShaper) is unused since #47058
**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-31 12:14:06 -07:00
juanvallejo ad11a1b7a6
update exit code to 0 if patch not needed 2018-07-31 14:41:30 -04:00
Kubernetes Submit Queue 14ee31b7e3
Merge pull request #66014 from yue9944882/cleanup-podpreset-unused-methods
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>.

Clean up podpreset admission controller unused methods

**What this PR does / why we need it**:
As the title.
**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-31 10:49:57 -07:00
Kubernetes Submit Queue 259e0743f1
Merge pull request #66581 from janetkuo/deploy-progress
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>.

 Default extensions/v1beta1 Deployment's ProgressDeadlineSeconds to MaxInt32

**What this PR does / why we need it**: Default values should be set in all API versions, because defaulting happens whenever a serialized version is read. When we switched to `apps/v1` as the storage version in `1.10` (#58854), `extensions/v1beta1` `DeploymentSpec.ProgressDeadlineSeconds` gets `apps/v1` default value (`600`) instead of being unset. 

**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 #66135 

**Special notes for your reviewer**: We need to cherrypick this fix to 1.10 and 1.11. Note that this fix will only help people who haven't upgraded to 1.10 or 1.11 when the storage version is changed. 

@kubernetes/sig-apps-bugs 

**Release note**:

```release-note
NONE
```
2018-07-31 09:30:59 -07:00
Kubernetes Submit Queue f2c6473e25
Merge pull request #66718 from ipuustin/cpu-manager-validate-offline
Automatic merge from submit-queue (batch tested with PRs 66623, 66718). 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>.

cpumanager: validate topology in static policy

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

This patch adds a check for the static policy state validation. The check fails if the CPU topology obtained from cadvisor doesn't match with the current topology in the state file.

If the CPU topology has changed in a node, cpumanager static policy might try to assign non-present cores to containers.

For example in my test case, static policy had the default CPU set of `0-1,4-7`. Then kubelet was shut down and CPU 7 was offlined. After restarting the kubelet, CPU manager tries to assign the non-existent CPU 7 to containers which don't have exclusive allocations assigned to them:

    Error response from daemon: Requested CPUs are not available - requested 0-1,4-7, available: 0-6)

This breaks the exclusivity, since the CPUs from the shared pool don't get assigned to non-exclusive containers, meaning that they can execute on the exclusive CPUs.

**Release note**:

```release-note
Added CPU Manager state validation in case of changed CPU topology.
```
2018-07-31 08:05:06 -07:00
Kubernetes Submit Queue 5e546893f7
Merge pull request #66623 from deads2k/gc-01-graph
Automatic merge from submit-queue (batch tested with PRs 66623, 66718). 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>.

expose GC graph via debug handler

Many times when debugging GC problems, it's important to understand the state of the GC graph at a given point in time.  This pull adds the ability to dump that graph in DOT format for later consumption.  It does this by exposing an additional debug handler and allowing any controller init function to produce such a handler that is included under debug.

Sample full output
```
curl http://localhost:10252/debug/controllers/garbagecollector/graph
digraph full {
  // Node definitions.
  0 [
    label="uid=8581a030-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Pod.v1/kube-dns-7b479ccbc6-qz468
"
    group=""
    version="v1"
    kind="Pod"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6-qz468"
    uid="8581a030-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  1 [
    label="uid=822052fc-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Deployment.v1.apps/kube-dns
"
    group="apps"
    version="v1"
    kind="Deployment"
    namespace="kube-system"
    name="kube-dns"
    uid="822052fc-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  2 [
    label="uid=857bd8ac-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
ReplicaSet.v1.apps/kube-dns-7b479ccbc6
"
    group="apps"
    version="v1"
    kind="ReplicaSet"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6"
    uid="857bd8ac-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];

  // Edge definitions.
  0 -> 2;
  2 -> 1;
}
```

You can also select via UID and have all transitive dependencies output:
```
curl http://localhost:10252/debug/controllers/garbagecollector/graph?uid=8581a030-9043-11e8-ad4a-54e1ad486dd3
digraph full {
  // Node definitions.
  0 [
    label="uid=822052fc-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Deployment.v1.apps/kube-dns
"
    group="apps"
    version="v1"
    kind="Deployment"
    namespace="kube-system"
    name="kube-dns"
    uid="822052fc-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  1 [
    label="uid=8581a030-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
Pod.v1/kube-dns-7b479ccbc6-qz468
"
    group=""
    version="v1"
    kind="Pod"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6-qz468"
    uid="8581a030-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];
  2 [
    label="uid=857bd8ac-9043-11e8-ad4a-54e1ad486dd3
namespace=kube-system
ReplicaSet.v1.apps/kube-dns-7b479ccbc6
"
    group="apps"
    version="v1"
    kind="ReplicaSet"
    namespace="kube-system"
    name="kube-dns-7b479ccbc6"
    uid="857bd8ac-9043-11e8-ad4a-54e1ad486dd3"
    missing="false"
    beingDeleted="false"
    deletingDependents="false"
    virtual="false"
  ];

  // Edge definitions.
  1 -> 2;
  2 -> 0;
}
```

And with some sample rendering:
```
curl http://localhost:10252/debug/controllers/garbagecollector/graph  | dot -T svg -o project.svg
```

produces

![gc](https://user-images.githubusercontent.com/8225098/43223895-8e33c126-9022-11e8-8ad9-6b2f986fd974.png)


@kubernetes/sig-api-machinery-pr-reviews 
/assign @caesarxuchao @liggitt 

```release-note
NONE
```
2018-07-31 08:05:03 -07:00
Shyam Jeedigunta 7250a5621a Fix expected pod creations/deletions estimate in load test 2018-07-31 15:58:23 +02:00
Kubernetes Submit Queue 05acb32aca
Merge pull request #66691 from spiffxp/default-unbound-cluster-gce-vars
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>.

Default some unbound cluster/gce env vars

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

Sets defaults for two env vars used by cluster/gce/* scripts so as to
avoid the following warnings when bringing a cluster up for test
```
METADATA_CONCEALMENT_NO_FIREWALL: unbound variable
CUSTOM_KUBE_DASHBOARD_BANNER: unbound variable
```

**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 #60850

```release-note
NONE
```
2018-07-31 05:30:37 -07:00
Yecheng Fu dc4a8a6696 Revert "Passing `KUBE_TEST_ARGS` variable to make through process environment"
This reverts commit fda0edcd1c.
2018-07-31 16:52:37 +08:00
Ismo Puustinen 3bb5ca9257 cpumanager: add test for available CPUs in static policy.
Test the cases where the number of CPUs available in the system is
smaller or larger than the number of CPUs known in the state, which
should lead to a panic. This covers both CPU onlining and offlining. The
case where the number of CPUs matches is already covered by the
"non-corrupted state" test.
2018-07-31 10:20:37 +03:00
Kubernetes Submit Queue 10688257e6
Merge pull request #66694 from spiffxp/dd-status-none
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>.

dd status=none does not exist on macOS

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

When running cluster/kubectl.sh on macOS 10.13.6, the use of the
`status=none` operand leads to `dd: unknown operand status` being
printed out as an error message. Redirecting to /dev/null does
the same thing, supressing transfer status.

```release-note
NONE
```
2018-07-30 22:46:13 -07:00
Kubernetes Submit Queue 1b6a505451
Merge pull request #66690 from spiffxp/verify-no-libressl
Automatic merge from submit-queue (batch tested with PRs 66284, 66690). 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>.

Exit gce kube-up.sh early if openssl is LibreSSL

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

macOS has an openssl binary, but it's actually LibreSSL, which doesn't play well with the easyrsa script that cluster/gce/util.sh uses to generate certs

Instead of waiting until we generate certs to discover easyrsa doesn't work, consider openssl a prereq for gce, and include a check for the version string starting with OpenSSL

Also, mirror kube-up.sh's "... calling" output in kube-down.sh

**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 kubernetes/community#1954

```release-note
NONE
```
2018-07-30 20:01:58 -07:00
Kubernetes Submit Queue 2bee858a7b
Merge pull request #66284 from stewart-yu/stewart-sharedtype-move
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>.

Move the` k8s.io/kubernetes/pkg/util/pointer` package to` k8s.io/utils/pointer`

**What this PR does / why we need it**:
Move `k8s.io/kubernetes/pkg/util/pointer` to  `shared utils` directory, so that we can use it  easily.
Close #66010 accidentally, and can't reopen it, so the same as #66010 

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-30 19:50:36 -07:00
Kubernetes Submit Queue d78f491103
Merge pull request #66734 from stewart-yu/stewart-e2e-badoutput
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 wrong format output in e2e log

**What this PR does / why we need it**:
When i run e2e, occuring  some  output log as below:
```
STEP: Creating pod1
STEP: Creating a pod
Jul 28 14:09:12.876: INFO: pod "security-context-bd6750a8-922c-11e8-abe9-286ed488d743" created on Node "127.0.0.1"
Jul 28 14:09:12.876: INFO: Running '/usr/local/bin/kubectl --server=http://127.0.0.1:8080 --kubeconfig=/var/run/kubernetes/admin.kubeconfig exec --namespace=e2e-tests-persistent-local-volumes-test-dlbf7 security-context-bd6750a8-922c-11e8-abe9-286ed488d743 -- /bin/sh -c cat /mnt/volume1/test-file'
Jul 28 14:09:13.119: INFO: stderr: ""
Jul 28 14:09:13.119: INFO: stdout: "test-file-content\n"
Jul 28 14:09:13.119: INFO: podRWCmdExec out: "test-file-content\n" err: %!q(<nil>)
STEP: Writing in pod1
Jul 28 14:09:13.119: INFO: Running '/usr/local/bin/kubectl --server=http://127.0.0.1:8080 --kubeconfig=/var/run/kubernetes/admin.kubeconfig exec --namespace=e2e-tests-persistent-local-volumes-test-dlbf7 security-context-bd6750a8-922c-11e8-abe9-286ed488d743 -- /bin/sh -c mkdir -p /mnt/volume1; echo /tmp/local-volume-test-b97fe819-922c-11e8-abe9-286ed488d743 > /mnt/volume1/test-file'
Jul 28 14:09:13.331: INFO: stderr: ""
Jul 28 14:09:13.331: INFO: stdout: ""
Jul 28 14:09:13.331: INFO: podRWCmdExec out: "" err: %!q(<nil>)
STEP: Deleting pod1
STEP: Deleting pod security-context-bd6750a8-922c-11e8-abe9-286ed488d743 in namespace e2e-tests-persistent-local-volumes-test-dlbf7
STEP: Creating pod2
STEP: Creating a pod
```
the `podRWCmdExec out: "" err: %!q(<nil>)` line are wrong
**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-30 18:29:45 -07:00
Kubernetes Submit Queue 24fa5edb60
Merge pull request #66739 from islinwb/ipvs_mods_check
Automatic merge from submit-queue (batch tested with PRs 66489, 66728, 66739). 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>.

remove incomplete check of ipvs modules in hack/local-up-cluster.sh

**What this PR does / why we need it**:
Currently `hack/local-up-cluster.sh` executes `sudo modprobe -a ip_vs ip_vs_rr ip_vs_wrr ip_vs_sh nf_conntrack_ipv4` to check whether the ipvs required modules exist, which leaves out the scenario https://github.com/kubernetes/kubernetes/issues/63801 mentioned.
Since `func CanUseIPVSProxier` in  `pkg/proxy/ipvs/proxier.go` covers all scenarios, maybe we should just remove this part instead of adding codes.

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-30 17:10:07 -07:00
Kubernetes Submit Queue 1f8b3fded9
Merge pull request #66728 from gnufied/fix-volume-modifition-aws
Automatic merge from submit-queue (batch tested with PRs 66489, 66728, 66739). 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>.

Speed up volume modifications on AWS

Volume becomes reusable after it reached optimizing state.

/sig storage
/sig aws


```release-note
Make EBS volume expansion faster
```

cc @d-nishi @kokhang
2018-07-30 17:10:04 -07:00
Kubernetes Submit Queue 1b9cc58191
Merge pull request #66489 from tanshanshan/todoclean
Automatic merge from submit-queue (batch tested with PRs 66489, 66728, 66739). 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>.

Reuse iptablesContainerPortalArgs, remove function iptablesContainerNodePortArgs

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

reuse iptablesContainerPortalArgs, remove function iptablesContainerNodePortArgs

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-30 17:10:01 -07:00
Davanum Srinivas cd2645d99c
Remove folders for unused container images
Change-Id: If58e01d0123fdbd0cc1c2264963a258cdc1e7702
2018-07-30 18:40:25 -04:00
Davanum Srinivas 0965db0ccf
Remove unused images
Change-Id: I6be2d14df736f5ae592d7e95713445b3d1c67a16
2018-07-30 18:40:17 -04:00
Davanum Srinivas a599697b87
Switch to using multi-arch images with manifests
Change-Id: I7f170c9a3af5492b40c822371d3182ede1ed7704
2018-07-30 18:35:28 -04:00
Kubernetes Submit Queue 742a90cb5a
Merge pull request #65948 from figo/stateless
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>.

Simplify device manager: make endpoint stateless

While reviewing devicemanager code, found the caching layer on endpoint is redundant.
Here are the 3 related objects in picture:

**devicemanager  <->  endpoint <-> plugin**

plugin is the source of truth for devices and device health status.
devicemanager maintain healthyDevices, unhealthyDevices, allocatedDevices based on updates
from plugin.

So there is no point for endpoint to cache devices, this patch is removing the cache layer,
endpoint becomes stateless, which i believe should be the case (but i do welcome review
if i missed something here).

also removing the Manager.Devices() since i didn't find any caller of this other than test.

if we need to get all devices from manager in future, it just need to return healthyDevices + unhealthyDevices, so don't have to call endpoint after all.

This patch makes code more readable, data model been simplified.



**What this PR does / why we need it**:
this patch simplify the device manager code, make it more maintainable.

**Which issue(s) this PR fixes** *:
this is a refactor of device manager code

**Special notes for your reviewer**:
will need to rebase the code if #58755 get checked-in first.

**Release note**:

```release-note
None
```

/sig node
/cc @jiayingz @RenaudWasTaken @vishh @saad-ali @vikaschoudhary16 @vladimirvivien @anfernee
2018-07-30 11:42:57 -07:00
Kubernetes Submit Queue a934499cf9
Merge pull request #66760 from tanshanshan/e2e-error
Automatic merge from submit-queue (batch tested with PRs 66686, 66760). 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>.

Error in return value should be tested

**What this PR does / why we need it**:
Error in return value should be tested
**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-30 09:52:04 -07:00
Kubernetes Submit Queue 5ef6a6a259
Merge pull request #66686 from dims/test-image-for-a-release-1.7-based-sample-apiserver
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>.

test image for a release 1.7 based sample-apiserver

**What this PR does / why we need it**:
In our e2e test suite we have use an image "gcr.io/kubernetes-e2e-test-images:k8s-aggregator-sample-apiserver:1.7v2". We need a way to build a fresh image that can we can use instead of that one. Especially we need one that has a multi-arch fat manifest so e2e tests can be run across multiple architectures.

This is especially important since we are in the process of promoting the test in question to the conformance suite - https://github.com/kubernetes/kubernetes/pull/63947

**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 #

**Special notes for your reviewer**:
/cc @mkumatag 
/cc @ixdy 
/cc @luxas 

**Release note**:

```release-note
NONE
```
2018-07-30 09:46:01 -07:00
tanshanshan af0fc11ded error in return value should be tested 2018-07-30 15:17:32 +08:00
Ismo Puustinen 4f604eb73c cpumanager: validate topology in static policy.
This patch adds a check for the static policy state validation. The
check fails if the CPU topology obtained from cadvisor doesn't match
with the current topology in the state file.

If the CPU topology has changed in a node, cpu manager static policy
might try to assign non-present cores to containers.

For example in my test case, static policy had the default CPU set of
0-1,4-7. Then kubelet was shut down and CPU 7 was offlined. After
restarting the kubelet, CPU manager tries to assign the non-existent CPU
7 to containers which don't have exclusive allocations assigned to them:

 Error response from daemon: Requested CPUs are not available - requested 0-1,4-7, available: 0-6)

This breaks the exclusivity, since the CPUs from the shared pool don't
get assigned to non-exclusive containers, meaning that they can execute
on the exclusive CPUs.
2018-07-30 08:49:13 +03:00
hui luo 7101c17498 While reviewing devicemanager code, found
the caching layer on endpoint is redundant.

Here are the 3 related objects in picture:
devicemanager <-> endpoint <-> plugin

Plugin is the source of truth for devices
and device health status.

devicemanager maintain healthyDevices,
unhealthyDevices, allocatedDevices based on updates
from plugin.

So there is no point for endpoint caching devices,
this patch is removing this caching layer on endpoint,

Also removing the Manager.Devices() since i didn't
find any caller of this other than test, i am adding a
notification channel to facilitate testing,

If we need to get all devices from manager in future,
it just need to return healthyDevices + unhealthyDevices,
we don't have to call endpoint after all.

This patch makes code more readable, data model been simplified.
2018-07-29 21:07:14 -07:00
Davanum Srinivas c8782f45c4
test image for a release 1.7 based sample-apiserver
Change-Id: I1429e4866cf20dd88781f37a124ccff65334f534
2018-07-28 16:29:18 -04:00
Kubernetes Submit Queue 28b6fb5f7d
Merge pull request #66729 from dims/switch-off-leader-election-in-local-up-cluster
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>.

Switch off leader election for scheduler and kube/cloud controller

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

We now have leader election on by default, for a single node
local-up-cluster, this is not needed. Let's switch it off

This will reduce the flakiness and timeouts we see in the local e2e CI jobs.

**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 #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-28 13:26:17 -07:00