Commit Graph

95090 Commits

Author SHA1 Message Date
Tim Hockin
4f8fb1d3ca Wipe some fields on service "type" updates
Service has had a problem since forever:

- User creates a service type=LoadBalancer
- We silently allocate them a NodePort
- User changes type to ClusterIP
- We fail the operation because they did not clear NodePort

They never asked for or used the NodePort!

Dual-stack introduced some dependent fields that get auto-wiped on
updates.  This carries it further.

If you squint, you can see Service as a big, messy discriminated union,
with type as the discriminator. Ignoring fields for non-selected
union-modes seems right.

This introduces the potential for an apply loop. Specifically, we will
accept YAML that we did not previously accept. Apply could see the
field in local YAML and not in the server and repeatedly try to patch it
in. But since that YAML is currently an error, it seems like a very low
risk. Almost nobody actually specifies their own NodePort values.

To mitigate this somewhat, we only auto-wipe on updates. The same YAML
would fail to create. This is a little inconsistent. We could
auto-wipe on create, too, at the risk of more potential impact.

To do this properly, we need to know the old and new values, which means
we can not do it in defaulting or conversion. So we do it in strategy.

This change also adds unit tests and updates e2e tests to rely on and
verify this behavior.
2020-10-28 10:41:26 -07:00
Tim Hockin
c5f3e560e4 Make some methods into non-methods 2020-10-28 10:41:26 -07:00
Kubernetes Prow Robot
17312ea4a9
Merge pull request #95810 from ruiwen-zhao/staticcheck_fix
Fix staticcheck failures on apiserver/plugin/pkg/{authenticator, auth…
2020-10-28 07:45:55 -07:00
Kubernetes Prow Robot
53d63fb748
Merge pull request #95943 from aojea/upgradejob
fix unbound variable on upgrade
2020-10-28 06:39:56 -07:00
Kubernetes Prow Robot
1a645c2135
Merge pull request #95743 from benhxy/apiserver-health
Use host IP instead of 127.0.0.1 for kube-apiserver healthcheck.
2020-10-28 04:03:56 -07:00
Kubernetes Prow Robot
63eacc22c1
Merge pull request #95912 from khs1994/patch-1
fixed addons fluentd-elasticsearch statefulset format error
2020-10-28 01:05:55 -07:00
Antonio Ojea
7c3bd972e9 fix unbound variable on upgrade 2020-10-28 09:05:29 +01:00
Kubernetes Prow Robot
a9e9cabbea
Merge pull request #94676 from JornShen/fix_Test_Run_Positive_VolumeMountControllerAttachEnabledRace_data_trace
Fix flaky unit test Test_Run_Positive_VolumeMountControllerAttachEnabledRace data race
2020-10-27 23:31:56 -07:00
Kubernetes Prow Robot
34ae23110a
Merge pull request #95337 from cmluciano/cml/kproxylabeltest
proxy: label kube_proxy test with more unique label
2020-10-27 20:44:10 -07:00
Kubernetes Prow Robot
90b3168987
Merge pull request #95040 from MHBauer/unflake-perf-tests
move node performance tests to separate job
2020-10-27 20:43:56 -07:00
Kubernetes Prow Robot
8456a514f1
Merge pull request #95736 from Jefftree/reuse-parser
Reuse SSA type converter for resources in the same API Group
2020-10-27 17:28:10 -07:00
Kubernetes Prow Robot
c5ecae737d
Merge pull request #95117 from andrewsykim/fake-dynamic-list
fake dynamic client: document that List does not preserve TypeMeta in UnstructuredList
2020-10-27 17:27:55 -07:00
Kubernetes Prow Robot
451e4030c1
Merge pull request #95924 from khenidak/tombstone-ipfamily
tombstone-ing IPFamily field(15)
2020-10-27 16:36:19 -07:00
Kubernetes Prow Robot
e5c4e74994
Merge pull request #95884 from ii/promote-e2e-verify-PriorityClass-endpoints
Promote: verify PriorityClass endpoints e2e test to Conformance +5 Endpoints
2020-10-27 16:36:09 -07:00
Kubernetes Prow Robot
7af88f3d98
Merge pull request #95780 from jingxu97/oct/resizetest
Enable Volume Expansion tests for Windows
2020-10-27 16:35:56 -07:00
Kubernetes Prow Robot
f00ec1b449
Merge pull request #95679 from EdDev/test-e2e-remove-w8-4-pod-running-after-createsync
test, e2e: Remove duplication when using PodClient.CreateSync
2020-10-27 15:32:11 -07:00
Kubernetes Prow Robot
2c58deffa8
Merge pull request #95635 from RaunakShah/pvc_describe
Alter wording to describe pods using a pvc
2020-10-27 15:31:57 -07:00
Kubernetes Prow Robot
2754cc23e2
Merge pull request #95801 from jingxu97/oct/owner
Add jingxu97 to volume/util owners
2020-10-27 14:26:11 -07:00
Kubernetes Prow Robot
8422116039
Merge pull request #95630 from masap/unit_test1
test: Add service cluster IP range unit test
2020-10-27 14:25:57 -07:00
Kubernetes Prow Robot
56069e4f9d
Merge pull request #95874 from tkashem/webhook-handle-error
Webhook: handle error when calling wait.ExponentialBackoff
2020-10-27 11:41:34 -07:00
Kubernetes Prow Robot
93fcb22e64
Merge pull request #95687 from tangwz/make_profile_an_interface
scheduler: make Profile an interface.
2020-10-27 11:41:26 -07:00
Khaled (Kal) Henidak
ae2210324c tombstone-ing IPFamily field(15) 2020-10-27 17:55:03 +00:00
Andrew Sy Kim
deb1bb8bff fake dynamic client: document that List does not preserve TypeMeta in UnstructuredList
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-10-27 13:42:16 -04:00
Kubernetes Prow Robot
3523555aab
Merge pull request #95771 from vinayakankugoyal/fluentbit
Grant group KUBE_POD_LOG_READERS_GROUP access to read pod logs on gke…
2020-10-27 10:36:48 -07:00
Kubernetes Prow Robot
94cedd9f14
Merge pull request #95720 from draveness/feature/topology-manager-format
style: update comments in topology manager
2020-10-27 10:36:38 -07:00
Kubernetes Prow Robot
1cb1005437
Merge pull request #95662 from SergeyKanzhelev/nilInterfaceInShouldRecordEvent
The function shouldRecordEvent will panic when the value of input obj…
2020-10-27 10:36:28 -07:00
Kubernetes Prow Robot
554319cce8
Merge pull request #95410 from benhxy/staticcheck
Fix static check for pkg/controller/podautoscaler
2020-10-27 10:36:14 -07:00
Kubernetes Prow Robot
82b38ce9db
Merge pull request #94953 from mattjmcnaughton/mattjmcnaughton/remove-mattjmcnaughton-as-sig-node-reviewer
Remove mattjmcnaughton as a sig-node reviewer
2020-10-27 10:36:01 -07:00
Ben Hu
8416c5cc51 Use host IP instead of 127.0.0.1 for kube-apiserver healthcheck. 2020-10-27 16:25:27 +00:00
Abu Kashem
f8e35de156
Webhook: handle error when calling wait.ExponentialBackoff
- Inside WithExponentialBackoff function, handle error returned
by wait.ExponentialBackoff.
- Ensure that the wait time is bound to the given context.
2020-10-27 12:04:28 -04:00
Kubernetes Prow Robot
6352f01e66
Merge pull request #95918 from wojtek-t/fix_cacher_test_again
Fix cacher test after bumping fakeBudget timeout to 2 seconds
2020-10-27 08:17:59 -07:00
wojtekt
f62e61c28f Fix cacher test after bumping fakeBudget timeout to 2 seconds 2020-10-27 15:25:31 +01:00
Kang Huaishuai
ba41d45870
fixed addons fluentd-elasticsearch statefulset format error
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-10-27 20:06:15 +08:00
Kubernetes Prow Robot
b4258ec138
Merge pull request #95869 from wojtek-t/debug_watchcache_test
Fix cacher test flakiness
2020-10-27 04:33:59 -07:00
Kubernetes Prow Robot
4df8d97af0
Merge pull request #95725 from p0lyn0mial/delegated-authz-sar-timeout
sets explicit timeout for SubjectAccessReview client
2020-10-27 03:37:59 -07:00
Kubernetes Prow Robot
1f0371bb3f
Merge pull request #95864 from nilo19/cleanup/fix-typos
Fix a lot of typos in Azure codes
2020-10-27 02:13:59 -07:00
Kubernetes Prow Robot
47943d5f9c
Merge pull request #94109 from derekwaynecarr/cleanup-kubelet-todos
Cleanup kubelet TODOs that are no longer pertinent.
2020-10-26 23:49:59 -07:00
Kubernetes Prow Robot
68f6b09e80
Merge pull request #80954 from zachomedia/fix-lock-release
Fix leader election lock release when using LeaseLocks
2020-10-26 20:57:58 -07:00
Jing Xu
eeb649d31e Enable Volume Expansion tests for Windows
enable volume expansion test for Windows with ntfs file system

Change-Id: I6b8027c5e149588f66b8896a78ec5cd0e47984fe
2020-10-26 18:28:43 -07:00
tangwz
5f3efa671d scheduler: make Profile an interface. 2020-10-27 09:13:04 +08:00
Kubernetes Prow Robot
87cc9bca0f
Merge pull request #95867 from jsafrane/e2e-podexec-stderr
Log PodExec stdout + stderr
2020-10-26 17:55:59 -07:00
Stephen Heywood
017de540eb Promote verify PriorityClass endpoints e2e test to Conformance 2020-10-27 12:36:28 +13:00
Kubernetes Prow Robot
227aa51b94
Merge pull request #95868 from xing-yang/update_test_owners
Update test/e2e/storage owners file
2020-10-26 16:24:12 -07:00
Kubernetes Prow Robot
6c5cda5a40
Merge pull request #95473 from troy0820/fix/validate-verb
Validate verb in auth can-i command
2020-10-26 16:23:59 -07:00
Kubernetes Prow Robot
3d6026499b
Merge pull request #95235 from andrewsykim/controlplane-egress-selector
apiserver: support 'controlplane' as an egress selector type
2020-10-26 14:45:59 -07:00
Khaled Henidak (Kal)
6675eba3ef
dual stack services (#91824)
* api: structure change

* api: defaulting, conversion, and validation

* [FIX] validation: auto remove second ip/family when service changes to SingleStack

* [FIX] api: defaulting, conversion, and validation

* api-server: clusterIPs alloc, printers, storage and strategy

* [FIX] clusterIPs default on read

* alloc: auto remove second ip/family when service changes to SingleStack

* api-server: repair loop handling for clusterIPs

* api-server: force kubernetes default service into single stack

* api-server: tie dualstack feature flag with endpoint feature flag

* controller-manager: feature flag, endpoint, and endpointSlice controllers handling multi family service

* [FIX] controller-manager: feature flag, endpoint, and endpointSlicecontrollers handling multi family service

* kube-proxy: feature-flag, utils, proxier, and meta proxier

* [FIX] kubeproxy: call both proxier at the same time

* kubenet: remove forced pod IP sorting

* kubectl: modify describe to include ClusterIPs, IPFamilies, and IPFamilyPolicy

* e2e: fix tests that depends on IPFamily field AND add dual stack tests

* e2e: fix expected error message for ClusterIP immutability

* add integration tests for dualstack

the third phase of dual stack is a very complex change in the API,
basically it introduces Dual Stack services. Main changes are:

- It pluralizes the Service IPFamily field to IPFamilies,
and removes the singular field.
- It introduces a new field IPFamilyPolicyType that can take
3 values to express the "dual-stack(mad)ness" of the cluster:
SingleStack, PreferDualStack and RequireDualStack
- It pluralizes ClusterIP to ClusterIPs.

The goal is to add coverage to the services API operations,
taking into account the 6 different modes a cluster can have:

- single stack: IP4 or IPv6 (as of today)
- dual stack: IPv4 only, IPv6 only, IPv4 - IPv6, IPv6 - IPv4

* [FIX] add integration tests for dualstack

* generated data

* generated files

Co-authored-by: Antonio Ojea <aojea@redhat.com>
2020-10-26 13:15:59 -07:00
wojtekt
6eb71c4089 Fix cacher test flakiness 2020-10-26 20:09:13 +01:00
Kubernetes Prow Robot
d0e06cf3e0
Merge pull request #95843 from varunmar/update-ip-masq-agent
Bump ip-masq-agent version to pick up CVE fixes
2020-10-26 11:23:16 -07:00
Kubernetes Prow Robot
5ed903dbfd
Merge pull request #95809 from alculquicondor/rebench-spread
Optimize NormalizeScore for PodTopologySpread
2020-10-26 11:23:02 -07:00
Jefftree
1f986cc69d Make versionconverter functions private 2020-10-26 11:03:17 -07:00