Skip to content

Commit 9fa6f3c

Browse files
committed
solving DCO issue
Signed-off-by: Rohit27 <137439791+GitNinja36@users.noreply.github.com>
1 parent a4fce89 commit 9fa6f3c

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

go.mod

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@ require (
1010
)
1111

1212
require (
13-
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
14-
github.com/russross/blackfriday/v2 v2.1.0 // indirect
1513
github.com/tidwall/gjson v1.14.2 // indirect
1614
github.com/tidwall/match v1.1.1 // indirect
1715
github.com/tidwall/pretty v1.2.0 // indirect
18-
gopkg.in/yaml.v3 v3.0.1 // indirect
1916
)
2017

2118
require (

go.sum

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
21
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
32
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
43
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
54
github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o=
65
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
76
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
87
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
9-
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
108
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
119
github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
1210
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
@@ -25,7 +23,6 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
2523
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
2624
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
2725
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
28-
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
2926
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
3027
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
3128
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=

pkg/internal/kubernetes-operation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func ApplyKubectlManifest(fileName, namespace string, cluster *Cluster) {
8080
}
8181
}
8282

83-
func GetKubectlResources(resourceType string, resourceName string, namespace string, cluster *Cluster, outputFormat string) {
83+
var GetKubectlResources = func(resourceType string, resourceName string, namespace string, cluster *Cluster, outputFormat string) {
8484
cmdArgs := []string{}
8585
if cluster != nil {
8686
cmdArgs = append(cmdArgs, "--context="+cluster.ContextName, "--kubeconfig="+cluster.KubeConfigPath)

pkg/internal/secrets.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package internal
22

33
import (
44
"bytes"
5+
"os"
56
"os/exec"
67
"strings"
78
"time"
@@ -20,7 +21,11 @@ func GetSecretName(workerName string, namespace string, controllerCluster *Clust
2021
cmdArgs := []string{}
2122
cmdArgs = append(cmdArgs, "get", SecretObject, "-n", namespace)
2223
var outB bytes.Buffer
23-
c1 := exec.Command("/home/excellarate/.local/bin/kubectl", cmdArgs...)
24+
kubectlPath := os.Getenv("KUBECTL_PATH")
25+
if kubectlPath == "" {
26+
kubectlPath = "/home/excellarate/.local/bin/kubectl"
27+
}
28+
c1 := exec.Command(kubectlPath, cmdArgs...)
2429
c2 := exec.Command("grep", "worker-"+workerName)
2530
c3 := exec.Command("awk", "{print $1}")
2631
c2.Stdin, _ = c1.StdoutPipe()

0 commit comments

Comments
 (0)