File tree Expand file tree Collapse file tree 4 files changed +37
-6
lines changed
lib/interface/cli/commands/argocd Expand file tree Collapse file tree 4 files changed +37
-6
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,25 @@ const installArgoCmd = new Command({
15
15
weight : 100 ,
16
16
} ,
17
17
builder : yargs => yargs
18
- . env ( 'CF_ARG_' ) ,
19
- handler : async ( ) => {
18
+ . env ( 'CF_ARG_' )
19
+ . option ( 'kube-config-path' , {
20
+ describe : 'Path to kubeconfig file (default is $HOME/.kube/config)' ,
21
+ } ) ,
22
+ handler : async ( argv ) => {
23
+ const { 'kube-config-path' : kubeConfigPath } = argv ;
24
+
20
25
const binLocation = await downloadArgo ( ) ;
21
26
const componentRunner = new Runner ( binLocation ) ;
22
27
23
28
const commands = [
24
29
'install' ,
25
30
] ;
26
31
32
+ if ( kubeConfigPath ) {
33
+ commands . push ( '--kubeconfig' ) ;
34
+ commands . push ( kubeConfigPath ) ;
35
+ }
36
+
27
37
await componentRunner . run ( components . argo , commands ) ;
28
38
} ,
29
39
} ) ;
Original file line number Diff line number Diff line change @@ -16,19 +16,29 @@ const command = new Command({
16
16
} ,
17
17
builder : ( yargs ) => {
18
18
yargs
19
+ . option ( 'kube-config-path' , {
20
+ describe : 'Path to kubeconfig file (default is $HOME/.kube/config)' ,
21
+ } )
19
22
. example (
20
23
'codefresh patch argocd-agent' ,
21
24
'Update argocd-agent' ,
22
25
) ;
23
26
} ,
24
- handler : async ( ) => {
27
+ handler : async ( argv ) => {
28
+ const { 'kube-config-path' : kubeConfigPath } = argv ;
29
+
25
30
const binLocation = await downloadArgo ( ) ;
26
31
const componentRunner = new Runner ( binLocation ) ;
27
32
28
33
const commands = [
29
34
'update' ,
30
35
] ;
31
36
37
+ if ( kubeConfigPath ) {
38
+ commands . push ( '--kubeconfig' ) ;
39
+ commands . push ( kubeConfigPath ) ;
40
+ }
41
+
32
42
await componentRunner . run ( components . argo , commands ) ;
33
43
} ,
34
44
} ) ;
Original file line number Diff line number Diff line change @@ -16,13 +16,24 @@ const unInstallAgentCmd = new Command({
16
16
weight : 100 ,
17
17
} ,
18
18
builder : yargs => yargs
19
- . env ( 'CF_ARG_' ) ,
20
- handler : async ( ) => {
19
+ . env ( 'CF_ARG_' )
20
+ . option ( 'kube-config-path' , {
21
+ describe : 'Path to kubeconfig file (default is $HOME/.kube/config)' ,
22
+ } ) ,
23
+ handler : async ( argv ) => {
24
+ const { 'kube-config-path' : kubeConfigPath } = argv ;
25
+
21
26
const binLocation = await downloadArgo ( ) ;
22
27
const componentRunner = new Runner ( binLocation ) ;
23
28
const commands = [
24
29
'uninstall' ,
25
30
] ;
31
+
32
+ if ( kubeConfigPath ) {
33
+ commands . push ( '--kubeconfig' ) ;
34
+ commands . push ( kubeConfigPath ) ;
35
+ }
36
+
26
37
await componentRunner . run ( components . argo , commands ) ;
27
38
} ,
28
39
} ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.72.6 " ,
3
+ "version" : " 0.72.7 " ,
4
4
"description" : " Codefresh command line utility" ,
5
5
"main" : " index.js" ,
6
6
"preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments