Commit Graph

4799 Commits

Author SHA1 Message Date
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
Ted Yu
c811b2267f Simplify checking in getMinTolerationTime 2019-08-05 10:45:05 -07:00
Kubernetes Prow Robot
d9a411df6b
Merge pull request #80660 from prameshj/ilb-err
Handle NotImplemented error in service_controller.
2019-08-02 22:39:51 -07:00
Pavithra Ramesh
ecad65a3f8 Added comment after invoking ensureLoadBalancer 2019-08-02 11:24:24 -07:00
Pavithra Ramesh
da887e85e9 Updated comment about ImplementedElsewhere
Removed handling ImplementedElsewhere error in call to EnsureLoadBalancerDeleted.
2019-08-02 10:54:09 -07:00
Pavithra Ramesh
987677c201 Setting log level to 4 since default is 2 or 3.
Depending on how the cluster is created. Test clusters set a default
level of 4.
2019-08-02 10:54:09 -07:00
Pavithra Ramesh
dbfc876e83 Fixed review comments, lint.
Added error check to EnsureLoadBalancerDeleted.
2019-08-02 10:54:09 -07:00
Pavithra Ramesh
d4210b94e2 addressed review comments 2019-08-02 10:54:09 -07:00
Pavithra Ramesh
d79d4e8525 Handle ImplementedElsewhere error in service_controller
This is used when the cloudprovider layer is not implementing loadBalancer service.
Implementation will be in a different controller running on master.
2019-08-02 10:54:09 -07:00
Kubernetes Prow Robot
c981c65c90
Merge pull request #80231 from liggitt/admissionreview-v1
Promote admissionreview to v1
2019-08-01 17:20:05 -07:00
Kubernetes Prow Robot
3287bf7a3a
Merge pull request #80859 from wojtek-t/fix_selflinks_in_tests
Fix selflinks in tests
2019-08-01 15:01:30 -07:00
Jordan Liggitt
44930fc939 AdmissionReview: Install/register 2019-08-01 17:17:42 -04:00
Kubernetes Prow Robot
b658028078
Merge pull request #77713 from zjj2wry/secret_resync_duration
add secret back to the workqueue with delay time, avoid expired bootstrap tokens not being deleted
2019-08-01 09:46:29 -07:00
wojtekt
bc00248e71 Fix selflinks in tests 2019-08-01 15:50:03 +02:00
YueHonghui
d29f194474 add flag concurrent-statefulset-syncs to kube-controller-manager (#79169)
* add flag `concurrent-statefulset-syncs` to set number of concurrent workers for statefulset controller

* change default value of ConcurrentStatefulSetSyncs from 1 to 5

* 1. fix doc comment of statefulset config types.go
2. add missing deps k8s.io/kubernetes/pkg/controller/statefulset/config

* add missing dep k8s.io/kubernetes/pkg/controller/statefulset/config/v1alpha1

* updated bazel BUILD files

* update kube-controller-manager options testcase

* fix codegen

* fix golint error

* fix testcase
2019-07-31 22:36:14 -07:00
zhengjiajin
5c1815abb7 add secret back to the workqueue with delay time, avoid expired bootstrap tokens not being deleted 2019-08-01 10:44:31 +08:00
Tim Allclair
8fc988e7dd Unit test endpoints controller service deletion 2019-07-31 16:10:09 -07:00
Tim Allclair
b2a02140db Don't delete service endpoints when a generic error occurs 2019-07-31 15:10:14 -07:00
RainbowMango
0e0e1f7dab 1. Fix lint errors for the whole directory staging/src/k8s.io/client-go/tools/cache;
2. Remove staging/src/k8s.io/client-go/tools/cache from .golint_failures;
3. Fix some typo from comments.
2019-07-27 15:49:03 +08:00
Kubernetes Prow Robot
44de947f0f
Merge pull request #80509 from mborsz/endpoints
Add simple pod updates batching to endpoint controller.
2019-07-26 20:16:36 -07:00
Kubernetes Prow Robot
6f8944aa54
Merge pull request #79696 from yittg/fix-pv-controller-affinity
fix pv-controller sync check node affinity for scheduled claim
2019-07-26 20:15:58 -07:00
Kubernetes Prow Robot
368ee4bb8e
Merge pull request #79068 from tedyu/dc-skipped-pods
Remove unnecessary loop for lowering expectations
2019-07-26 14:01:59 -07:00
Kubernetes Prow Robot
d5d6061c8e
Merge pull request #80476 from matte21/fix-pvcs-leaks
PVC protection controller: fix PVC leaks
2019-07-26 05:31:59 -07:00
matte21
b4fed83a4a PVC protection controller: get rid of PVC leaks
Make the PVC protection controller robust to cases where a Pod X is deleted,
then a Pod Y with the same namespaced name is created and the two events are
delivered via a single update notification. Both pods should be processed,
because X might be blocking deletion of a PVC which is not referenced by Y.
Prior to this commit only the newer pod is processed, which means that it
is possible to leak PVCs.

Also, add unit tests to reflect the change.
2019-07-26 11:17:17 +02:00
Yi Tang
8c13f9dea3 fix pv controller not find pv for pvc provisioning 2019-07-26 16:24:30 +08:00
Kubernetes Prow Robot
bf2dd03083
Merge pull request #80318 from davidxia/fix-err-caps
cleanup: fix some log and error capitalizations
2019-07-25 10:41:28 -07:00
AllenZMC
852040c036
fix typos in pv_controller.go
make code kinda more readable
2019-07-25 11:28:19 +08:00
Maciej Borsz
d96f24262d Autogenerated files 2019-07-24 11:36:53 +02:00
Maciej Borsz
2fae3cbcfe Add simple batching to endpoints controller 2019-07-24 11:36:53 +02:00
Kubernetes Prow Robot
bbdd0557b6
Merge pull request #78170 from DaiHao/daemon
ignore failed pods to not block rolling update daemonset
2019-07-23 21:36:14 -07:00
Shintaro Murakami
c94e800008 Use v1helper.GetPersistentVolumeClaimClass for compatibility 2019-07-24 10:35:00 +09:00
David Xia
fabfd950b1
cleanup: fix some log and error capitalizations
Part of https://github.com/kubernetes/kubernetes/issues/15863
2019-07-20 18:26:16 -04:00
Kubernetes Prow Robot
664edf8327
Merge pull request #79408 from seans3/move-kubectl-scheme
Move kubectl scheme
2019-07-19 16:08:55 -07:00
Kubernetes Prow Robot
49f6510d9a
Merge pull request #80277 from draveness/feature/revert-cleanup-critical-pod
Revert "feat: cleanup pod critical pod annotations feature"
2019-07-18 19:31:37 -07:00
Sean Sullivan
67140f13fe Updated dependencies: BUILD/modules.txt 2019-07-18 15:43:26 -07:00
Sean Sullivan
140c62cd4c Update all imports to scheme in staging 2019-07-18 15:32:27 -07:00
Kubernetes Prow Robot
8d4c49faae
Merge pull request #80088 from ZP-AlwaysWin/dev01
Fix golint failure in pkg/controller/volume/expand
2019-07-18 09:52:12 -07:00
draveness
d83526d253 Revert "feat: cleanup pod critical pod annotations feature"
This reverts commit b6d41ee5cc.
2019-07-18 13:31:12 +08:00
Kubernetes Prow Robot
91e17af5ff
Merge pull request #80263 from tedyu/job-ctrl-early
Skip unnecessary operations if diff is <= 0
2019-07-17 21:28:48 -07:00
Kubernetes Prow Robot
c23a031bb4
Merge pull request #79060 from tedyu/dc-check-err
Check error return from MetaNamespaceKeyFunc
2019-07-17 19:34:10 -07:00
Ted Yu
898f099346 Skip unnecessary operations if diff is less than 0 2019-07-17 14:03:08 -07:00
Kubernetes Prow Robot
601b7935ff
Merge pull request #79971 from mrkm4ntr/fix-pv-existence-check
Add check to reduce orphaned volume
2019-07-17 12:20:12 -07:00
Ted Yu
c429b7d3e4 Handle error return from MetaNamespaceKeyFunc 2019-07-17 10:52:23 -07:00
ZP-AlwaysWin
1573be94ae fix pkg/controller/volume/expand/pvc_populator.go 2019-07-17 09:00:24 +08:00
Kubernetes Prow Robot
5ece88c4c8
Merge pull request #74526 from DXist/feature/hpa-scale-to-zero
Support scaling HPA to/from zero pods for object/external metrics
2019-07-16 10:11:24 -07:00
Rinat Shigapov
d55f037b7d HPA scale-to-zero for custom object/external metrics
Add support for scaling to zero pods

minReplicas is allowed to be zero

condition is set once

Based on https://github.com/kubernetes/kubernetes/pull/61423

set original valid condition

add scale to/from zero and invalid metric tests

Scaling up from zero pods ignores tolerance

validate metrics when minReplicas is 0

Document HPA behaviour when minReplicas is 0

Documented minReplicas field in autoscaling APIs
2019-07-16 08:46:21 -05:00
Kubernetes Prow Robot
12f36302f9
Merge pull request #78361 from tedyu/stateful-get-rev
Break out of loop when currentRevision is found in defaultStatefulSetControl#getStatefulSetRevisions
2019-07-15 12:37:23 -07:00
Joseph Burnett
7382fa464d Add josephburnett to podautoscaler OWNERS. 2019-07-12 10:20:16 +02:00
Kubernetes Prow Robot
642a06e552
Merge pull request #79554 from draveness/feature/remove-critical-pod-annotation
feat: cleanup pod critical pod annotations feature
2019-07-11 22:03:04 -07:00
Kubernetes Prow Robot
3dd8add5d2
Merge pull request #79549 from liggitt/admission-webhooks-v1
Promote admission webhook API to v1
2019-07-11 17:01:34 -07:00
Clayton Coleman
d631f9b7e9
Use metadata informers instead of dynamic informers in controller manager
All controllers in controller-manager that deal with objects generically
work with those objects without needing the full object. Update the GC
and quota controller to use PartialObjectMetadata input objects which
is faster and more efficient.
2019-07-11 12:18:52 -04:00
Clayton Coleman
637cc83341
Switch the garbage collector to use metadata client and protobuf 2019-07-11 12:18:51 -04:00
Kubernetes Prow Robot
b500c740ee
Merge pull request #79859 from sukeesh/hpa-error-log-fix
HPA incorrectly reported condition status
2019-07-11 07:28:55 -07:00
Shintaro Murakami
7c0b33e012 Add check to reduce orphaned volume 2019-07-11 16:31:56 +09:00
Kubernetes Prow Robot
ca6cc69bd4
Merge pull request #78744 from smarterclayton/client_ns
Update namespace controller to use the metadata client
2019-07-10 18:48:53 -07:00
draveness
b6d41ee5cc feat: cleanup pod critical pod annotations feature 2019-07-11 08:54:19 +08:00
Kubernetes Prow Robot
57eef32041
Merge pull request #79657 from josephburnett/hpastuck
Ignore unschedulable pods
2019-07-10 11:34:29 -07:00
Clayton Coleman
50fd47258d
Switch the namespace controller to use the metadata client
The metadata client uses protobuf and returns only a subset of object
data (the metadata) which allows operations that act only on objects
generically to work much faster. Use the metadata client in the
namespace controller to reduce the amount of work the namespace controller
has to do in large namespaces.
2019-07-10 14:31:18 -04:00
Joseph Burnett
80e279d353 Ignore pending pods.
This change adds pending pods to the ignored set first before
selecting pods missing metrics. Pending pods are always ignored when
calculating scale.

When the HPA decides which pods and metric values to take into account
when scaling, it divides the pods into three disjoint subsets: 1)
ready 2) missing metrics and 3) ignored. First the HPA selects pods
which are missing metrics. Then it selects pods should be ignored
because they are not ready yet, or are still consuming CPU during
initialization. All the remaining pods go into the ready set. After
the HPA has decided what direction it wants to scale based on the
ready pods, it considers what might have happened if it had the
missing metrics. It makes a conservative guess about what the missing
metrics might have been, 0% if it wants to scale up--100% if it wants
to scale down. This is a good thing when scaling up, because newly
added pods will likely help reduce the usage ratio, even though their
metrics are missing at the moment. The HPA should wait to see the
results of its previous scale decision before it makes another
one. However when scaling down, it means that many missing metrics can
pin the HPA at high scale, even when load is completely removed. In
particular, when there are many unschedulable pods due to insufficient
cluster capacity, the many missing metrics (assumed to be 100%) can
cause the HPA to avoid scaling down indefinitely.
2019-07-10 12:16:33 +02:00
Kubernetes Prow Robot
abe94ce9b3
Merge pull request #79937 from mm4tt/deployment_improve
Deployment Controller - avoid unnecessary copying of pod objects in getPodMapForDeployment
2019-07-10 01:24:25 -07:00
Matt Matejczyk
8140bbc4f5 Deployment Controller - don't copy pods in getPodMapForDeployment
As the benchmark shows it speeds up the method~x4 and reduces memory
consumption ~x20.

```
benchmark                              old ns/op     new ns/op     delta
BenchmarkGetPodMapForDeployment-12     276121        72591         -73.71%

benchmark                              old allocs     new allocs     delta
BenchmarkGetPodMapForDeployment-12     241            238            -1.24%

benchmark                              old bytes     new bytes     delta
BenchmarkGetPodMapForDeployment-12     554025        28956         -94.77%
```
2019-07-10 09:14:15 +02:00
Kubernetes Prow Robot
dc8829df5c
Merge pull request #75922 from humblec/stateful_set
Remove unwanted `else` block from statefulset controller.
2019-07-10 00:12:25 -07:00
Kubernetes Prow Robot
d59a603f1b
Merge pull request #78267 from mucahitkurt/cleanup/operation-generator-migration-scenarios-unit-tests
unit tests for operationGenerator.GenerateUnmapVolumeFunc
2019-07-09 18:20:25 -07:00
Matt Matejczyk
3e363c5c46 Add micro-benchmark for DeploymentController.getPodMapForDeployment method 2019-07-09 15:00:18 +02:00
Kubernetes Prow Robot
2cfd4a5eb9
Merge pull request #79168 from tnozicka/fix-sigapps-owners
Update Sig-Apps OWNERS to aliases in places that were missed in #76669
2019-07-08 17:30:01 -07:00
Jordan Liggitt
e24377f190 Install/register v1 admission registration types 2019-07-08 09:49:29 -04:00
Sukeesh
44c3f0105f fix incorrect hpa status 2019-07-08 17:27:38 +09:00
Kubernetes Prow Robot
a33840e023
Merge pull request #73977 from khenidak/ipv6dualstack
ipv6 dual stack (Phase 1 - ALPHA)
2019-07-02 18:07:12 -07:00
Khaled Henidak(Kal)
2b77667718 vendor updates 2019-07-02 22:26:26 +00:00
Kubernetes Prow Robot
cf7662d3a1
Merge pull request #79035 from josephburnett/hparunaway
Fix HPA feedback from writing status.replicas to spec.replicas.
2019-07-02 09:31:08 -07:00
Khaled Henidak(Kal)
a51b8ce456 route controller + azure v6 routes 2019-07-02 15:39:06 +00:00
Khaled Henidak(Kal)
584d7103e2 node ipam controller for ipv6 dualstack 2019-07-02 15:39:06 +00:00
Joseph Burnett
39c4875321 There are various reasons that the HPA will decide not the change the
current scale. Two important ones are when missing metrics might
change the direction of scaling, and when the recommended scale is
within tolerance of the current scale.

The way that ReplicaCalculator signals it's desire to not change the
current scale is by returning the current scale. However the current
scale is from scale.Status.Replicas and can be larger than
scale.Spec.Replicas (e.g. during Deployment rollout with configured
surge). This causes a positive feedback loop because
scale.Status.Replicas is written back into scale.Spec.Replicas,
further increasing the current scale.

This PR fixes the feedback loop by plumbing the replica count from
spec through horizontal.go and replica_calculator.go so the calculator
can punt with the right value.
2019-07-02 14:21:32 +02:00
Kubernetes Prow Robot
f56b336976
Merge pull request #79592 from tedyu/ctrl-exp-mutex
Move population of expectedUIDs outside lock
2019-07-01 09:43:34 -07:00
Ted Yu
6db618fa42 Move population of expectedUIDs outside lock 2019-07-01 21:26:34 +08:00
Kubernetes Prow Robot
b22e48f240
Merge pull request #79584 from tedyu/pv-ctrl-bind-vol
Drop unnecessary claim parameter from PersistentVolumeController#updateBindVolumeToClaim
2019-07-01 06:09:33 -07:00
Kubernetes Prow Robot
d48f123a40
Merge pull request #79591 from tedyu/ctrl-util-label
Simplify the check of presence of labels in createPods
2019-07-01 01:45:19 -07:00
Ted Yu
69aeabc397 Simplify the check of presence of labels in createPods 2019-07-01 15:32:28 +08:00
Ted Yu
a18633427b Drop unnecessary claim parameter from PersistentVolumeController#updateBindVolumeToClaim 2019-07-01 13:30:11 +08:00
Kubernetes Prow Robot
8865cb3c24
Merge pull request #78853 from tcmichael/bugfix
Fix a bug that StatefulSet applies the revision incorrectly
2019-06-29 20:43:21 -07:00
kanchairen
bf421ae560 Fix a bug that StatefulSet applies the revision incorrectly 2019-06-30 09:49:00 +08:00
wojtekt
cba13eb9ad Autogenerate code 2019-06-29 15:26:09 +02:00
wojtekt
fd819f8fdc Move APIObjectVersioner 2019-06-28 21:16:49 +02:00
Hongcai Ren
9618d1d955 Fix service controller not release loadBalancer issue in corner case. 2019-06-27 09:12:16 +08:00
Kubernetes Prow Robot
eed7af6e41
Merge pull request #79370 from mborsz/node
Use watch in TaintManager
2019-06-26 06:49:17 -07:00
Maciej Borsz
98e9c78c13 Migrate TaintManager to use watch for listing pods instead of expensive
listing pods call.
2019-06-26 13:35:59 +02:00
Kubernetes Prow Robot
41b817b92f
Merge pull request #79038 from yastij/move-jws
move jws to k8s.io/cluster-bootstrap
2019-06-25 17:01:29 -07:00
Kubernetes Prow Robot
a78ae4ba74
Merge pull request #76059 from tedyu/master
Remove unnecessary map in cleanupHistory
2019-06-25 05:24:35 -07:00
Yassine TIJANI
d3620dfa29 move jws to k8s.io/cluster-bootstrap
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-06-25 13:48:13 +02:00
Kubernetes Prow Robot
6f0f62b2c4
Merge pull request #77211 from dixudx/bootstrap_token_refactor
Bootstrap token refactor
2019-06-24 13:36:36 -07:00
Kubernetes Prow Robot
bc70f33e3a
Merge pull request #79294 from tedyu/svc-ctrl-lock
Use RWMutex to improve locking for serviceCache
2019-06-24 11:24:28 -07:00
Ted Yu
e86b0d3cd3 Use RWMutex to improve locking for serviceCache 2019-06-22 06:49:40 -07:00
Kubernetes Prow Robot
4b8a1163aa
Merge pull request #77712 from Sn0rt/check-target-port-check
service controller: if targetPort has changed will process by cloud-p…
2019-06-21 18:52:12 -07:00
guohaowang
d41f7b99ef service controller: if targetPort has changed will process by cloud-provider
Signed-off-by: guohaowang <wangguohao.2009@gmail.com>
2019-06-21 15:26:45 +08:00
Hongcai Ren
fa80c0072a Remove redundant initilization for service controller 2019-06-21 11:38:36 +08:00
Di Xu
5056161d4d auto-generated 2019-06-20 17:06:26 +08:00
Di Xu
af9ae4c11a refactor bootstrap token utils 2019-06-20 15:43:44 +08:00
Kubernetes Prow Robot
8d8c54bd73
Merge pull request #79082 from timoreimann/delete-unused-service-controller-load-balancer-name-method
Remove unused ServiceController.loadBalancerName method
2019-06-19 18:37:13 -07:00
Tomas Nozicka
d4261ba741 Update Sig-Apps OWNERS in places that were missed in #76669 2019-06-19 15:36:16 +02:00
Hongcai Ren
f0fae66001 Minor change: delete unused constant from service controller 2019-06-18 15:45:34 +08:00
Kubernetes Prow Robot
541cc51c7d
Merge pull request #72809 from hanxiaoshuai/fix0111
when SessionAffinityConfig is different, enqueueService in update Service handler
2019-06-17 05:54:09 -07:00