@@ -19,32 +19,32 @@ limitations under the License.
1919import (
2020 "fmt"
2121
22- "github.com/codefresh-io/venona/venonactl/pkg/store"
23- "github.com/codefresh-io/venona/venonactl/pkg/plugins"
2422 "github.com/codefresh-io/venona/venonactl/pkg/logger"
23+ "github.com/codefresh-io/venona/venonactl/pkg/plugins"
24+ "github.com/codefresh-io/venona/venonactl/pkg/store"
2525 "github.com/spf13/cobra"
2626 "github.com/spf13/viper"
2727)
2828
2929var installAgentCmdOptions struct {
30- dryRun bool
31- kube struct {
30+ dryRun bool
31+ kube struct {
3232 namespace string
3333 inCluster bool
3434 context string
3535 nodeSelector string
3636 }
37- venona struct {
37+ venona struct {
3838 version string
3939 }
40- agentToken string
41- agentID string
42- kubernetesRunnerType bool
43- tolerations string
40+ agentToken string
41+ agentID string
42+ kubernetesRunnerType bool
43+ tolerations string
4444}
4545
4646var installAgentCmd = & cobra.Command {
47- Use : "agent" ,
47+ Use : "agent" ,
4848 Short : "Install Codefresh's agent " ,
4949 Run : func (cmd * cobra.Command , args []string ) {
5050 s := store .GetStore ()
@@ -59,7 +59,7 @@ var installAgentCmd = &cobra.Command{
5959 cfAPIHost = "https://g.codefresh.io"
6060 }
6161 builderInstallOpt := & plugins.InstallOptions {
62- CodefreshHost : cfAPIHost ,
62+ CodefreshHost : cfAPIHost ,
6363 }
6464
6565 if installAgentCmdOptions .agentToken == "" {
@@ -93,10 +93,8 @@ var installAgentCmd = &cobra.Command{
9393 version := installAgentCmdOptions .venona .version
9494 lgr .Info ("Version set manually" , "version" , version )
9595 s .Image .Tag = version
96- s .Version .Latest .Version = version
9796 }
9897
99-
10098 kns , err := parseNodeSelector (installAgentCmdOptions .kube .nodeSelector )
10199 if err != nil {
102100 dieOnError (err )
@@ -107,7 +105,6 @@ var installAgentCmd = &cobra.Command{
107105 builderInstallOpt .KubeBuilder = getKubeClientBuilder (builderInstallOpt .ClusterName , s .KubernetesAPI .Namespace , s .KubernetesAPI .ConfigPath , s .KubernetesAPI .InCluster )
108106 builderInstallOpt .ClusterNamespace = s .KubernetesAPI .Namespace
109107
110-
111108 builder .Add (plugins .VenonaPluginType )
112109
113110 values := s .BuildValues ()
@@ -120,10 +117,9 @@ var installAgentCmd = &cobra.Command{
120117 lgr .Info ("Agent installation completed Successfully" )
121118
122119 },
123-
124120}
125121
126- func init () {
122+ func init () {
127123 installCommand .AddCommand (installAgentCmd )
128124
129125 viper .BindEnv ("kube-namespace" , "KUBE_NAMESPACE" )
@@ -141,12 +137,10 @@ func init() {
141137 installAgentCmd .Flags ().BoolVar (& installAgentCmdOptions .kubernetesRunnerType , "kubernetes-runner-type" , false , "Set the runner type to kubernetes (alpha feature)" )
142138}
143139
144-
145-
146- func fillCodefreshAPI (logger logger.Logger ) {
140+ func fillCodefreshAPI (logger logger.Logger ) {
147141 s := store .GetStore ()
148142 s .CodefreshAPI = & store.CodefreshAPI {
149- Host : cfAPIHost ,
143+ Host : cfAPIHost ,
150144 }
151-
152- }
145+
146+ }
0 commit comments