Commit Graph

130 Commits (eacbd6292538fd85e53850ce096c4b9249084219)

Author SHA1 Message Date
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Jan Chaloupka 0d4a5b4cbd Have the /rootfs rw for containerized node e2e 2018-06-19 22:28:05 +02:00
Jan Chaloupka ee83021182 Mount the kubeletConfigPath rw when running containerized node e2e tests
The kubelet needs to create dynamic-kubelet-config directory under the kubeletConfigPath
when initialing dynamic config directory.
2018-05-31 14:45:20 +02:00
Kubernetes Submit Queue 452b8c9e0d
Merge pull request #62101 from bart0sh/PR0010-e2e_node-kubelet-command-line-fix
Automatic merge from submit-queue (batch tested with PRs 58474, 60034, 62101, 63198). 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 usage of kubelet option

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

"--allow-privileged true" is incorrect usage of boolean option.
It means setting '--allow-priviledged' to its default value plus
non-existing subcommand 'true'.

"--allow-privileged false" is even more confusing as it sets
allow-priviledged flag to its default value 'true'

This is true for any boolean command line option.

Fixed this by using correct syntax --allow-priviledged=true

**Special notes for your reviewer**:
This is a show-stopper for PR #61833 

**Release note**:

```release-note
NONE
```
2018-04-30 13:24:12 -07:00
Jordan Liggitt 1bddcdcf44
Bump QPS on namespace controller
https://github.com/kubernetes/kubernetes/pull/62913 switched from using a client pool, where each groupVersionResource got its own rest client, to a single client.

This increases the QPS to account for increased requests using a single rest client rate limiter.
2018-04-27 10:11:14 -04:00
David Eads 3632037e60 add easy to use dynamic client 2018-04-25 08:55:26 -04:00
Kubernetes Submit Queue 44b57338d5
Merge pull request #59692 from mtaufen/dkcfg-unpack-configmaps
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>.

unpack dynamic kubelet config payloads to files

This PR unpacks the downloaded ConfigMap to a set of files on the node.

This enables other config files to ride alongside the
KubeletConfiguration, and the KubeletConfiguration to refer to these
cohabitants with relative paths.

This PR also stops storing dynamic config metadata (e.g. current,
last-known-good config records) in the same directory as config
checkpoints. Instead, it splits the storage into `meta` and
`checkpoints` dirs.

The current store dir structure is as follows:
```
- dir named by --dynamic-config-dir (root for managing dynamic config)
| - meta (dir for metadata, e.g. which config source is currently assigned, last-known-good)
  | - current (a serialized v1 NodeConfigSource object, indicating the assigned config)
  | - last-known-good (a serialized v1 NodeConfigSource object, indicating the last-known-good config)
| - checkpoints (dir for config checkpoints)
  | - uid1 (dir for unpacked config, identified by uid1)
    | - file1
    | - file2
    | - ...
  | - uid2
  | - ...
```

There are some likely changes to the above structure before dynamic config goes beta, such as renaming "current" to "assigned" for clarity, and extending the checkpoint identifier to include a resource version, as part of resolving #61643.

```release-note
NONE
```

/cc @luxas @smarterclayton
2018-04-24 12:01:37 -07:00
Michael Taufen c9d398d01e unpack dynamic kubelet config payloads to files
This PR unpacks the downloaded ConfigMap to a set of files on the node.

This enables other config files to ride alongside the
KubeletConfiguration, and the KubeletConfiguration to refer to these
cohabitants with relative paths.

This PR also stops storing dynamic config metadata (e.g. current,
last-known-good config records) in the same directory as config
checkpoints. Instead, it splits the storage into `meta` and
`checkpoints` dirs.
2018-04-19 09:18:53 -07:00
Lantao Liu c86e85c420 Fix extra-log flag for node e2e.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-04-17 21:48:26 +00:00
Lantao Liu 27105c90ec Fix kubelet flags.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-04-16 20:42:40 +00:00
Ed Bartosh 7e3d28b30f Fix wrong usage of kubelet options
"--allow-privileged true" is incorrect usage of boolean option.
It means setting '--allow-priviledged' to its default value plus
non-existing subcommand 'true'.

"--allow-privileged false" is even more confusing as it sets
allow-priviledged flag to its default value 'true'

This is true for any boolean command line option.

Fixed this by using correct syntax --allow-priviledged=true

Fixed generating of kubelet command line in addKubeletConfigFlags
function.
2018-04-12 15:19:49 +03:00
hzxuzhonghu 8cce8bdc85 make kube-apiserver ServerRunOptions setdefault and Validate before use 2018-04-04 11:19:55 +08:00
Filipe Brandenburger 76ef9c9074 Make systemd service name for kubelet use a timestamp in e2e-node tests.
This makes it easier to figure out which execution was last when looking
at the output of `systemd list-units kubelet-*.service`.

We try to find the name of the /tmp/node-e2e-* directory and use the
same timestamp if we can. Otherwise, we just call Now() again, which
isn't as nice (as the unit name and directory name will not match) but
will still produce unit names that will be ordered when launching
multiple subsequent executions on the same host.
2018-03-29 11:17:42 -07:00
Kubernetes Submit Queue ae7be34c32
Merge pull request #60509 from verb/pid-e2e
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 node-e2e test for ShareProcessNamespace

**What this PR does / why we need it**: Adds a node-e2e test for kubernetes/features#495

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

**Special notes for your reviewer**: This requires a feature gate to be enabled in both the kubelet and API server. I'm not sure which jenkins configs need to be updated (or if these are even still used) so I just updated a pile of them.

opened kubernetes/test-infra#7030 for https://github.com/kubernetes/test-infra/blob/master/jobs/config.json

**Release note**:

```release-note
NONE
```
2018-03-05 14:20:14 -08:00
Kubernetes Submit Queue 5d26ef96a8
Merge pull request #59345 from hanxiaoshuai/fixtodo02051
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 todo:Move function readinessCheck to util

**What this PR does / why we need it**:
fix todo:Move function readinessCheck to util in test/e2e_node/services
**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-02-28 08:06:34 -08:00
Lee Verberne b02f1f2ce3 Add node-e2e test for ShareProcessNamespace 2018-02-28 09:15:56 +01:00
Kubernetes Submit Queue 720c29b3e8
Merge pull request #60314 from mtaufen/kubelet-manifest-is-oldspeak
Automatic merge from submit-queue (batch tested with PRs 60324, 60269, 59771, 60314, 59941). 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>.

expunge the word 'manifest' from Kubelet's config API

The word 'manifest' technically refers to a container-group specification
that predated the Pod abstraction. We should avoid using this legacy
terminology where possible. Fortunately, the Kubelet's config API will
be beta in 1.10 for the first time, so we still had the chance to make
this change.

I left the flags alone, since they're deprecated anyway.

I changed a few var names in files I touched too, but this PR is the
just the first shot, not the whole campaign
(`git grep -i manifest | wc -l -> 1248`).

```release-note
Some field names in the Kubelet's now v1beta1 config API differ from the v1alpha1 API: PodManifestPath is renamed to PodPath, ManifestURL is renamed to PodURL, ManifestURLHeader is renamed to PodURLHeader.
```
2018-02-24 20:01:46 -08:00
Kubernetes Submit Queue 829ada8e30
Merge pull request #57965 from xiangpengzhao/cleanup-feature-gates
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 test framework featuregates type

**What this PR does / why we need it**:
A cleanup following #53025 and #57962.

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

**Special notes for your reviewer**:
but yeah, not sure if it's worthy to do this :)

**Release note**:

```release-note
NONE
```
2018-02-24 07:34:19 -08:00
Michael Taufen b4bddcc998 expunge the word 'manifest' from Kubelet's config API
The word 'manifest' technically refers to a container-group specification
that predated the Pod abstraction. We should avoid using this legacy
terminology where possible. Fortunately, the Kubelet's config API will
be beta in 1.10 for the first time, so we still had the chance to make
this change.

I left the flags alone, since they're deprecated anyway.

I changed a few var names in files I touched too, but this PR is the
just the first shot, not the whole campaign
(`git grep -i manifest | wc -l -> 1248`).
2018-02-23 11:44:06 -08:00
hzxuzhonghu 27f3fd2d79 set default enabled admission plugins by official document 2018-02-22 11:02:02 +08:00
Michael Taufen 9ebaf5e7d2 Move the kubeletconfig v1alpha1 API to beta, rename to kubelet.config.k8s.io 2018-02-14 17:30:22 -08:00
hangaoshuai 7898534720 fix todo:Move function readinessCheck to util 2018-02-05 20:16:05 +08:00
xiangpengzhao abdfa7f35f Update test framework featuregates type. 2018-02-01 17:15:12 +08:00
Lantao Liu e7531ca6c8 Set generate-kubelet-config-file to true by default.
Signed-off-by: Lantao Liu <lantaol@google.com>
2018-01-30 00:20:35 +00:00
Michael Taufen 6443b6f543 Removal of KubeletConfigFile feature gate: Step 1
This feature gate was redundant with the `--config` flag, which already
enables/disables loading Kubelet config from a file.

Since the gate guarded an alpha feature, removing it is not a violation
of our API guidelines.

Some stuff in `kubernetes/test-infra` currently sets the gate,
so removing will be a 3 step process:
1. This PR, which makes the gate a no-op.
2. Stop setting the gate in `kubernetes/test-infra`.
3. Completely remove the gate.
2018-01-24 10:19:15 -08:00
Kubernetes Submit Queue ecd525d8aa
Merge pull request #57976 from Random-Liu/node-e2e-non-docker-specific
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>.

Node e2e non docker specific

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

Make node e2e test generic to container runtimes.

With this change, other than tests with `[Feature:Docker]`, all tests can run against all CRI container runtimes.

Note that this PR also marks cpu manager test as `Serial`, because it restarts kubelet during the test. It doesn't cause problem in regular node e2e suite today, because it is skipped if node has less than 2 CPUs, which is the case for our test environment. /cc @balajismaniam 

@yujuhong @mrunalp @feiskyer 
/cc @dashpole @balajismaniam @bprashanth Because I addressed your comments.
/cc @kubernetes/sig-node-pr-reviews 
**Release note**:

```release-note
none
```
2018-01-09 17:26:40 -08:00
Lantao Liu f64c508e2e Add getCRIClient and set default values for CRI related flags 2018-01-09 22:59:17 +00:00
Michael Taufen 5caf26fa84 Move some old security controls to KubeletFlags and mark them deprecated 2018-01-09 10:18:36 -08:00
Kubernetes Submit Queue 2d2fa02337
Merge pull request #57638 from mtaufen/kc-e2e-node-file
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>.

e2e node framework can generate a base kubelet config file

Fixes #57980

This allows the e2e node test framework to generate a Kubelet config file containing the defaults it would typically pass to a test via flags, rather than passing these defaults as flags.

```release-note
NONE
```
2018-01-08 20:38:22 -08:00
Joe Betz 6a0c69e971 Fix build and test errors from etcd 3.2.13 upgrade 2018-01-07 08:22:08 -08:00
Michael Taufen 90814b3a97 e2e node framework can generate a base kubelet config file
This allows the e2e node test framework to generate a kubelet config
file containing the defaults it would typically pass to a test via
flags, rather than passing these defaults as flags.
2018-01-04 16:47:04 -08:00
Wojciech Tyczynski 4e8526dc6b
Revert "Version bump to etcd v3.2.11, grpc v1.7.5" 2017-12-19 15:25:06 +01:00
Kubernetes Submit Queue a7b404ec7f
Merge pull request #57160 from jpbetz/etcd-client-3.2.11
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>.

Version bump to etcd v3.2.11, grpc v1.7.5

Fix https://github.com/kubernetes/kubernetes/issues/56114: Update to etcd client 3.2.11

Version bumps:

- etcd from 3.1.10 to 3.2.11
- grpc from 1.3.0 to 1.7.5
- grpc-gateway from v1.1.0-25-g84398b9 to v1.3.0

TODO:

- [x] Apply etcd [3.2 client upgrade guide](https://github.com/coreos/etcd/blob/master/Documentation/upgrades/upgrade_3_2.md)
- [x] Apply grpc API changes in 1.6.0 and 1.7.0 [release notes](https://github.com/grpc/grpc-go/releases)
- [x] bbolt was pulled in transitively, why? We have tests that embed etcd, so we must vendor the etcd server and all it's dependencies.
- [x] Upgrade to containerd v1.0.0? Currently kubernetes depends on containerd v1.0.0-beta.2-159-g27d450a0 which depends on grpc v1.3.0, but  containerd v1.0.0 depends on grpc 1.7.2. Not needed. The containerd grpc upgrade required [no code changes](ce3e32680d).
- [x] Fix all failing tests
- [x] Ensure we can safely upgrade grpc to 1.7.5 given that docker and cAdvisor still depend on grpc 1.3.0 (both in the versions we vend and on master for both projects). Should we hold off on this change until we have a docker release that uses gprc 1.7.x?
- [x] Wait for grpc 1.7.5 to be released (it will include https://github.com/grpc/grpc-go/pull/1747). Once released, bump grpc version in this PR and remove workarounds in `hack/godep-save.sh`.

Transitive dependencies on grpc:
- docker depends on grpc, but according to the package dependency graph (`go list -f '{{ .Deps }}'`) there are no dependencies from kubernetes to grpc via docker packages.
- containerd v1.0.0 depends on grpc 1.7.2, we should upgrade to containerd v1.0.0 soon, this can be done in a separate PR
- cadvisor depends on grpc 1.3.0 on master, it should upgrade it to grpc 1.7.5, this can be done in a separate PR

**Release note**:

```release-note
Upgrade to etcd client 3.2.11 and grpc 1.7.5 to improve HA etcd cluster stability.
```
2017-12-19 02:14:36 -08:00
Kubernetes Submit Queue c16a336eaa
Merge pull request #55475 from ScorpioCPH/fix-e2e-local-test
Automatic merge from submit-queue (batch tested with PRs 55475, 57155, 57260, 57222). 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 e2e local test

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

Fix some issue on local e2e_node test: `Can't start e2e service "kubelet"`

**Which issue(s) this PR fixes**:

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

**Special notes for your reviewer**:

**Release note**:

```release-note

```
/sig node
2017-12-18 19:45:38 -08:00
Joe Betz 94f2ed6849 Fix build and test errors from etcd 3.2.11 upgrade 2017-12-18 16:17:42 -08:00
Jan Chaloupka 607e863f85 WIP: extend node e2e test suite with containerized Kubelet 2017-11-28 15:29:27 +01:00
Jordan Liggitt ae7dccf2e9
Revert "Kubelet flags take precedence over config from files/ConfigMaps"
This reverts commit cbebb61450.
2017-11-21 23:55:43 -05:00
Michael Taufen cbebb61450 Kubelet flags take precedence over config from files/ConfigMaps
Changes the Kubelet configuration flag precedence order so that flags
take precedence over config from files/ConfigMaps.

See issue #56171 for more details.

Also modifies e2e node test suite to transform all relevant Kubelet
flags into a config file before starting tests when the
KubeletConfigFile feature gate is true, and turns on the
KubeletConfigFile gate for all e2e node tests. This allows the alpha
dynamic Kubelet config feature to continue to work in tests after
the precedence change.
2017-11-21 16:02:27 -08:00
Penghao Cen 22b04c828b Append --feature-gates option iff TestContext.FeatureGates is not nil 2017-11-10 19:42:22 +08:00
Kubernetes Submit Queue eff1a84638
Merge pull request #52256 from feiskyer/credential-provider-test
Automatic merge from submit-queue (batch tested with PRs 49762, 52256). 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 node e2e tests for pulling images from credential providers

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

Add node e2e tests for pulling images from credential providers.

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

Refer https://github.com/kubernetes/kubernetes/pull/51870#issuecomment-328234010

**Special notes for your reviewer**:

/assign @yujuhong @Random-Liu 

1. We still need to add ResetDefaultDockerProviderExpiration for facilitating tests
2. Do we need a separate image for pulling private image from credential provider?
3. Any suggestion of also adding this for sandbox images? the pause image is a global config of kubelet, but we only need to set a private one for just one test case. 

**Release note**:

```release-note
NONE
```
2017-10-27 22:48:28 -07:00
Pengfei Ni 2bbba1f662 Add node e2e tests for pulling images from credential providers 2017-10-26 20:55:13 +08:00
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
Random-Liu 6d132e8e18 Add extra log and node env support.
Signed-off-by: Random-Liu <taotaotheripper@gmail.com>
2017-10-10 18:07:08 -07:00
Lee Verberne 765374ce03 Explicitly enable docker shared-pid for e2e_node
This also renames isSharedPIDNamespaceEnabled() to
isSharedPIDNamespaceSupported() to be more accurate.
2017-09-01 23:50:11 +02:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Michael Taufen 443d58e40a Dynamic Kubelet Configuration
Alpha implementation of the Dynamic Kubelet Configuration feature.
See the proposal doc in #29459.
2017-08-08 12:21:37 -07:00
Di Xu 6c7245d464 validate cadvisor rootpath 2017-07-26 10:05:29 +08:00