Commit Graph

4799 Commits

Author SHA1 Message Date
Andrew Sy Kim
897b8d7476 improve error handling in cloud node controller
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-10-28 20:23:12 -04:00
Michelle Au
fb6dfeb718 Convert attach-detach controller to use v1.CSINode 2019-10-28 13:41:13 -07:00
wojtekt
ce499ac286 Migrate components to EndpointsLeases leader election lock 2019-10-28 09:09:03 +01:00
Kubernetes Prow Robot
d379ab2697
Merge pull request #84288 from wojtek-t/cleanup_conversions_registrations
Cleanup conversions registrations
2019-10-25 22:53:22 -07:00
draveness
dc437a7890 feat: remove suspendedDaemonPods from daemon controller 2019-10-25 09:16:48 +08:00
wojtekt
7b6bcdf780 Autogenerated code 2019-10-24 20:21:00 +02:00
Kubernetes Prow Robot
2c4cba8aa0
Merge pull request #82365 from jkaniuk/pod-gc
Pod GC controller - use node lister
2019-10-24 03:13:06 -07:00
Rob Scott
724b142f07
Adding initial EndpointSlice metrics. 2019-10-23 17:33:17 -07:00
Kubernetes Prow Robot
ed5a3847a2
Merge pull request #83856 from mrbobbytables/update-autoscaling-owners
Prune inactive owners from autoscaling related OWNERS files.
2019-10-23 15:53:34 -07:00
Kubernetes Prow Robot
4f63f61c36
Merge pull request #84193 from ahg-g/ahg-list
Separate scheduler listers into their own package
2019-10-23 12:51:30 -07:00
Kubernetes Prow Robot
7dc298af42
Merge pull request #82795 from draveness/feature/remove-schedule-daemonset-pods
feat(scheduler): graduate ScheduleDaemonSetPods to GA
2019-10-23 12:49:12 -07:00
Kubernetes Prow Robot
65fa4c979a
Merge pull request #82152 from misterikkit/disruption
Fix retry logic in DisruptionController
2019-10-23 12:48:58 -07:00
Jacek Kaniuk
39883f08bf Pod GC controller - use node lister 2019-10-23 16:54:54 +02:00
draveness
35d772e354 feat: graduate ScheduleDaemonSetPods to GA 2019-10-23 21:34:47 +08:00
Kubernetes Prow Robot
75cd65ae0e
Merge pull request #82145 from shivi28/fix-controller-nodeipam-ipam-cidrset
nodeipam-controller:fix static check failures
2019-10-22 23:18:26 -07:00
Cristian Dima
da759609dc in pkg/controller/service rename service_controller.go to controller.go 2019-10-23 01:52:19 +03:00
Cristian Dima
a18de39166 fix golint errors in pkg/controller/service 2019-10-23 01:52:19 +03:00
Abdullah Gharaibeh
d393804237 separate listers into their own package 2019-10-22 18:11:02 -04:00
Kubernetes Prow Robot
3c0fa84f92
Merge pull request #84075 from yutedz/replica-set-rolling
Extract PodPhase map outside Less func
2019-10-22 10:28:36 -07:00
Kubernetes Prow Robot
4984c6f000
Merge pull request #84049 from jsafrane/block-feature-gate-checks
Add block feature gate checks to PV controller
2019-10-21 21:12:09 -07:00
Ted Yu
7a4b98b896 Extract PodPhase map outside Less func 2019-10-21 14:32:20 -07:00
Clayton Coleman
bd9260711f
deployment: Ignore namespace termination errors when creating replicasets
Instead of reporting an event or displaying an error, simply exit
when the namespace is being terminated. This reduces the amount of
controller churn on namespace shutdown. Unlike other controllers, we
drop the replica set create error very late (in the queue handleErr)
in order to avoid changing the structure of the controller
substantially.
2019-10-20 18:39:01 -04:00
Clayton Coleman
c6e34e58c5
job: Ignore namespace termination errors when creating pods or jobs
Instead of reporting an event or displaying an error, simply exit
when the namespace is being terminated. This reduces the amount of
controller churn on namespace shutdown. While we could technically
exit the entire processing loop early for very large jobs,
we should wait for more evidence that is an issue before changing
that logic substantially.
2019-10-20 18:39:01 -04:00
Clayton Coleman
8f74c8970b
daemonset: Ignore namespace termination errors when creating pods
Instead of reporting an event or displaying an error, simply exit
when the namespace is being terminated. This reduces the amount of
controller churn on namespace shutdown. While we could technically
exit the entire processing loop early for very large daemon sets,
we should wait for more evidence that is an issue before changing
that logic substantially.
2019-10-20 18:39:00 -04:00
Clayton Coleman
2e8ace82eb
replicaset: Ignore namespace termination errors when creating pods
Instead of reporting an event or displaying an error, simply exit
when the namespace is being terminated. This reduces the amount of
controller churn on namespace shutdown. While we could technically
exit the entire processing loop early for very large replica sets,
we should wait for more evidence that is an issue before changing
that logic substantially.
2019-10-20 18:39:00 -04:00
Clayton Coleman
dc0c21c7d7
serviceaccount: If namespace is terminating, ignore create errors
In some scenarios the service account and token controllers can
race with namespace deletion, causing a burst of errors as they
attempt to recreate secrets being deleted.

Instead, detect these errors and do not retry.
2019-10-20 18:39:00 -04:00
Clayton Coleman
937ef77257
endpoints: If namespace is terminating, drop item immediately
Avoid sending an event to the namespace that is being terminated,
since it will be rejected.
2019-10-20 18:38:59 -04:00
walter
6991069e31 Push context up to cloud node controller.
This adds context to the cloud node controller. It continues the propogation started in 59287.  Fixes 815.
Fixed test code calls.
2019-10-20 11:20:49 -07:00
Ted Yu
0d704f1ce2 Traverse OwnerReference maps more efficiently 2019-10-19 17:56:11 -07:00
Kubernetes Prow Robot
aab740ffc2
Merge pull request #82703 from draveness/feature/graduate-taint-nodes-by-condition-to-ga
feat: update taint nodes by condition to GA
2019-10-18 20:01:37 -07:00
draveness
1163a1d51e feat: update taint nodes by condition to GA 2019-10-19 09:17:41 +08:00
Kubernetes Prow Robot
de9a7d863d
Merge pull request #83934 from wccsama/wcc-service-dev
Convert error messages to use event recorder
2019-10-18 12:37:46 -07:00
wccsama
18cf49e3df Convert error messages to use event recorder
remove mix protocol validation
remove check nil
2019-10-18 13:30:00 +08: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
Jan Safranek
a689697519 Do not bind block PV/PVCs when block feature gate is off 2019-10-17 12:40:22 +02: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
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
064458de46
Merge pull request #83951 from zouyee/pdbtomeb
add tombstones handle for pdb
2019-10-16 09:36:36 -07:00
Kubernetes Prow Robot
78abdf5375
Merge pull request #83902 from gongguan/remove_duplicate_code
remove duplicate code
2019-10-16 09:34:22 -07:00
Yassine TIJANI
d796baea27 move service helpers to k8s.io/cloud-provider
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-10-16 14:12:11 +02:00
wojtekt
cf9203501e Swtich nodelifecyclecontroller to coordination/v1 2019-10-16 10:59:02 +02:00
Kubernetes Prow Robot
112bdfb7c0
Merge pull request #83862 from mrbobbytables/update-controller-network-owners
Prune inactive owners from pkg/controller/* network related OWNERS files
2019-10-15 23:06:49 -07:00
zouyee
65ddf102ef add tombstoones handle for pdb
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-15 22:02:18 +08:00
louisgong
9b7b50c9da remove duplicate function 2019-10-15 09:41:30 +08:00
Krzysztof Siedlecki
b1dfa83be6 using pod pointers in node lifecycle controller 2019-10-14 12:44:43 +02:00
Bob Killen
e37d702208
Prune inactive owners from autoscaling related OWNERS files. 2019-10-13 08:52:14 -04:00
Bob Killen
30053bb00f
Prune inactive owners from pkg/controller/* network related OWNERS files. 2019-10-13 08:50:18 -04:00
zouyee
a864fd2100 fix unsafe JSON construction
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-10 09:44:54 +08:00
Kubernetes Prow Robot
a5dc1fffb0
Merge pull request #83543 from yutedz/attach-resync-comment
Remove stale comment about resyncPeriod
2019-10-09 13:17:50 -07:00
Kubernetes Prow Robot
4b002b3baa
Merge pull request #82123 from xiaoanyunfei/cleanup/take-effect-stateofworld-hashmap
replace iteration with hashmap in *state_of_world
2019-10-09 02:17:50 -07:00
Kubernetes Prow Robot
ac9390627e
Merge pull request #83536 from yutedz/del-volume-err
Log the error return from store.Delete
2019-10-08 19:59:50 -07:00
Kubernetes Prow Robot
72d052a444
Merge pull request #81797 from yastij/move-metrics-util
move util/metrics to component-base
2019-10-08 17:08:05 -07:00
Kubernetes Prow Robot
b00f009316
Merge pull request #82996 from tnqn/endpointslice-deletion
Fix EndpointSliceController service deletion processing
2019-10-08 15:42:27 -07:00
Kubernetes Prow Robot
b4489d1709
Merge pull request #82865 from tnqn/endpointslice
Fix wrong comments and inaccurate logs in endpointslice_controller
2019-10-08 15:42:16 -07:00
Yassine TIJANI
c1487840bc move util/metrics to component-base
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-10-08 14:42:31 +02:00
Ted Yu
f0a6aa1e9b Log error from AddIndexers in NewAttachDetachController 2019-10-07 16:15:25 -07:00
Kubernetes Prow Robot
9f875de5d2
Merge pull request #83540 from cofyc/fix83343
Fix volume scheduling error handling
2019-10-07 01:53:09 -07:00
Kubernetes Prow Robot
48b90db9c3
Merge pull request #83495 from tanjunchen/fix-typo
remove the repeat word in documents
2019-10-06 15:05:08 -07:00
tanjunchen
de3cf23414 remove the repeat word in documents 2019-10-06 23:32:01 +08:00
Ted Yu
b81242b62e Remove stale comment about resyncPeriod 2019-10-06 05:02:07 -07:00
Yecheng Fu
b5889ee82c update internal error message 2019-10-06 14:37:31 +08:00
Ted Yu
56717a79ff Log the error return from store.Delete 2019-10-05 19:34:39 -07:00
Kubernetes Prow Robot
e0f651a0be
Merge pull request #83501 from yastij/remove-node-cond-dep
remove Get/Set node condition dependency for the ccm controllers
2019-10-04 16:31:26 -07:00
Kubernetes Prow Robot
74dc287490
Merge pull request #83420 from yutedz/sched-assume-cache
Check the return value from store.Update
2019-10-04 10:22:18 -07:00
Kubernetes Prow Robot
7fab683455
Merge pull request #83343 from yutedz/bind-vol-err
Return proper error message when BindPodVolumes fails
2019-10-04 08:50:30 -07:00
Yassine TIJANI
356e3d0d61 remove Get/Set node condition dependency for the ccm controllers
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-10-04 16:52:36 +02:00
Ted Yu
94d4bf1287 Return proper error message when BindPodVolumes fails 2019-10-04 04:36:48 -07:00
shivi28
a0109f00df nodeipam-controller:fix static check failures 2019-10-04 12:40:09 +05:30
Ted Yu
c264338741 Check the return value from store.Update 2019-10-02 12:02:13 -07:00
Kubernetes Prow Robot
bd89dc462c
Merge pull request #83320 from krzysied/node_controller_delete_pods
Adding pods to DeletePods and MarkPodsReady methods parameters
2019-10-02 09:03:08 -07:00
Krzysztof Siedlecki
a07a3a6878 adding pods to MarkPodsNotReady parameters 2019-10-02 14:22:58 +02:00
Krzysztof Siedlecki
8f48896709 adding pods to DeletePods parameters 2019-10-02 13:11:23 +02:00
mengyang02
b116585b22 remove redundant quota.V1Equals 2019-10-02 01:02:09 +08:00
Kubernetes Prow Robot
c5440829d5
Merge pull request #83248 from krzysied/node_controller_test
Adding fakeGetPodsAssignedToNode to node lifecycle controller tests
2019-09-30 03:19:38 -07:00
Krzysztof Siedlecki
99eeab35a3 adding fakeGetPodsAssignedToNode 2019-09-30 11:03:36 +02:00
Kubernetes Prow Robot
14e5adfc85
Merge pull request #82683 from davidz627/fix/translationStruct
Refactor CSI Translation Library into a struct that is injected into various components to simplify unit testing
2019-09-29 10:11:37 -07:00
Kubernetes Prow Robot
74d2822662
Merge pull request #72535 from tallclair/content-type
Always set content-type & nosniff
2019-09-27 18:43:39 -07:00
David Zhu
92cb06a2e7 Refactor CSI Translation Library into a struct that is injected into various components to simplify unit testing in future 2019-09-27 12:59:53 -07:00
chenyaqi01
66be69bb0e replace bytes.Compare() with bytes.Equal() 2019-09-27 10:08:49 +08:00
Kubernetes Prow Robot
67d750bb28
Merge pull request #81916 from hwdef/fix-typo-pkg
fix typo in pkg
2019-09-26 08:35:24 -07:00
Kubernetes Prow Robot
d8a420c0d8
Merge pull request #82884 from krzysied/node_controller_cleanup3
NodeLifecycleContorller - eviction processing refactor
2019-09-26 04:03:08 -07:00
Kubernetes Prow Robot
37c3a4da97
Merge pull request #82855 from yutedz/alpha-node-role
Defer the removal of labelAlphaNodeRoleExcludeBalancer to 1.18
2019-09-25 23:59:19 -07:00
Kubernetes Prow Robot
4096a36bfd
Merge pull request #83079 from robscott/endpointslice-owners
Adding owners for EndpointSlice controller
2019-09-25 13:52:13 -07:00
Kubernetes Prow Robot
6555c34743
Merge pull request #83022 from mm4tt/controller_ref
Optimize GetControllerOf method and add a benchmark for it
2019-09-25 13:51:14 -07:00
Matt Matejczyk
01ccd2e19e Optimize GetControllerOf method
In addition create a similar method that doesn't copy objects.

Benchmark for the new no-copy method vs the old one:
```
benchmark                       old ns/op     new ns/op     delta
BenchmarkGetControllerOf-12     214           14.8          -93.08%

benchmark                       old allocs     new allocs     delta
BenchmarkGetControllerOf-12     1              0              -100.00%

benchmark                       old bytes     new bytes     delta
BenchmarkGetControllerOf-12     80            0             -100.00%
```

Benchamrk for the new (copy) method vs the old one:
```
benchmark                       old ns/op     new ns/op     delta
BenchmarkGetControllerOf-12     128           114           -10.94%

benchmark                       old allocs     new allocs     delta
BenchmarkGetControllerOf-12     1              1              +0.00%

benchmark                       old bytes     new bytes     delta
BenchmarkGetControllerOf-12     80            80            +0.00%

```

Overall there is a 10% improvement for the old vs new (copy) method and
huge improvent (x10) for the old vs new (no-copy).

I changed the IsControlledBy and a few other methods to use the new (no-copy) method.
2019-09-25 15:07:37 +02:00
Rob Scott
30d0eca19f
Adding owners for EndpointSlice controller 2019-09-24 11:45:15 -07:00
David Eads
4b44a9f067 make namespace-lifecycle controller more responsive 2019-09-23 13:22:51 -04:00
Quan Tian
db6bbf2375 Fix EndpointSliceController service deletion processing
syncService shouldn't return error if the service doesn't exist which
means it's triggered by service deletion, otherwise the service would be
enqueued repeatedly even its cleanup has been executed successfully.

This patch makes syncService return nil if the error is NotFound when
getting the service, like the other controllers do.
2019-09-22 10:01:29 -07:00
qingsenLi
d3a0c149a3 Remove some unused codes in stateful_set_utils.go 2019-09-21 22:24:48 +08:00
Kubernetes Prow Robot
658e57a157
Merge pull request #82797 from yutedz/rel-cidr-wrong-err
Correct the error variable for releasing CIDR
2019-09-20 14:13:26 -07:00
Kubernetes Prow Robot
259d6bf608
Merge pull request #82189 from deads2k/ns-resources
add conditions for remaining object totals during ns termination
2019-09-20 01:33:00 -07:00
Kubernetes Prow Robot
5f249fecb4
Merge pull request #82363 from yuxiaobo96/k8s-update3
update spelling mistakes
2019-09-20 00:08:59 -07:00
Kubernetes Prow Robot
db1f8da036
Merge pull request #82848 from yutedz/node-ctrl-hostname
Break out of loop when NodeHostName is found
2019-09-19 18:01:13 -07:00
Kubernetes Prow Robot
73505056fb
Merge pull request #82887 from yutedz/token-cleaner-type
[v1.16.1] TokenCleaner#evalSecret should enqueue the key
2019-09-19 14:21:20 -07:00
Kubernetes Prow Robot
94987143c6
Merge pull request #82882 from liggitt/cleanup-finalizer-delete
Clean up redundant post-finalizer deletions
2019-09-19 12:50:33 -07:00
Ted Yu
fd8f2bd91f Defer the removal of labelAlphaNodeRoleExcludeBalancer to 1.18 2019-09-19 12:06:55 -07:00
Kubernetes Prow Robot
d05183be41
Merge pull request #82858 from hwdef/del-unused-var
delete unused var
2019-09-19 11:05:49 -07:00
Kubernetes Prow Robot
11ce7da888
Merge pull request #82740 from hwdef/del-unuse-var1
del unuse var in pkg/controller
2019-09-19 11:05:15 -07:00
Ted Yu
1269b9e474 TokenCleaner#evalSecret should enqueue the key 2019-09-19 10:34:59 -07:00
Krzysztof Siedlecki
2f3e8463ef eviction processing refactor 2019-09-19 17:15:32 +02:00
Jordan Liggitt
000fffd3c7 Clean up redundant post-finalizer deletions 2019-09-19 10:35:58 -04:00
hwdef
4e7ef9ad36 delete unused var 2019-09-19 18:04:13 +08:00
Quan Tian
c35fd33f42 Fix wrong comments and inaccurate logs in endpointslice_controller 2019-09-19 15:02:02 +08:00
Ted Yu
68d8a5ae15 Break out of loop when NodeHostName is found 2019-09-18 16:57:39 -07:00
Shintaro Murakami
ad333ac421 Return error when failed to get storage class 2019-09-18 15:59:34 +09:00
Ted Yu
669dc0a9fd Correct the error variable for releasing CIDR 2019-09-17 09:58:08 -07:00
Kubernetes Prow Robot
2183a84feb
Merge pull request #82356 from m3ngyang/opt-podgc
optimize gc_controller.gcTerminated
2019-09-16 09:58:38 -07:00
mengyang02
b5f44d5aab optimize gc_controller.gcTerminated 2019-09-16 16:34:08 +08:00
hwdef
851eac6a97 del unuse var in pkg/controller 2019-09-16 15:05:24 +08:00
Kubernetes Prow Robot
7f084f07c3
Merge pull request #82626 from RainbowMango/pr_migrate_prom_bucket_for_volume
Migrate prometheus bucket functionality to kube-metrics for volume
2019-09-13 10:42:44 -07:00
Kubernetes Prow Robot
06609b77e8
Merge pull request #82489 from krzysied/node_controller_lock_map
Adding lock to node data map
2019-09-12 02:46:27 -07:00
Krzysztof Siedlecki
029b72b553 adding lock to node data map 2019-09-12 10:23:24 +02:00
RainbowMango
6bb1229f4b Update bazel by hack/update-bazel.sh 2019-09-12 16:05:21 +08:00
RainbowMango
d6fdac8c56 Migrate prometheus bucket functionality to kube-metrics. 2019-09-12 16:02:53 +08:00
Kubernetes Prow Robot
632e02768a
Merge pull request #82411 from josephburnett/patch-1
Fix reviewer typo.
2019-09-11 15:27:38 -07:00
Kubernetes Prow Robot
61b30b062e
Merge pull request #82329 from m3ngyang/node-ctrl-check
don't start the cloud node controller if cloudprovider.Instances is not supported
2019-09-11 15:26:08 -07:00
Kubernetes Prow Robot
1146e0c4ad
Merge pull request #82279 from deads2k/which-cert
add identification for particular certificate controllers
2019-09-11 15:25:00 -07:00
Tim Allclair
ef6cba0b36 Always set content-type & nosniff 2019-09-11 15:01:43 -07:00
Kubernetes Prow Robot
001f2cd2b5
Merge pull request #82255 from cofyc/avoid-import-cycle
volume scheduling: move metrics to a separate package to avoid import cycle
2019-09-11 10:43:20 -07:00
Tomas Nozicka
55843fc298 Add unit test for RS to correctly handle expectations on recreate 2019-09-11 16:58:29 +02:00
mengyang02
b4638519a9 init check for cloud node controller 2019-09-07 10:47:11 +08:00
David Eads
95ae353f3a squash: reaction to comments 2019-09-06 09:58:41 -04:00
David Eads
0355f4482b add conditions for remaining object totals during ns termination 2019-09-06 09:50:41 -04:00
Joseph Burnett
7bdb66f8d1
Fix reviewer typo. 2019-09-06 12:09:50 +02:00
Kubernetes Prow Robot
208cfaad25
Merge pull request #82288 from deads2k/ns-conditions
fix namespace termination conditions to be consistent and correct
2019-09-05 13:01:11 -07:00
Kubernetes Prow Robot
61ecdba9ca
Merge pull request #82289 from robscott/endpointslice-fixes
Fixing bugs related to Endpoint Slices
2019-09-05 09:03:10 -07:00
yuxiaobo
f6ce8f5789 update spelling mistakes 2019-09-05 17:59:36 +08:00
Rob Scott
8f9483d827
Fixing bugs related to Endpoint Slices
This should fix a bug that could break masters when the EndpointSlice
feature gate was enabled. This was all tied to how the apiserver creates
and manages it's own services and endpoints (or in this case endpoint
slices). Consumers of endpoint slices also need to know about the
corresponding service. Previously we were trying to set an owner
reference here for this purpose, but that came with potential downsides
and increased complexity. This commit changes behavior of the apiserver
endpointslice integration to set the service name label instead of owner
references, and simplifies consumer logic to reference that (both are
set by the EndpointSlice controller).

Additionally, this should fix a bug with the EndpointSlice GenerateName
value that had previously been set with a "." as a suffix.
2019-09-04 09:09:32 -07:00
Jonathan Basseri
c8d937c5f1 Add unit test for DisruptionController retry logic
This tests the PDB status update path in DisruptionController and
asserts that conflicting writes (with eviciton handler) are handled
gracefully.

This adds the client-go fake.Clientset into our tests, because that is
the layer required for injecting update failures.

This also adds a TestMain so that DisruptionController logs can be
enabled during test. e.g.,

    go test ./pkg/controller/disruption -v -args -v=4
2019-09-03 16:52:45 -07:00
Kubernetes Prow Robot
cedffee93e
Merge pull request #82239 from sttts/sttts-persistentvolume-controller-data-race
persistentvolume-controller: fix data race of non-deepcopied objects in fake client
2019-09-03 14:35:12 -07:00
David Eads
076bf949d7 fix namespace termination conditions to be consistent and correct 2019-09-03 15:33:17 -04:00
David Eads
e8b5781499 add identification for particular certificate controllers 2019-09-03 14:05:04 -04:00
Yecheng Fu
8a7607a308 volume scheduling: move metrics code into a separate pkg 2019-09-03 14:38:26 +08:00
Dr. Stefan Schimanski
7816ad7991 persistentvolume-controller: fix data race of non-deepcopied objects in fake client 2019-09-02 15:23:55 +02:00
Jonathan Basseri
8835f6bb00 Fix retry logic in DisruptionController
This changes the retry logic in DisruptionController so that it
reconciles update conflicts. In the old behavior, any pdb status update
failure was retried with the same status, regardless of error.

Now there is no retry logic with the status update. The error is passed
up the stack where the PDB can be requeued for processing.

If the PDB status update error is a conflict error, there are some new
special cases:
- failSafe is not triggered, since this is considered a retryable error
- the PDB is requeued immediately (ignoring the rate limiter) because we
  assume that conflict can be resolved by getting the latest version
2019-08-30 16:02:09 -07:00
Kubernetes Prow Robot
efaacf786a
Merge pull request #73405 from wozniakjan/namespace_status_conditions
Add namespace status conditions
2019-08-29 15:34:58 -07:00
Kubernetes Prow Robot
e6b6e4038c
Merge pull request #81601 from yastij/remove-keyfun
use DeletionHandlingMetaNamespaceKeyFunc from client-go in service_controller
2019-08-29 09:30:09 -07:00
Kubernetes Prow Robot
d6bc4eb853
Merge pull request #81624 from logicalhan/cm-migration
migrate controller-manager metrics to stability framework
2019-08-29 05:30:09 -07:00
Jan Wozniak
b0459feb7d Update generated files
make generated_files UPDATE_API_KNOWN_VIOLATIONS=true
./hack/update-generated-protobuf.sh
./hack/update-openapi-spec.sh
./hack/update-bazel.sh
./hack/update-generated-swagger-docs.sh
./hack/update-generated-api-compatibility-data.sh
2019-08-29 13:26:13 +02:00
sunxiaofei03
45d41ed9e5 replace iteration with hashmap in *state_of_world 2019-08-29 19:22:25 +08:00
Jan Wozniak
035e648fd7 Add tests for namespace status conditions 2019-08-29 13:21:15 +02:00
Jan Wozniak
94a5e8c3dc Add status conditions to namespaces 2019-08-29 13:21:15 +02:00
Yassine TIJANI
3fe7a57000 use directly DeletionHandlingMetaNamespaceKeyFunc from client-go
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-08-29 11:51:14 +01:00
Rob Scott
75f6c24923
Adding EndpointSlice controller 2019-08-28 21:13:27 -07:00
Kubernetes Prow Robot
550fb1bfc3
Merge pull request #79386 from khenidak/phase2-dualstack
Phase 2 dualstack
2019-08-28 20:39:56 -07:00
Kubernetes Prow Robot
af54eae69a
Merge pull request #81612 from rikatz/issue81060
Remove watching Endpoints of Headless Services
2019-08-28 14:44:25 -07:00
Han Kang
59db3ac27e migrate controller-manager metrics to stability framework 2019-08-28 12:26:57 -07:00
Kubernetes Prow Robot
92a320aeb6
Merge pull request #80238 from smarterclayton/disable_node_role
Clarify use of node-role labels within Kubernetes
2019-08-28 12:01:27 -07:00
Khaled Henidak(Kal)
c27e0b029d phase 2: generated items 2019-08-28 16:11:46 +00:00
Khaled Henidak(Kal)
313a5c5734 phase 2: ipam filter secondary service cidr 2019-08-28 15:59:43 +00:00
Khaled Henidak(Kal)
93c06821e6 Phase 2: service and endpoint processing 2019-08-28 15:59:43 +00:00
Kubernetes Prow Robot
a927ed454c
Merge pull request #81576 from logicalhan/scheduler-migration
migrate scheduler metrics to stability framework
2019-08-28 08:55:12 -07:00
Clayton Coleman
a49a554211
Move the IsMasterNode function to tests and mark it Deprecated
A future change will stop using this signal and instead use a
label selector passed on creation.
2019-08-28 11:17:27 -04:00
Clayton Coleman
2888e6e923
Node lifecycle controller should use a label for excluding nodes
The current mechanism for excluding "master" nodes based on node names
is fragile and should be fixed by using a label exclusion similar to
service load balancers. The legacy code path is preserved behind a
defaulted-on gate and will be removed in the future.
2019-08-28 10:29:08 -04:00
Clayton Coleman
0f49d892d5
Service controller should begin moving away from node-role labels
The service load balancer controller should honor the
LegacyNodeRoleBehavior feature gate for checks that use node-roles,
switch to using a non alpha annotation behind the gate, and prepare
to graduate to beta.
2019-08-28 10:29:08 -04:00
Kubernetes Prow Robot
bdfc8f62b4
Merge pull request #81949 from yastij/remove-ftg-name-dep
remove dependency to pkg/features on service controller package
2019-08-28 05:12:15 -07:00
Han Kang
8da448dbe3 migrate scheduler metrics endpoint to metrics stability framework 2019-08-28 03:40:43 -07:00
Kubernetes Prow Robot
ab13cf1055
Merge pull request #81691 from MrHohn/svc-finalizer-beta
Promote service load balancer finalizer to Beta
2019-08-27 19:37:48 -07:00
Yassine TIJANI
19fa57bca3 remove dependency to pkg/features on service controller package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-08-27 18:00:10 +01:00
Kubernetes Prow Robot
4e83be80b1
Merge pull request #81844 from yastij/remove-slice-dep
remove slice dependency from service_controller
2019-08-27 09:25:24 -07:00
Yassine TIJANI
6ad40ba51f remove slice dependency
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-08-27 11:26:06 +01:00
Kubernetes Prow Robot
927f45191e
Merge pull request #81527 from yastij/move-controller-util
move WaitForCacheSync to the sharedInformer package
2019-08-27 00:52:54 -07:00
hwdef
9b3f577b1d fix typo in pkg 2019-08-26 09:25:39 +08:00
Kubernetes Prow Robot
9ae0963fb7
Merge pull request #81839 from krzysied/node_controller_pod_informer
Moving podInformer to node controller scope
2019-08-23 15:48:53 -07:00
Krzysztof Siedlecki
07b039862b moving podInformer to node controller scope 2019-08-23 15:59:59 +02:00
Kubernetes Prow Robot
9c69a45b52
Merge pull request #81808 from dims/drop-azure-go-autorest-from-pkg/controller
Drop Azure/go-autorest from pkg/controller
2019-08-23 06:54:02 -07:00
Kubernetes Prow Robot
e232921c1f
Merge pull request #80353 from BenTheElder/tags
simulate in-tree cloud provider removal with a build tag
2019-08-23 04:55:31 -07:00
Kubernetes Prow Robot
b8f4f27eda
Merge pull request #81680 from sadlil/sadlil/fix-static-check-volume-controller
volume-controller: fix static check failures
2019-08-22 22:03:44 -07:00
Benjamin Elder
5a3301a59d s/nolegacyproviders/providerless/ 2019-08-22 15:30:56 -07:00
Benjamin Elder
ece112524b hack/update-bazel.sh 2019-08-22 14:53:35 -07:00
Benjamin Elder
678d3f2841 add build tags to legacy provider code and make it possible to build kube-controller-manager without any legacyproviders or without particular legacy providers 2019-08-22 14:53:35 -07:00
Davanum Srinivas
4e4c38bbbe
Drop Azure/go-autorest from pkg/controller 2019-08-22 17:34:50 -04:00
Yassine TIJANI
7e4c3096fe move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-08-22 16:13:41 +01:00
Zihong Zheng
0a7c085b14 Check service finalizer on upgrade test and fix-up test cases 2019-08-21 15:19:56 -07:00
Ricardo Pchevuzinske Katz
e389237171 Remove watching Endpoints of Headless Services
Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>
2019-08-21 16:37:09 -03:00
Krzysztof Siedlecki
6842e11f7e removing redundant code 2019-08-21 17:22:06 +02:00
Sadlil Rhythom
7a8eaf4561 controller:volume fix static check failures 2019-08-21 09:37:42 +02:00
Kubernetes Prow Robot
d987e6353e
Merge pull request #81019 from josephburnett/hparunawaytest-review
Test more replicas than spec.
2019-08-20 00:15:47 -07:00
Kubernetes Prow Robot
60ca3c8a57
Merge pull request #80585 from gongguan/check_svcCIDR_contains_clusterCIDR
check whether serviceCIDR contains clusterCIDR during ipam initialization
2019-08-17 12:08:06 -07:00
louisssgong
3a58cdd1c1 check clusterCIDR after occupy serviceCIDR 2019-08-17 09:47:34 +08:00
Kubernetes Prow Robot
7420bb2214
Merge pull request #80492 from matte21/pvc-protection-controller-fix-issue-75980
Add live list of pods to PVC protection controller to make sure it does not delete a PVC which is being used by a Pod
2019-08-16 05:06:44 -07:00
Kubernetes Prow Robot
22dc60e1a7
Merge pull request #81444 from AllenZMC/patch-3
fix some typos in testing.go and recycle_test.go
2019-08-15 23:08:59 -07:00
Kubernetes Prow Robot
273e9262bb
Merge pull request #80342 from draveness/feature/remove-critical-pod-annotation
feat: cleanup pod critical pod annotations feature
2019-08-15 07:20:34 -07:00
czm
cdcf1c0ea2 fix some typos in recycle_test.go 2019-08-15 11:34:46 +08:00
Kubernetes Prow Robot
e552806753
Merge pull request #81361 from oxddr/kubeproxy-moar-logging
kube-proxy: do not export network programming latency for deleted Endpoints
2019-08-14 16:52:49 -07:00
matte21
1371490bd6 Lowercase first letter of chainable errors in PVC protection controller
Lowercase first letter of error messages that are not printed right
away to ease chaining with other error messages in PVC protection
controller.
2019-08-15 00:46:02 +02:00
matte21
791d1c81f0 Add live list of pods to PVC protection controller
Add live list of pods to PVC protection controller, as opposed to doing
only a cache-based list through the Informer. Both lists are performed
while processing a PVC with deletionTimestamp set to check whether Pods
using the PVC exist and remove the finalizer to enable deletion of the
PVC if that's not the case. Prior to this commit only the cache-based
list was done but that's unreliable because a pod using the PVC might
exist but not be in the cache just yet. On the other hand, the live
list is 100% reliable.

Note that it would be enough to do only the live list. Instead, this
commit adds it after the cache-based list and performs it only if the
latter finds no Pod blocking deletion of the PVC being processed. The
rationale is that live lists are expensive and it's desirable to
minimize them. The drawback is that if at the time of the cache-based
list the cache has not been notified yet of the deletion of a Pod using
the PVC the PVC is kept. Correctness is not compromised because the
finalizer will be removed when the Pod deletion notification is
received, but this means PVC deletion is delayed. Reducing live lists
was valued more than deleting PVCs slightly faster.

Also, add a unit test that fails without the change introduced by this
commit and revamp old unit tests. The latter is needed because expected
behavior is described in terms of API calls the controller makes, and
this commit introduces new API calls (the live lists).
2019-08-15 00:46:02 +02:00
AllenZMC
d266b79a39
fix some typos in testing.go 2019-08-14 20:53:24 +08:00
Janek Łukaszewicz
e52110edcd kube-proxy: do not export network programming latency for deleted enpoints. 2019-08-14 14:00:07 +02:00
Kubernetes Prow Robot
2e72cdd7b1
Merge pull request #81081 from p0lyn0mial/gc_transition_delete
changes the way `gc` detect that an object needs to be deleted
2019-08-13 02:28:33 -07:00
Lukasz Szaszkiewicz
2d81cee900 changes the way gc detect that an object needs to be deleted
before this change, an object would be added to `attemptToDelete` queue only if `gc` detected the transition, simply by check if `deletionTimestamp` was set. After the change, it will check if `foregroundDeletion` finalizer has been set before adding the item to the queue.
2019-08-12 10:52:43 +02:00
Travis Rhoden
4574473753
Rename mount.NewOsExec to mount.NewOSExec 2019-08-09 12:30:56 -06:00
draveness
495faa22db feat: cleanup pod critical pod annotations feature 2019-08-09 08:41:23 +08:00
Kubernetes Prow Robot
ef8869466c
Merge pull request #80978 from wojtek-t/selflink_deprecation
Deprecate SelfLink and introduce feature gate to disable its propagation
2019-08-08 03:47:20 -07:00
wojtekt
399d09ce4a Fix GetReference function 2019-08-07 16:49:29 +02:00
Joseph Burnett
a5354d04bb Test more replicas than spec.
During a Deployment update there may be more Pods in the scale target
ref status than in the spec. This test verifies that we do not scale
to the status value. Instead we should stay at the spec value.

Fails before #79035 and passes after.
2019-08-06 14:46:34 +02:00
Kubernetes Prow Robot
f2cfc160ef
Merge pull request #80273 from tallclair/endpoints
Don't delete service endpoints when a generic error occurs
2019-08-05 18:17:54 -07:00
Kubernetes Prow Robot
decdf8891f
Merge pull request #80460 from mrkm4ntr/pvc-class-name
Use v1helper.GetPersistentVolumeClaimClass for compatibility
2019-08-05 15:08:30 -07:00
Kubernetes Prow Robot
9e735d6b27
Merge pull request #79443 from tedyu/taint-mgr-name
Simplify checking in getMinTolerationTime
2019-08-05 15:08:03 -07:00