k3s/test/e2e_node
Michael Taufen 1085b6f730 Lift embedded structure out of eviction-related KubeletConfiguration fields
- Changes the following KubeletConfiguration fields from `string` to
`map[string]string`:
  - `EvictionHard`
  - `EvictionSoft`
  - `EvictionSoftGracePeriod`
  - `EvictionMinimumReclaim`
- Adds flag parsing shims to maintain Kubelet's public flags API, while
enabling structured input in the file API.
- Also removes `kubeletconfig.ConfigurationMap`, which was an ad-hoc flag
parsing shim living in the kubeletconfig API group, and replaces it
with the `MapStringString` shim introduced in this PR. Flag parsing
shims belong in a common place, not in the kubeletconfig API.
I manually audited these to ensure that this wouldn't cause errors
parsing the command line for syntax that would have previously been
error free (`kubeletconfig.ConfigurationMap` was unique in that it
allowed keys to be provided on the CLI without values. I believe this was
done in `flags.ConfigurationMap` to facilitate the `--node-labels` flag,
which rightfully accepts value-free keys, and that this shim was then
just copied to `kubeletconfig`). Fortunately, the affected fields
(`ExperimentalQOSReserved`, `SystemReserved`, and `KubeReserved`) expect
non-empty strings in the values of the map, and as a result passing the
empty string is already an error. Thus requiring keys shouldn't break
anyone's scripts.
- Updates code and tests accordingly.

Regarding eviction operators, directionality is already implicit in the
signal type (for a given signal, the decision to evict will be made when
crossing the threshold from either above or below, never both). There is
no need to expose an operator, such as `<`, in the API. By changing
`EvictionHard` and `EvictionSoft` to `map[string]string`, this PR
simplifies the experience of working with these fields via the
`KubeletConfiguration` type. Again, flags stay the same.

Other things:
- There is another flag parsing shim, `flags.ConfigurationMap`, from the
shared flag utility. The `NodeLabels` field still uses
`flags.ConfigurationMap`. This PR moves the allocation of the
`map[string]string` for the `NodeLabels` field from
`AddKubeletConfigFlags` to the defaulter for the external
`KubeletConfiguration` type. Flags are layered on top of an internal
object that has undergone conversion from a defaulted external object,
which means that previously the mere registration of flags would have
overwritten any previously-defined defaults for `NodeLabels` (fortunately
there were none).
2017-11-16 18:35:13 -08:00
..
builder cluster: build gci mounter like other go binaries 2017-10-30 13:56:09 -07:00
conformance use more-specific arm64v8 instead of deprecated aarch64 organization 2017-08-21 10:18:19 +08:00
environment update BUILD files 2017-10-15 18:18:13 -07:00
jenkins Add a cloud-init script to disable live-restore 2017-11-14 21:40:13 -08:00
perftype update BUILD files 2017-10-15 18:18:13 -07:00
remote Merge pull request #47497 from mikedanese/binary 2017-11-08 22:11:53 -08:00
runner update BUILD files 2017-10-15 18:18:13 -07:00
services Merge pull request #52256 from feiskyer/credential-provider-test 2017-10-27 22:48:28 -07:00
system Add Windows support to the system verification check 2017-10-25 18:55:47 -04:00
BUILD Update generated files 2017-11-09 12:14:08 +01:00
OWNERS Add yujuhong to test/e2e_node/OWNERS 2017-07-20 09:48:54 -07:00
README.md Update docs/ URLs to point to proper locations 2017-06-05 22:13:54 -07:00
apparmor_test.go Port e2e tests for multi architecture 2017-09-01 05:40:52 +05:30
benchmark_util.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
container.go run hack/update-all 2017-06-22 11:31:03 -07:00
container_manager_test.go Port e2e tests for multi architecture 2017-09-01 05:40:52 +05:30
cpu_manager_test.go Make feature gates loadable from a map[string]bool 2017-10-10 09:37:51 -07:00
critical_pod_test.go pkg/apis/core: mechanical import fixes in dependencies 2017-11-09 12:14:08 +01:00
density_test.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
docker_test.go Use whitelisted test image 2017-11-10 14:16:27 -08:00
docker_util.go improve code 2017-09-28 08:47:22 +08:00
dockershim_checkpoint_test.go add dockershim checkpoint node e2e test 2017-06-29 13:26:09 -07:00
dynamic_kubelet_config_test.go Improve dynamic kubelet config e2e node test and fix bugs 2017-09-07 15:50:17 -07:00
e2e_node_suite_test.go Fix code implicitly casting clientsets to getters 2017-08-06 15:30:13 +02:00
eviction_test.go Lift embedded structure out of eviction-related KubeletConfiguration fields 2017-11-16 18:35:13 -08:00
garbage_collector_test.go Remove docker dep in kubelet startup 2017-11-01 10:03:01 +08:00
gke_environment_test.go Add node e2e test for Docker's live-restore 2017-08-17 16:58:21 -07:00
gpu_device_plugin.go Make feature gates loadable from a map[string]bool 2017-10-10 09:37:51 -07:00
gpus.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
gubernator.sh Logs node e2e perf data to standalone json files 2017-06-12 14:27:56 -07:00
image_id_test.go run hack/update-all 2017-06-22 11:31:03 -07:00
image_list.go Merge pull request #53051 from tanshanshan/test925 2017-10-24 21:38:17 -07:00
kubelet_test.go Port e2e tests for multi architecture 2017-09-01 05:40:52 +05:30
lifecycle_hook_test.go Port e2e tests for multi architecture 2017-09-01 05:40:52 +05:30
log_path_test.go Port e2e tests for multi architecture 2017-09-01 05:40:52 +05:30
memory_eviction_test.go Lift embedded structure out of eviction-related KubeletConfiguration fields 2017-11-16 18:35:13 -08:00
mirror_pod_test.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
node_container_manager_test.go Lift embedded structure out of eviction-related KubeletConfiguration fields 2017-11-16 18:35:13 -08:00
node_problem_detector_linux.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
pods_container_manager_test.go e2e-node:the value of bestEffortCgroup is wrong 2017-10-27 17:10:53 +08:00
resource_collector.go improve code 2017-09-28 08:47:22 +08:00
resource_usage_test.go Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
restart_test.go run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
runtime_conformance_test.go Merge pull request #52256 from feiskyer/credential-provider-test 2017-10-27 22:48:28 -07:00
security_context_test.go use multi-arch busybox for e2e 2017-10-19 10:36:31 +08:00
simple_mount.go run hack/update-all 2017-06-22 11:31:03 -07:00
summary_test.go Expose accelerator metrics in the summary API. 2017-11-10 14:59:43 -08:00
util.go use core client with explicit version globally 2017-10-27 15:48:32 +08:00
volume_manager_test.go Port e2e tests for multi architecture 2017-09-01 05:40:52 +05:30

README.md