Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
nitisht committed Dec 16, 2024
1 parent 80b4399 commit 047186d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
8 changes: 4 additions & 4 deletions cmd/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand All @@ -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")
Expand Down
11 changes: 5 additions & 6 deletions pkg/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
Expand All @@ -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,
Expand Down Expand Up @@ -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"},
Expand All @@ -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")
Expand Down

0 comments on commit 047186d

Please sign in to comment.