From 047186dd2a4a73f4d0fe22fcab8bd6653446b28a Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Mon, 16 Dec 2024 22:52:42 +0530 Subject: [PATCH] update --- cmd/installer.go | 8 ++++---- pkg/installer/installer.go | 11 +++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/cmd/installer.go b/cmd/installer.go index 1f2d5bd..24dbe49 100644 --- a/cmd/installer.go +++ b/cmd/installer.go @@ -115,12 +115,12 @@ var InstallOssCmd = &cobra.Command{ // printSuccessBanner remains the same as in the original code func printSuccessBanner(namespace, deployment, version, username, password string) { - var ingestionUrl, serviceName string + var ingestionURL, serviceName string if deployment == "standalone" { - ingestionUrl = "parseable." + namespace + ".svc.cluster.local" + ingestionURL = "parseable." + namespace + ".svc.cluster.local" serviceName = "parseable" } else if deployment == "distributed" { - ingestionUrl = "parseable-ingestor-svc." + namespace + ".svc.cluster.local" + ingestionURL = "parseable-ingestor-svc." + namespace + ".svc.cluster.local" serviceName = "parseable-query-svc" } @@ -143,7 +143,7 @@ func printSuccessBanner(namespace, deployment, version, username, password strin fmt.Printf("%s Deployment Details:\n", common.Blue+"ℹ️ ") fmt.Printf(" • Namespace: %s\n", common.Blue+namespace) fmt.Printf(" • Chart Version: %s\n", common.Blue+version) - fmt.Printf(" • Ingestion URL: %s\n", ingestionUrl) + fmt.Printf(" • Ingestion URL: %s\n", ingestionURL) fmt.Println("\n" + common.Blue + "🔗 Resources:" + common.Reset) fmt.Println(common.Blue + " • Documentation: https://www.parseable.com/docs/server/introduction") diff --git a/pkg/installer/installer.go b/pkg/installer/installer.go index 965d4a2..833fda6 100644 --- a/pkg/installer/installer.go +++ b/pkg/installer/installer.go @@ -33,7 +33,6 @@ func Installer(_ Plan) (values *ValuesHolder, chartValues []string) { } // pb supports only distributed deployments - deployment := "distributed" chartValues = append(chartValues, "parseable.highAvailability.enabled=true") // Prompt for namespace and credentials @@ -43,7 +42,7 @@ func Installer(_ Plan) (values *ValuesHolder, chartValues []string) { } // Prompt for agent deployment - agent, agentValues, err := promptAgentDeployment(chartValues, deployment, pbSecret.Namespace) + agent, agentValues, err := promptAgentDeployment(chartValues, distributed, pbSecret.Namespace) if err != nil { log.Fatalf("Failed to prompt for agent deployment: %v", err) } @@ -65,7 +64,7 @@ func Installer(_ Plan) (values *ValuesHolder, chartValues []string) { } valuesHolder := ValuesHolder{ - DeploymentType: deploymentType(deployment), + DeploymentType: distributed, ObjectStoreConfig: objectStoreConfig, LoggingAgent: loggingAgent(agent), ParseableSecret: *pbSecret, @@ -289,7 +288,7 @@ data: } // promptAgentDeployment prompts the user for agent deployment options -func promptAgentDeployment(chartValues []string, deployment, namespace string) (string, []string, error) { +func promptAgentDeployment(chartValues []string, deployment deploymentType, namespace string) (string, []string, error) { // Prompt for Agent Deployment type promptAgentSelect := promptui.Select{ Items: []string{string(fluentbit), string(vector), "I have my agent running / I'll set up later"}, @@ -308,9 +307,9 @@ func promptAgentDeployment(chartValues []string, deployment, namespace string) ( if agentDeploymentType == string(vector) { chartValues = append(chartValues, "vector.enabled=true") } else if agentDeploymentType == string(fluentbit) { - if deployment == string(standalone) { + if deployment == standalone { chartValues = append(chartValues, "fluent-bit.serverHost=parseable."+namespace+".svc.cluster.local") - } else if deployment == string(deployment) { + } else if deployment == distributed { chartValues = append(chartValues, "fluent-bit.serverHost=parseable-ingestor-service."+namespace+".svc.cluster.local") } chartValues = append(chartValues, "fluent-bit.enabled=true")