Commit Graph

126 Commits

Author SHA1 Message Date
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
wojtekt
3758ab62d1 Avoid unnecessary GCE API calls for IP-alias calls
This is to avoid unnecessary GCE API calls done by getInstanceByName
helper, which is iterating over all zones to find in which zone the
VM exists.
ProviderID already contains all the information - it's in the form:
gce://<VM URL> (VM URL contains project, zone, VM name).

ProviderID is propagated by Kubelet on node registration and in case
of bugs backfilled by node-controller.
2020-04-20 20:47:11 +02:00
Gaurav Singh
4cbdb7bf97 [Controller]: cidr nil ptr dereference 2020-04-05 19:03:07 -04:00
taesun_lee
79680b5d9b Fix pkg/controller typos in some error messages, comments etc
- applied review results by LuisSanchez
- Co-Authored-By: Luis Sanchez <sanchezl@redhat.com>

genernal -> general
iniital -> initial
initalObjects -> initialObjects
intentionaly -> intentionally
inforer -> informer
anotother -> another
triger -> trigger
mutli -> multi
Verifyies -> Verifies
valume -> volume
unexpect -> unexpected
unfulfiled -> unfulfilled
implenets -> implements
assignement -> assignment
expectataions -> expectations
nexpected -> unexpected
boundSatsified -> boundSatisfied
externel -> external
calcuates -> calculates
workes -> workers
unitialized -> uninitialized
afater -> after
Espected -> Expected
nodeMontiorGracePeriod -> NodeMonitorGracePeriod
estimateGrracefulTermination -> estimateGracefulTermination
secondrary -> secondary
ShouldRunDaemonPodOnUnscheduableNode -> ShouldRunDaemonPodOnUnschedulableNode
rrror -> error
expectatitons -> expectations
foud -> found
epackage -> package
succesfulJobs -> successfulJobs
namesapce -> namespace
ConfigMapResynce -> ConfigMapResync
2020-02-27 00:15:33 +09:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
2637772298 some manual fixes 2020-02-07 18:17:40 -08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Benjamin Elder
cf510ac285 fix multiple node cidr masks in providerless build 2019-11-19 09:47:45 -08:00
Anish Ramasekar
128f33b26e
add comments for compatibility 2019-11-15 15:38:06 -08:00
Anish Ramasekar
796faba4ac
Allow multiple node cidr masks in cm
update tests

add comment

amend var name

update comment

add check for empty slice

fix tests

fix mask size in test

review feedback

add ipv4 and ipv6 flag for mask sizes

add to violation exception list

remove import alias

run update-openapi-spec

review feedback

run update-bazel

review feedback

review feedback
2019-11-14 20:04:31 -08:00
Kubernetes Prow Robot
ba9f7419f9
Merge pull request #84732 from khenidak/fix-disable-dualstack
Fix a CM panic when ipam tries to lock an out of range pre existing cidr
2019-11-14 11:19:35 -08:00
Khaled Henidak(Kal)
2de6b2e52c unit tests 2019-11-08 18:29:08 +00:00
Khaled Henidak(Kal)
e07402f7dc fix a panic when ipam tries to allocate an out of range pre-existing cidr 2019-11-08 18:29:08 +00:00
Kubernetes Prow Robot
46472773cb
Merge pull request #84836 from yuxiaobo96/k8s-checks
Correct spelling mistakes
2019-11-06 12:21:11 -08:00
yuxiaobo
81e9f21f83 Correct spelling mistakes
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-11-06 20:25:19 +08:00
Wei Huang
019d7497a5
bazel files 2019-11-05 20:57:21 -08:00
Wei Huang
dd74205bcf
Move out const strings in pkg/scheduler/api/well_known_labels.go 2019-11-05 20:56:21 -08:00
zhipengzuo
1e0b019062 fix log and annotation :cidr mask size must be <= node mask 2019-11-01 17:26:23 +08:00
wojtekt
7b6bcdf780 Autogenerated code 2019-10-24 20:21:00 +02: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
Bob Killen
30053bb00f
Prune inactive owners from pkg/controller/* network related OWNERS files. 2019-10-13 08:50:18 -04: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
shivi28
a0109f00df nodeipam-controller:fix static check failures 2019-10-04 12:40:09 +05:30
Ted Yu
669dc0a9fd Correct the error variable for releasing CIDR 2019-09-17 09:58:08 -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
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
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
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
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
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
Khaled Henidak(Kal)
2b77667718 vendor updates 2019-07-02 22:26:26 +00:00
Khaled Henidak(Kal)
584d7103e2 node ipam controller for ipv6 dualstack 2019-07-02 15:39:06 +00:00
Walter Fender
796097ae40 Staging the GCE Cloud Provider
**What type of PR is this?**
/kind cleanup

**What this PR does / why we need it**:
Staging the GCE Cloud Provider as part of KEP [20190125-removing-in-tree-providers](https://github.com/kubernetes/enhancements/blob/master/keps/sig-cloud-provider/20190125-removing-in-tree-providers.md). Staging repo setup here https://github.com/kubernetes/legacy-cloud-providers
Moves the GCE cloud provider implementation to staging.
This is in preparation for moving the cloud provider code out of tree entirely.
However we need it in staging while the code needs to be consumed both in/out of tree.

**Which issue(s) this PR fixes**:
Fixes #

**Special notes for your reviewer**:

**Does this PR introduce a user-facing change?**:

```
NONE
```

Updated import dependency tracking.
Factored in the cleanup from #77412
Minor fix to go.mod.
2019-05-07 13:17:52 -07:00
Johannes M. Scheuermann
80d6b0465e Remove empty metrics.go file and method call
Update bazel code file
2019-04-08 14:49:27 +02:00
stewart-yu
ecbd5427e7 auto-generated file 2019-03-02 12:55:26 +08:00
stewart-yu
e01ff1641c move config local to every controllers in kube-controller-manager 2019-03-02 12:54:33 +08:00
Daniel (Shijun) Qian
d648ba856b Move pkg/api/v1/node to pkg/util/node (#73656)
* merge pkg/api/v1/node with pkg/util/node

* update test case for utilnode

* remove package pkg/api/v1/node

* move isNodeReady to internal func

* Split GetNodeCondition into e2e and controller pkg

* fix import errors
2019-02-26 11:05:32 -08:00
Kubernetes Prow Robot
808f2cf0ef
Merge pull request #72525 from justinsb/owners_should_not_be_executable
Remove executable file permission from OWNERS files
2019-02-14 23:55:45 -08:00
yankaiz
7379ad5ae2 Skip validation for clusterCIDR in node ipam controller.
clusterCIDR is passed down from kube_env CLUSTER_IP_RANGE to the flag --cluster-cidr.
We plan not to let GKE to pass down CLUSTER_IP_RANGE to kube-env for the master node.
2019-02-13 12:13:33 -08:00
Kubernetes Prow Robot
5b7a790d35
Merge pull request #72185 from dcbw/owners-label-sig-network
OWNERS: add label:sig/network to a bunch of places
2019-02-08 10:36:16 -08:00
Roy Lenferink
b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
Justin SB
dd19b923b7
Remove executable file permission from OWNERS files 2019-01-11 16:42:59 -08:00
Dan Williams
2e339188ed OWNERS: add label:sig/network to a bunch of places 2018-12-19 00:00:02 -06:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
walter
735ad9ed63 Fixed lint errors for pkg/cloudprovider/providers/gce.
Fixed minor issues.
Cleaned up from merge errors.
2018-10-29 11:52:24 -07:00
yameiwang
de36fc8f4b remove kubeClient != nil when using glog.Fatalf 2018-10-24 21:48:06 +08:00
k8s-ci-robot
feb6475a30
Merge pull request #68952 from grayluck/node-cidr-size
Skip node cidr mask size check for cloud allocation
2018-10-17 16:19:49 -07:00
yankaiz
e3121c1f81 Skip node cidr mask size check for cloud allocation.
Unittest added for node_ipan_controller.go.
2018-10-17 11:29:49 -07:00
tanshanshan
b7c7966b9f Move pkg/scheduler/algorithm/well_known_labels.go out 2018-10-13 09:10:00 +08:00
Walter Fender
f3f46d5f5a Moving the cloudprovider interface to staging.
Individual implementations are not yet being moved.
Fixed all dependencies which call the interface.
Fixed golint exceptions to reflect the move.
Added project info as per @dims and
https://github.com/kubernetes/kubernetes-template-project.
Added dims to the security contacts.
Fixed minor issues.
Added missing template files.
Copied ControllerClientBuilder interface to cp.
This allows us to break the only dependency on K8s/K8s.
Added TODO to ControllerClientBuilder.
Fixed GoDeps.
Factored in feedback from JustinSB.
2018-10-04 14:41:20 -07:00
SataQiu
94a653f100 fix typo 2018-09-28 23:41:24 +08:00
Kubernetes Submit Queue
06ffb07e8e
Merge pull request #68135 from shyamjvs/add-random-backoff-to-cidr-allocator
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Use random backoff for retries in cloud-cidr-allocator

Ref https://github.com/kubernetes/kubernetes/pull/68084#issuecomment-417651247
/cc @wojtek-t 

```release-note
NONE
```
2018-09-03 18:41:40 -07:00
Shyam Jeedigunta
8123a9ac7b Use random backoff for retries in cloud-cidr-allocator 2018-08-31 16:07:20 +02:00
wojtekt
fcd2882722 Fix retrying in ipam controller 2018-08-31 13:41:16 +02:00
Bowei Du
d3facac6ef Make CIDR allocation retry backoff exponentially
This also sets to the retry time to be less aggressive

fixes #67348
2018-08-30 12:03:05 -07:00
Dr. Stefan Schimanski
d79cf25497 Update external k8s.io/metrics imports 2018-07-02 10:44:18 +02:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
hangaoshuai
31d3fa2b1a we should use Warningf instead of Warning when we are using format string 2018-05-30 16:44:23 +08:00
andrewsykim
0a164760dc renable nodeipam in kube-controller-manager 2018-04-23 22:28:37 -04:00
Mikhail Mazurskiy
468655b76a
Use typed events client directly 2018-04-01 18:57:29 +10:00
Kubernetes Submit Queue
0ab01d19c9
Merge pull request #61375 from satyasm/cloud-cidr-bound-retries
Automatic merge from submit-queue (batch tested with PRs 60455, 61365, 61375, 61597, 61491). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix #61363, Bounded retries for cloud allocator.

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #61363

**Special notes for your reviewer**:
Changed the tracking of nodesInProcessing from a set to map[string]int so that we can count the
number of times we re-process the node and not re-queue in case updateMaxRetries exceeded.

**Release note**:

```release-note
Bound cloud allocator to 10 retries with 100 ms delay between retries.
```
2018-03-26 15:34:45 -07:00
Satyadeep Musuvathy
adc71ff034 Fix #61363, Bounded retries for cloud allocator. 2018-03-23 12:17:31 -07:00
Marek Grabowski
f93598eea5 Fix condition for using network unavailable taint in cloud_cidr_allocator 2018-03-21 17:55:26 +00:00
Kubernetes Submit Queue
d9d1364657
Merge pull request #61124 from satyasm/avoid-sync-delay
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix Issue #61123, call syncer.Update on add event.

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #61123

**Special notes for your reviewer**:

**Release note**:

```release-note
Fixed #61123 by triggering syncer.Update on all cases including when a syncer is created
on a new add event.
```
2018-03-21 08:25:44 -07:00
Kubernetes Submit Queue
854002c3e1
Merge pull request #59208 from augabet/CIDR_Taints
Automatic merge from submit-queue (batch tested with PRs 60363, 59208, 59465, 60581, 60702). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

check taints when allocating CIDR for the cloud

check taint when allocating CIDR for the Cloud (for the shared informer cache).

What this PR does / why we need it:
Following the issue #58406 here is a check of taint when when allocating CIDR for the Cloud

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #58406

Special notes for your reviewer:
/assign @yastij @gmarek

```release-note
None
```
2018-03-20 02:37:16 -07:00
Satyadeep Musuvathy
4b2de75679 Fix Issue #61123, call syncer.Update on add event. 2018-03-13 11:20:50 -07:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Di Xu
48388fec7e fix all the typos across the project 2018-02-11 11:04:14 +08:00
augabet
39a33b1bbd check taints when allocating CIDR for the cloud 2018-02-01 18:03:11 +01:00
Nic Cope
c7988bae61 Get the node before attempting to get its Alias IP ranges
This allows us to fail fast if the node doesn't exist, and to record node status
changes if we fail to 'allocate' a CIDR.
2018-01-11 17:50:07 -08:00
Shyam Jeedigunta
95f381bd6b Refactor retry logic away from updateCIDRAllocation() 2018-01-09 12:45:55 +01:00
Walter Fender
9187b343e1 Split the NodeController into lifecycle and ipam pieces.
Prepatory work fpr removing cloud provider dependency from node
controller running in Kube Controller Manager. Splitting the node
controller into its two major pieces life-cycle and CIDR/IP
management. Both pieces currently need the the cloud system to do their work.
Removing lifecycles dependency on cloud will be fixed ina followup PR.

Moved node scheduler code to live with node lifecycle controller.
Got the IPAM/Lifecycle split completed. Still need to rename pieces.
Made changes to the utils and tests so they would be in the appropriate
package.
Moved the node based ipam code to nodeipam.
Made the relevant tests pass.
Moved common node controller util code to nodeutil.
Removed unneeded pod informer sync from node ipam controller.
Fixed linter issues.
Factored in  feedback from @gmarek.
Factored in feedback from @mtaufen.
Undoing unneeded change.
2018-01-04 12:48:08 -08:00