mirror of
https://codeberg.org/crowci/crow.git
synced 2025-08-09 07:42:52 +03:00
cspell lint go code (#3706)
This commit is contained in:
@@ -23,7 +23,7 @@ import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
client_cmd "k8s.io/client-go/tools/clientcmd"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -65,15 +65,15 @@ func isImagePullBackOffState(pod *v1.Pod) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// getClientOutOfCluster returns a k8s clientset to the request from outside of cluster.
|
||||
// getClientOutOfCluster returns a k8s client set to the request from outside of cluster.
|
||||
func getClientOutOfCluster() (kubernetes.Interface, error) {
|
||||
kubeConfigPath := os.Getenv("KUBECONFIG")
|
||||
kubeConfigPath := os.Getenv("KUBECONFIG") // cspell:words KUBECONFIG
|
||||
if kubeConfigPath == "" {
|
||||
kubeConfigPath = os.Getenv("HOME") + "/.kube/config"
|
||||
}
|
||||
|
||||
// use the current context in kubeconfig
|
||||
config, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath)
|
||||
// use the current context in kube config
|
||||
config, err := client_cmd.BuildConfigFromFlags("", kubeConfigPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -81,7 +81,7 @@ func getClientOutOfCluster() (kubernetes.Interface, error) {
|
||||
return kubernetes.NewForConfig(config)
|
||||
}
|
||||
|
||||
// getClient returns a k8s clientset to the request from inside of cluster.
|
||||
// getClient returns a k8s client set to the request from inside of cluster.
|
||||
func getClientInsideOfCluster() (kubernetes.Interface, error) {
|
||||
config, err := rest.InClusterConfig()
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user