Skip to content

Commit

Permalink
add cmd back
Browse files Browse the repository at this point in the history
  • Loading branch information
pacoxu committed Dec 14, 2020
1 parent f1b77cd commit f444ffd
Show file tree
Hide file tree
Showing 588 changed files with 96,200 additions and 0 deletions.
38 changes: 38 additions & 0 deletions cmd/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package(default_visibility = ["//visibility:public"])

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//cmd/clicheck:all-srcs",
"//cmd/cloud-controller-manager:all-srcs",
"//cmd/dependencycheck:all-srcs",
"//cmd/gendocs:all-srcs",
"//cmd/genkubedocs:all-srcs",
"//cmd/genman:all-srcs",
"//cmd/genswaggertypedocs:all-srcs",
"//cmd/genutils:all-srcs",
"//cmd/genyaml:all-srcs",
"//cmd/importverifier:all-srcs",
"//cmd/kube-apiserver:all-srcs",
"//cmd/kube-controller-manager:all-srcs",
"//cmd/kube-proxy:all-srcs",
"//cmd/kube-scheduler:all-srcs",
"//cmd/kubeadm:all-srcs",
"//cmd/kubectl:all-srcs",
"//cmd/kubectl-convert:all-srcs",
"//cmd/kubelet:all-srcs",
"//cmd/kubemark:all-srcs",
"//cmd/linkcheck:all-srcs",
"//cmd/preferredimports:all-srcs",
"//cmd/verifydependencies:all-srcs",
],
tags = ["automanaged"],
)
13 changes: 13 additions & 0 deletions cmd/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See the OWNERS docs at https://go.k8s.io/owners

reviewers:
- dchen1107
- lavalamp
- mikedanese
- thockin
- dims
approvers:
- dchen1107
- lavalamp
- mikedanese
- thockin
35 changes: 35 additions & 0 deletions cmd/clicheck/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package(default_visibility = ["//visibility:public"])

load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
)

go_binary(
name = "clicheck",
embed = [":go_default_library"],
)

go_library(
name = "go_default_library",
srcs = ["check_cli_conventions.go"],
importpath = "k8s.io/kubernetes/cmd/clicheck",
deps = [
"//staging/src/k8s.io/kubectl/pkg/cmd:go_default_library",
"//staging/src/k8s.io/kubectl/pkg/cmd/util/sanity:go_default_library",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
6 changes: 6 additions & 0 deletions cmd/clicheck/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# See the OWNERS docs at https://go.k8s.io/owners

approvers:
- sig-cli-maintainers
reviewers:
- sig-cli
50 changes: 50 additions & 0 deletions cmd/clicheck/check_cli_conventions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
Copyright 2016 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 main

import (
"fmt"
"io/ioutil"
"os"

"k8s.io/kubectl/pkg/cmd"
cmdsanity "k8s.io/kubectl/pkg/cmd/util/sanity"
)

func main() {
var errorCount int

kubectl := cmd.NewKubectlCommand(os.Stdin, ioutil.Discard, ioutil.Discard)
errors := cmdsanity.RunCmdChecks(kubectl, cmdsanity.AllCmdChecks, []string{})
for _, err := range errors {
errorCount++
fmt.Fprintf(os.Stderr, " %d. %s\n", errorCount, err)
}

errors = cmdsanity.RunGlobalChecks(cmdsanity.AllGlobalChecks)
for _, err := range errors {
errorCount++
fmt.Fprintf(os.Stderr, " %d. %s\n", errorCount, err)
}

if errorCount > 0 {
fmt.Fprintf(os.Stdout, "Found %d errors.\n", errorCount)
os.Exit(1)
}

fmt.Fprintln(os.Stdout, "Congrats, CLI looks good!")
}
37 changes: 37 additions & 0 deletions cmd/cloud-controller-manager/.import-restrictions
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
rules:
- selectorRegexp: k8s[.]io/kubernetes
allowedPrefixes:
- k8s.io/kubernetes/pkg/api/legacyscheme
- k8s.io/kubernetes/pkg/api/service
- k8s.io/kubernetes/pkg/api/v1/pod
- k8s.io/kubernetes/pkg/apis/apps
- k8s.io/kubernetes/pkg/apis/autoscaling
- k8s.io/kubernetes/pkg/apis/core
- k8s.io/kubernetes/pkg/apis/core/helper
- k8s.io/kubernetes/pkg/apis/core/install
- k8s.io/kubernetes/pkg/apis/core/pods
- k8s.io/kubernetes/pkg/apis/core/v1
- k8s.io/kubernetes/pkg/apis/core/v1/helper
- k8s.io/kubernetes/pkg/apis/core/validation
- k8s.io/kubernetes/pkg/apis/scheduling
- k8s.io/kubernetes/pkg/capabilities
- k8s.io/kubernetes/pkg/cluster/ports
- k8s.io/kubernetes/pkg/controller
- k8s.io/kubernetes/pkg/controller/nodeipam
- k8s.io/kubernetes/pkg/controller/nodeipam/config
- k8s.io/kubernetes/pkg/controller/nodeipam/ipam
- k8s.io/kubernetes/pkg/controller/nodeipam/ipam/cidrset
- k8s.io/kubernetes/pkg/controller/nodeipam/ipam/sync
- k8s.io/kubernetes/pkg/controller/nodeipam/ipam/test
- k8s.io/kubernetes/pkg/controller/testutil
- k8s.io/kubernetes/pkg/controller/util/node
- k8s.io/kubernetes/pkg/features
- k8s.io/kubernetes/pkg/fieldpath
- k8s.io/kubernetes/pkg/kubelet/types
- k8s.io/kubernetes/pkg/kubelet/util/format
- k8s.io/kubernetes/pkg/security/apparmor
- k8s.io/kubernetes/pkg/securitycontext
- k8s.io/kubernetes/pkg/util/hash
- k8s.io/kubernetes/pkg/util/node
- k8s.io/kubernetes/pkg/util/parsers
- k8s.io/kubernetes/pkg/util/taints
62 changes: 62 additions & 0 deletions cmd/cloud-controller-manager/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package(default_visibility = ["//visibility:public"])

load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
)
load("//staging/src/k8s.io/component-base/version:def.bzl", "version_x_defs")

go_binary(
name = "cloud-controller-manager",
embed = [":go_default_library"],
pure = "on",
x_defs = version_x_defs(),
)

go_library(
name = "go_default_library",
srcs = [
"main.go",
"nodeipamcontroller.go",
"providers.go",
],
importpath = "k8s.io/kubernetes/cmd/cloud-controller-manager",
deps = [
"//pkg/controller/nodeipam:go_default_library",
"//pkg/controller/nodeipam/config:go_default_library",
"//pkg/controller/nodeipam/ipam:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/util/feature:go_default_library",
"//staging/src/k8s.io/cloud-provider:go_default_library",
"//staging/src/k8s.io/cloud-provider/app:go_default_library",
"//staging/src/k8s.io/cloud-provider/app/config:go_default_library",
"//staging/src/k8s.io/cloud-provider/options:go_default_library",
"//staging/src/k8s.io/component-base/cli/flag:go_default_library",
"//staging/src/k8s.io/component-base/logs:go_default_library",
"//staging/src/k8s.io/component-base/metrics/prometheus/clientgo:go_default_library",
"//staging/src/k8s.io/component-base/metrics/prometheus/version:go_default_library",
"//staging/src/k8s.io/controller-manager/app:go_default_library",
"//staging/src/k8s.io/controller-manager/pkg/features:go_default_library",
"//staging/src/k8s.io/legacy-cloud-providers/aws:go_default_library",
"//staging/src/k8s.io/legacy-cloud-providers/azure:go_default_library",
"//staging/src/k8s.io/legacy-cloud-providers/gce:go_default_library",
"//staging/src/k8s.io/legacy-cloud-providers/openstack:go_default_library",
"//staging/src/k8s.io/legacy-cloud-providers/vsphere:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/k8s.io/klog/v2:go_default_library",
"//vendor/k8s.io/utils/net:go_default_library",
],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)
20 changes: 20 additions & 0 deletions cmd/cloud-controller-manager/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# See the OWNERS docs at https://go.k8s.io/owners

approvers:
- thockin
- luxas
- andrewsykim
- cheftako
- sttts
reviewers:
- thockin
- luxas
- andrewsykim
- cheftako
- stewart-yu
- sttts
emeritus_approvers:
- wlan0
labels:
- sig/api-machinery
- sig/cloud-provider
Loading

0 comments on commit f444ffd

Please sign in to comment.