Merge pull request #93579 from liggitt/providerless

Fix verify-typecheck-providerless
This commit is contained in:
Kubernetes Prow Robot 2020-07-30 12:31:07 -07:00 committed by GitHub
commit d3c1e81d5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 67 additions and 10 deletions

View File

@ -16,7 +16,10 @@ go_binary(
go_library(
name = "go_default_library",
srcs = ["controller-manager.go"],
srcs = [
"controller-manager.go",
"providers.go",
],
importpath = "k8s.io/kubernetes/cmd/cloud-controller-manager",
deps = [
"//cmd/cloud-controller-manager/app:go_default_library",

View File

@ -27,15 +27,8 @@ import (
"k8s.io/component-base/logs"
"k8s.io/kubernetes/cmd/cloud-controller-manager/app"
_ "k8s.io/component-base/metrics/prometheus/version" // for version metric registration
// NOTE: Importing all in-tree cloud-providers is not required when
// implementing an out-of-tree cloud-provider.
_ "k8s.io/component-base/metrics/prometheus/clientgo" // load all the prometheus client-go plugins
_ "k8s.io/legacy-cloud-providers/aws"
_ "k8s.io/legacy-cloud-providers/azure"
_ "k8s.io/legacy-cloud-providers/gce"
_ "k8s.io/legacy-cloud-providers/openstack"
_ "k8s.io/legacy-cloud-providers/vsphere"
_ "k8s.io/component-base/metrics/prometheus/version" // for version metric registration
)
func main() {

View File

@ -0,0 +1,32 @@
// +build !providerless
/*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// The external controller manager is responsible for running controller loops that
// are cloud provider dependent. It uses the API to listen to new events on resources.
package main
import (
// NOTE: Importing all in-tree cloud-providers is not required when
// implementing an out-of-tree cloud-provider.
_ "k8s.io/legacy-cloud-providers/aws"
_ "k8s.io/legacy-cloud-providers/azure"
_ "k8s.io/legacy-cloud-providers/gce"
_ "k8s.io/legacy-cloud-providers/openstack"
_ "k8s.io/legacy-cloud-providers/vsphere"
)

View File

@ -1,3 +1,5 @@
// +build !providerless
/*
Copyright 2019 The Kubernetes Authors.

View File

@ -1,3 +1,5 @@
// +build !providerless
/*
Copyright 2018 The Kubernetes Authors.
@ -23,7 +25,7 @@ import (
"strings"
"testing"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/informers"
"k8s.io/client-go/kubernetes/fake"

View File

@ -11,6 +11,7 @@ go_library(
srcs = [
"azure_acr_helper.go",
"azure_credentials.go",
"doc.go",
],
importpath = "k8s.io/kubernetes/pkg/credentialprovider/azure",
deps = [

View File

@ -1,3 +1,5 @@
// +build !providerless
/*
Copyright 2016 The Kubernetes Authors.

View File

@ -1,3 +1,5 @@
// +build !providerless
/*
Copyright 2016 The Kubernetes Authors.

View File

@ -1,3 +1,5 @@
// +build !providerless
/*
Copyright 2016 The Kubernetes Authors.

View File

@ -0,0 +1,17 @@
/*
Copyright 2020 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package azure

View File

@ -297,6 +297,7 @@ func main() {
errors, err := c.verify(plat)
if err != nil {
serialFprintf(os.Stderr, "ERROR(%s): failed to verify: %v\n", plat, err)
f = true
} else if len(errors) > 0 {
for _, e := range errors {
// Special case CGo errors which may depend on headers we