Skip to content

Commit 168ccd4

Browse files
Saas 7138 fix codefresh url (#122)
* add support for custom codefresh host * bump version
1 parent a3c088f commit 168ccd4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "venona",
3-
"version": "1.2.3",
3+
"version": "1.2.4",
44
"description": "Codefresh agent to run on Codefresh's runtime environment and execute pipeline",
55
"main": "index.js",
66
"scripts": {

venonactl/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.3
1+
1.2.4

venonactl/cmd/install-monitor.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ import (
2727
var installMonitorAgentCmdOptions struct {
2828
kube struct {
2929
namespace string
30-
inCluster bool
3130
context string
3231
nodeSelector string
3332
}
3433
clusterId string
3534
helm3 bool
3635
codefreshToken string
36+
codefreshHost string
3737
}
3838

3939
// installK8sAgentCmd represents the install command
@@ -47,7 +47,7 @@ var installMonitorAgentCmd = &cobra.Command{
4747
lgr := createLogger("Install-monitor-agent", verbose)
4848
buildBasicStore(lgr)
4949
extendStoreWithKubeClient(lgr)
50-
fillKubernetesAPI(lgr, installMonitorAgentCmdOptions.kube.context, installMonitorAgentCmdOptions.kube.namespace, installMonitorAgentCmdOptions.kube.inCluster)
50+
fillKubernetesAPI(lgr, installMonitorAgentCmdOptions.kube.context, installMonitorAgentCmdOptions.kube.namespace, false)
5151

5252
builder := plugins.NewBuilder(lgr)
5353
builder.Add(plugins.MonitorAgentPluginType)
@@ -65,16 +65,16 @@ var installMonitorAgentCmd = &cobra.Command{
6565
s.ClusterId = installMonitorAgentCmdOptions.clusterId
6666
s.Helm3 = installMonitorAgentCmdOptions.helm3
6767

68-
if cfAPIHost == "" {
69-
cfAPIHost = "https://g.codefresh.io"
68+
if installMonitorAgentCmdOptions.codefreshHost == "" {
69+
installMonitorAgentCmdOptions.codefreshHost = "https://g.codefresh.io"
7070
}
7171

7272
if installMonitorAgentCmdOptions.codefreshToken == "" {
7373
dieOnError(fmt.Errorf("Codefresh token is required in order to install monitor"))
7474
}
7575

7676
s.CodefreshAPI = &store.CodefreshAPI{
77-
Host: cfAPIHost,
77+
Host: installMonitorAgentCmdOptions.codefreshHost,
7878
Token: installMonitorAgentCmdOptions.codefreshToken,
7979
}
8080

@@ -104,7 +104,7 @@ func init() {
104104
installMonitorAgentCmd.Flags().StringVar(&installMonitorAgentCmdOptions.clusterId, "clusterId", "", "Cluster Id")
105105
installMonitorAgentCmd.Flags().StringVar(&installMonitorAgentCmdOptions.codefreshToken, "codefreshToken", "", "Codefresh token")
106106

107-
installMonitorAgentCmd.Flags().BoolVar(&installMonitorAgentCmdOptions.kube.inCluster, "in-cluster", false, "Set flag if monitor is been installed from inside a cluster")
107+
installMonitorAgentCmd.Flags().StringVar(&installMonitorAgentCmdOptions.codefreshHost, "codefreshHost", "", "Override codefresh host if you use your own codefresh installation")
108108

109109
installMonitorAgentCmd.Flags().BoolVar(&installMonitorAgentCmdOptions.helm3, "helm3", false, "Set flag if cluster use helm3")
110110

0 commit comments

Comments
 (0)