mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #56410 from stewart-yu/cloudeprovider-fixcloudnil
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>. If cloud==nil, it should exits to avoid Panic **What this PR does / why we need it**: If `cloud == nil`, it should exits, otherwise `cloud.HasClusterID()` will panic. **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 # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
e1ee105bba
@ -93,6 +93,10 @@ func Run(s *options.CloudControllerManagerServer) error {
|
||||
glog.Fatalf("Cloud provider could not be initialized: %v", err)
|
||||
}
|
||||
|
||||
if cloud == nil {
|
||||
glog.Fatalf("cloud provider is nil")
|
||||
}
|
||||
|
||||
if cloud.HasClusterID() == false {
|
||||
if s.AllowUntaggedCloud == true {
|
||||
glog.Warning("detected a cluster without a ClusterID. A ClusterID will be required in the future. Please tag your cluster to avoid any future issues")
|
||||
|
Loading…
Reference in New Issue
Block a user