Commit Graph

84366 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
e129a6bc3f
Merge pull request #80004 from Miciah/prefer-to-delete-doubled-up-pods-of-a-replicaset
Prefer to delete doubled-up pods of a ReplicaSet
2019-10-17 15:09:58 -07:00
Kubernetes Prow Robot
a78a403f63
Merge pull request #83580 from jackkleeman/apiserver-cert-file-reload5
Plumbing for dynamic apiserver serving certificates
2019-10-17 13:37:59 -07:00
Kubernetes Prow Robot
006378fcc1 Merge pull request #83195 from wojtek-t/watch_bookmarks_ga
Promote WatchBookmarks feature to GA
2019-10-17 11:30:38 -07:00
Sean Sullivan
37fca51d74 Relocate tableprinter tests (#84027)
* Moves TestPrintUnstructuredObject to tableprinter_test.go

* Move TestUnknownTypePrinting to correct location of tableprinter_test.go

* Removes NewTablePrinter from TestCustomTypePrinting
2019-10-17 09:52:53 -07:00
Kubernetes Prow Robot
397f8b4248
Merge pull request #84020 from BenTheElder/bentheelder-checks-types
add myself to typecheck / go-srcimporter owners, move rmmh to emeritus
2019-10-17 09:52:38 -07:00
Miciah Masters
980b6406b2 Prefer to delete doubled-up pods of a ReplicaSet
When scaling down a ReplicaSet, delete doubled up replicas first, where a
"doubled up replica" is defined as one that is on the same node as an
active replica belonging to a related ReplicaSet.  ReplicaSets are
considered "related" if they have a common controller (typically a
Deployment).

The intention of this change is to make a rolling update of a Deployment
scale down the old ReplicaSet as it scales up the new ReplicaSet by
deleting pods from the old ReplicaSet that are colocated with ready pods of
the new ReplicaSet.  This change in the behavior of rolling updates can be
combined with pod affinity rules to preserve the locality of a Deployment's
pods over rollout.

A specific scenario that benefits from this change is when a Deployment's
pods are exposed by a Service that has type "LoadBalancer" and external
traffic policy "Local".  In this scenario, the load balancer uses health
checks to determine whether it should forward traffic for the Service to a
particular node.  If the node has no local endpoints for the Service, the
health check will fail for that node.  Eventually, the load balancer will
stop forwarding traffic to that node.  In the meantime, the service proxy
drops traffic for that Service.  Thus, in order to reduce risk of dropping
traffic during a rolling update, it is desirable preserve node locality of
endpoints.

* pkg/controller/controller_utils.go (ActivePodsWithRanks): New type to
sort pods using a given ranking.
* pkg/controller/controller_utils_test.go (TestSortingActivePodsWithRanks):
New test for ActivePodsWithRanks.
* pkg/controller/replicaset/replica_set.go
(getReplicaSetsWithSameController): New method.  Given a ReplicaSet, return
all ReplicaSets that have the same owner.
(manageReplicas): Call getIndirectlyRelatedPods, and pass its result to
getPodsToDelete.
(getIndirectlyRelatedPods): New method.  Given a ReplicaSet, return all
pods that are owned by any ReplicaSet with the same owner.
(getPodsToDelete): Add an argument for related pods.  Use related pods and
the new getPodsRankedByRelatedPodsOnSameNode function to take into account
whether a pod is doubled up when sorting pods for deletion.
(getPodsRankedByRelatedPodsOnSameNode): New function.  Return an
ActivePodsWithRanks value that wraps the given slice of pods and computes
ranks where each pod's rank is equal to the number of active related pods
that are colocated on the same node.
* pkg/controller/replicaset/replica_set_test.go (newReplicaSet): Set
OwnerReferences on the ReplicaSet.
(newPod): Set a unique UID on the pod.
(byName): New type to sort pods by name.
(TestGetReplicaSetsWithSameController): New test for
getReplicaSetsWithSameController.
(TestRelatedPodsLookup): New test for getIndirectlyRelatedPods.
(TestGetPodsToDelete): Augment the "various pod phases and conditions, diff
= len(pods)" test case to ensure that scale-down still selects doubled-up
pods if there are not enough other pods to scale down.  Add a "various pod
phases and conditions, diff = len(pods), relatedPods empty" test case to
verify that getPodsToDelete works even if related pods could not be
determined.  Add a "ready and colocated with another ready pod vs not
colocated, diff < len(pods)" test case to verify that a doubled-up pod gets
preferred for deletion.  Augment the "various pod phases and conditions,
diff < len(pods)" test case to ensure that not-ready pods are preferred
over ready but doubled-up pods.
* pkg/controller/replicaset/BUILD: Regenerate.
* test/e2e/apps/deployment.go
(testRollingUpdateDeploymentWithLocalTrafficLoadBalancer): New end-to-end
test.  Create a deployment with a rolling update strategy and affinity
rules and a load balancer with "Local" external traffic policy, and verify
that set of nodes with local endponts for the service remains unchanged
during rollouts.
(setAffinity): New helper, used by
testRollingUpdateDeploymentWithLocalTrafficLoadBalancer.
* test/e2e/framework/service/jig.go (GetEndpointNodes): Factor building the
set of node names out...
(GetEndpointNodeNames): ...into this new method.
2019-10-17 11:52:32 -04:00
Miciah Masters
865c3c5670 TestGetPodsToDelete: Use field names in test cases
* pkg/controller/replicaset/replica_set_test.go (TestGetPodsToDelete): Use
explicit field names in declarations of test cases.
2019-10-17 11:50:09 -04:00
Kubernetes Prow Robot
fef819254a
Merge pull request #83998 from draveness/feature/node-affinity-score-plugin
feat(scheduler): implement node affinity as score plugin
2019-10-17 08:24:38 -07:00
Jack Kleeman
6f89f10274 Plumb dynamic serving certificates
We create and use a dynamic certificate provider for the main apiserver
serving certificates: SNI will be handled separately later. Currently we
only use static serving certificate providers, so the files are not
reloaded, but we should be able to move to a provider that is able to
reload later on.
2019-10-17 14:37:16 +01:00
Kubernetes Prow Robot
534051acec
Merge pull request #84036 from Huang-Wei/tbe-int-test-issue
Ensure TaintBasedEviction int test not rely on TaintNodeByConditions
2019-10-17 05:12:50 -07:00
Kubernetes Prow Robot
4887b0cac2
Merge pull request #84008 from notpad/fix_83985
Change node name to env value of HOSTNAME_OVERRIDE
2019-10-17 05:12:37 -07:00
Kubernetes Prow Robot
4b58ef0e14
Merge pull request #83950 from yastij/update-reset-cni
stop removing cni directories as they aren't installed by kubeadm
2019-10-17 03:19:02 -07:00
Kubernetes Prow Robot
fa99d4068b
Merge pull request #83466 from wongma7/block-reconstruct
Fix AWS block volume reconstruction to be like file
2019-10-17 03:18:51 -07:00
Kubernetes Prow Robot
2eef011c38
Merge pull request #81345 from k-toyoda-pi/fix_shellcheck_validate-cluster
Fix shellcheck failures in cluster/validate-cluster.sh
2019-10-17 03:18:38 -07:00
draveness
3d74da4d53 feat(scheduler): implement node affinity as score plugin 2019-10-17 17:02:10 +08:00
Kubernetes Prow Robot
cedacc9cae
Merge pull request #84025 from oomichi/move-CreateNginxPod
Move CreateNginxPod() to specific e2e
2019-10-17 01:47:48 -07:00
Kubernetes Prow Robot
1dc5235d0a
Merge pull request #84012 from neolit123/revert-83339-1.17-master-cert-rotation
Revert "kubeadm: enable kubelet certificate rotation on primary CP nodes"
2019-10-17 01:47:39 -07:00
Kubernetes Prow Robot
bdc3f96838
Merge pull request #83989 from wojtek-t/remove_coordination_v1beta1
Swtich nodelifecyclecontroller to coordination/v1
2019-10-17 01:47:29 -07:00
Kubernetes Prow Robot
59235ee723
Merge pull request #83976 from caseydavenport/update-calico-v3.8.3
Update Calico to v3.8.3
2019-10-17 01:47:18 -07:00
Kubernetes Prow Robot
7d243bc2a6
Merge pull request #83555 from deads2k/dynamic-cert-kube-apiserver-wiring
Dynamic cert kube apiserver wiring
2019-10-17 01:47:07 -07:00
Kubernetes Prow Robot
93586808aa
Merge pull request #83238 from shturec/fixauditretry
Sending non-blocking audit events to a webhook is retried on any error
2019-10-17 01:46:52 -07:00
Kubernetes Prow Robot
3719fcdffa
Merge pull request #82072 from draveness/feature/use-context-instead-of-channel
feat(scheduler): use context in scheduler package
2019-10-17 01:46:39 -07:00
Wei Huang
fbcc3c183a
Ensure TaintBasedEviction int test not rely on TaintNodeByConditions 2019-10-17 01:25:12 -07:00
Kubernetes Prow Robot
6a5f0e6eda
Merge pull request #81348 from yastij/code-org-service-controller
move service helpers to k8s.io/cloud-provider
2019-10-17 00:20:38 -07:00
Kubernetes Prow Robot
bc25814fb9
Merge pull request #84028 from ahg-g/ahg-hasfilter
make sure filters are executed when no predicates configured
2019-10-16 22:25:52 -07:00
Kubernetes Prow Robot
c3d8ad06a5
Merge pull request #84002 from cofyc/fix74552-cleanup
e2e: remove duplicated test specs
2019-10-16 22:25:41 -07:00
Hongwei Yu
7574f95f7d optimize comments on exported constants (#83875)
* optimize comments on exported constants

* remove package in hack/.golint_failures are passing golint
2019-10-16 22:25:30 -07:00
Kubernetes Prow Robot
9aed79b585
Merge pull request #83812 from oomichi/move-Initialized
Move Initialized() to e2e framework util
2019-10-16 22:25:21 -07:00
Kubernetes Prow Robot
ad0274fb6e
Merge pull request #82455 from AdheipSingh/patch-1
Update comment for syncHandler
2019-10-16 22:25:06 -07:00
Kubernetes Prow Robot
cae9bbd059
Merge pull request #81358 from bclau/tests/replace-redis-image
tests: Replaces Redis image with Agnhost
2019-10-16 22:24:51 -07:00
Kubernetes Prow Robot
c63ec82490
Merge pull request #75190 from deads2k/kubelet-timeout
set backup value to ensure connections against kubelets eventually close
2019-10-16 22:24:38 -07:00
Kubernetes Prow Robot
b4d3dc3718
Merge pull request #83932 from SataQiu/report-ca-expiration
kubeadm: enhance certs check-expiration to show the expiration info of related CAs
2019-10-16 20:54:51 -07:00
Kubernetes Prow Robot
eb2deb66e5
Merge pull request #78541 from deads2k/timeout
choose a more unique request timeout default
2019-10-16 20:54:38 -07:00
Abdullah Gharaibeh
17a6a7914c make sure filters are executed when no predicates configured 2019-10-16 21:27:57 -04:00
draveness
47a6c5b693 feat(scheduler): use context in the scheduler package
+ Use context instead of stopCh
+ Add context to the scheduling framework interface
2019-10-17 09:03:55 +08:00
Kubernetes Prow Robot
f7091992c0
Merge pull request #83577 from liu-cong/queue-metrics
Add incoming pod metrics to scheduler queue.
2019-10-16 17:34:39 -07:00
Kenichi Omichi
9e17a0e9f3 Move CreateNginxPod() to specific e2e
CreateNginxPod() is called from flexvolume_online_resize only and
that seems storage specific function because that requires a PVC.
So this moves the function to the place which calls it for the code
cleanup.
2019-10-17 00:10:38 +00:00
Benjamin Elder
0f807d5048 add myself to typecheck / go-srcimporter owners, move rmmh to emeritus 2019-10-16 15:17:22 -07:00
Matthew Wong
82786ff720 Fix AWS block volume reconstruction to be like file 2019-10-16 14:27:57 -07:00
Kubernetes Prow Robot
cb19b56831
Merge pull request #83419 from deads2k/insecure-backend-proxy
Insecure backend proxy
2019-10-16 13:58:38 -07:00
Kubernetes Prow Robot
01a6c27ee4
Merge pull request #83979 from tpepper/master
Amend CHANGELOG-1.16.md for v1.16.2
2019-10-16 11:38:26 -07:00
Kubernetes Prow Robot
f82e7a0d72
Merge pull request #83974 from dhuh/updatedcosversion
Updated COS version to M77 and includes fixes to ensure scalability tests pass
2019-10-16 11:38:16 -07:00
Kubernetes Prow Robot
5f43502060
Merge pull request #83970 from jpbetz/bbolt-v1.3.3
Bump bbolt to v1.3.3
2019-10-16 11:38:05 -07:00
Kubernetes Prow Robot
44674bf5d3
Merge pull request #83969 from yutedz/rm-update-storage
Remove update-storage-objects.sh
2019-10-16 11:37:55 -07:00
Kubernetes Prow Robot
554412c62c
Merge pull request #83956 from liggitt/intstr-type
Fix proto.Merge of IntOrString type
2019-10-16 11:37:44 -07:00
Kubernetes Prow Robot
0e2383df15
Merge pull request #83893 from draveness/feature/node-prefer-avoid-pods
feat(scheduler): implement NodePreferAvoidPods as score plugin
2019-10-16 11:37:30 -07:00
Cong Liu
fc226e0670 Add incoming pod metrics to scheduler queue. 2019-10-16 14:26:16 -04:00
Lubomir I. Ivanov
30db92004a
Revert "kubeadm: enable kubelet certificate rotation on primary CP nodes" 2019-10-16 20:45:55 +03:00
David Eads
abddbd87cd wire dynamic tlsconfig up to apiserver 2019-10-16 13:43:33 -04:00
David Eads
ff689ce3de set backup value to ensure connections against kubelets eventually close 2019-10-16 13:39:14 -04:00