Commit Graph

138 Commits

Author SHA1 Message Date
andrewsykim
8c633356df move well known cloud provider taints to k8s.io/cloud-provider/api
Signed-off-by: andrewsykim <kim.andrewsy@gmail.com>
2020-02-23 19:54:59 -05: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
Zach Shepherd
2b554079af
Ensure a provider ID is set on a node if expected
A transient issue might occur that causes an error to be returned by
InstanceID(). When this is ignored, the external cloud provider taint
will be removed and neither AddCloudNode() nor UpdateCloudNode() will
try to set a provider ID in the future.

By returning the error we can ensure that the external cloud provider
taint is not removed prematurely, allowing the operation to be retried
(until the provider ID can be set).

Preserve support for external cloud providers that do not use IDs by
continuing if a NotImplemented error is returned, making a distinction
between lack of support for provider IDs and an actual error.

Introduce pair of unit tests that show a provider ID will eventually
be set if an error is returned, unless that error is a NotImplemented,
in which case the external cloud provider taint will be removed.
2020-01-10 11:00:54 -08:00
Alvaro Aleman
18fa7bdb6e Cloud node controller: Only call once into cloud provider 2019-12-17 20:03:27 +01:00
Andrew Sy Kim
55e40b8dc1 cloud node controller: apply stable instance-type label with backfill to existing nodes
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-11-08 10:50:52 -05:00
Andrew Sy Kim
3032c81187 node controller: set both deprecated Beta and GA labels for Zone/Region topology
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-11-07 20:08:11 -05:00
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
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
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
68d8a5ae15 Break out of loop when NodeHostName is found 2019-09-18 16:57:39 -07:00
mengyang02
b4638519a9 init check for cloud node controller 2019-09-07 10:47:11 +08:00
Joel Hermanns
4977aa0ceb Fix typo in node lifecycle controller 2019-06-09 11:57:37 +02:00
Mike Crute
7d62316f8f Migrate fake cloud provider to staging 2019-05-14 13:32:18 -07:00
Kubernetes Prow Robot
ec88ec272c
Merge pull request #75405 from tghartland/node-init-fix
Recheck for cloud taint before initializing nodes in cloud controller
2019-05-14 11:21:19 -07:00
Thomas Hartland
081ec69386 Abort node initialization if cloud taint was already removed
If node events are received at a faster rate than they
can be processed then initialization for some nodes will
be delayed. Once they are eventually processed their cloud taint
is removed, but there may already be several update events
for those nodes with the cloud taint still on them already
in the event queue. To avoid re-initializing those nodes,
the cloud taint is checked for again after requesting
the current state of the node. If the cloud taint is no
longer on the node then nil is returned from the
RetryOnConflict, as an error does not need to be logged.

The logging for a successful initialization is also
moved inside the RetryOnConflict so that the early nil
return does not cause the aborted initialization to be
logged as a success.
2019-05-10 09:26:16 +02:00
Kubernetes Prow Robot
3ed23a9594
Merge pull request #73350 from hello2mao/remove-unused-const-in-node-controller
Remove unused const
2019-05-09 11:26:51 -07:00
Kubernetes Prow Robot
68f839662d
Merge pull request #74042 from tedyu/master
Reduce unnecessary Map in node_controller#nodeAddressesChangeDetected
2019-03-25 13:24:24 -07:00
Andrew Kim
2901def8c3 delete the persistentvolume labeler controller 2019-02-26 14:23:20 -05: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
Ted Yu
4031900c0c fix variable name 2019-02-13 19:46:18 -08:00
Ted Yu
a346460c08 Reduce unnecessary Map in node_controller#nodeAddressesChangeDetected 2019-02-13 16:16:15 -08:00
Andrew Kim
ca6a051b00 remove cloud provider dependencies to pkg/volume
Co-authored-by: Weibin Lin <linweibin1@huawei.com>
2019-02-09 01:16:55 -05:00
Kubernetes Prow Robot
b50c643be0
Merge pull request #73540 from rlenferink/patch-5
Updated OWNERS files to include link to docs
2019-02-08 09:05:56 -08:00
Davanum Srinivas
b975573385
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
Co-Authored-By: Weibin Lin <linweibin1@huawei.com>

Change-Id: I163b2f2833e6b8767f72e2c815dcacd0f4e504ea
2019-02-05 13:39:07 -05:00
Roy Lenferink
b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
maohongbin01
cbfe654a30 remove unused const in node-controller.go 2019-01-26 23:05:47 +08:00
Joshua Horwitz
9b3ab29cc9 Only attempt to register cloud nodes on update with the cloud taint 2019-01-25 14:48:29 -05:00
Jordan Liggitt
7d398058f1 remove Initializer use from pv label controller 2019-01-23 16:34:44 -05:00
andrewsykim
20c30d5cd1 delete non-existent nodes with Ready condition Unknown 2019-01-04 01:33:39 -05:00
Jordan Liggitt
73dcfe12da Stop checking VolumeScheduling feature gate 2018-12-27 17:45:45 -05:00
Kubernetes Prow Robot
e2be7c91d9
Merge pull request #70344 from andrewsykim/consolidate-node-delete
consolidate node deletion logic between kube-controller-manager and cloud-controller-manager
2018-12-17 15:49:16 -08:00
andrewsykim
5329f09663 consolidate node deletion logic between node lifecycle and cloud node controller 2018-12-03 13:33:53 -05:00
Jordan Liggitt
2498ca7606 drop VerifyFeatureGatesUnchanged 2018-11-21 11:51:33 -05:00
Jordan Liggitt
733dd9dfd7 Add tests to ensure feature gate changes don't escape kubelet/scheduler packages 2018-11-16 10:52:53 -05:00
Jordan Liggitt
358c092abe fix storage unit tests leaking feature flag changes 2018-11-16 10:52:52 -05: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
tanshanshan
b7c7966b9f Move pkg/scheduler/algorithm/well_known_labels.go out 2018-10-13 09:10:00 +08:00
k8s-ci-robot
b3033a7278
Merge pull request #67934 from tanshanshan/typo828
fix spelling mistakes
2018-10-11 18:26:24 -07: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
Deep Debroy
7946c6e21b Implement semantic comparison of VolumeNodeAffinity for unit tests
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-08-31 19:05:05 -07:00
tanshanshan
a83c4dbd19 fix spelling mistakes 2018-08-28 17:12:36 +08:00
Davanum Srinivas
9b43d97cd4
Add Labels to various OWNERS files
Will reduce the burden of manually adding labels. Information pulled
from:
https://github.com/kubernetes/community/blob/master/sigs.yaml

Change-Id: I17e661e37719f0bccf63e41347b628269cef7c8b
2018-08-21 13:59:08 -04:00
Weibin Lin
c702a24182 use glog.V().Infof() for formatting output; return nil when err's nil 2018-08-15 11:48:59 +08:00
Kubernetes Submit Queue
5623efebea
Merge pull request #65052 from dbdd4us/master
Automatic merge from submit-queue (batch tested with PRs 65052, 65594). 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 update node condition

**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 #65051

/area cloudprovider
/sig cluster-lifecycle

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-11 22:25:03 -07:00
Kubernetes Submit Queue
349d6a62db
Merge pull request #64226 from ddebroy/ddebroy-affinity1
Automatic merge from submit-queue (batch tested with PRs 64226, 65880). 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>.

Populate NodeAffinity on top of labels for cloud based PersistentVolumes

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

This PR populates the NodeAffinity field (on top of the existing labels) for PVs backed by cloud providers like EC2 EBS and GCE PD.

**Special notes for your reviewer**:
Related to https://github.com/kubernetes/kubernetes/pull/63232

Sample `describe pv` output for EBS with node affinity field populated:
```
kubectl describe pv pv0001
Name:              pv0001
Labels:            failure-domain.beta.kubernetes.io/region=us-west-2
                   failure-domain.beta.kubernetes.io/zone=us-west-2a
Annotations:       <none>
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      
Status:            Available
Claim:             
Reclaim Policy:    Retain
Access Modes:      RWO
Capacity:          5Gi
Node Affinity:     
  Required Terms:  
    Term 0:        failure-domain.beta.kubernetes.io/zone in [us-west-2a]
                   failure-domain.beta.kubernetes.io/region in [us-west-2]
Message:           
Source:
    Type:       AWSElasticBlockStore (a Persistent Disk resource in AWS)
    VolumeID:   vol-00cf03a068c62cbe6
    FSType:     ext4
    Partition:  0
    ReadOnly:   false
Events:         <none>
```

/sig storage
/assign @msau42

**Release note**:
```NONE```
2018-07-09 12:16:02 -07:00
morrislaw
45ab6d7a55 Improved logging message for checking if node is shutdown. 2018-07-03 09:34:42 -04:00
Deep Debroy
074dc6487b Populate NodeAffinity on top of labels for cloud based PersistentVolumes
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-06-26 19:48:03 -07:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00