Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithunikzz committed Apr 15, 2024
1 parent a798bb8 commit 26af4f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions agent/kubviz/plugins/kubepreupgrade/kubePreUpgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var (
)
var result *model.Result

func publishK8sDepricatedDeletedApi(result *model.Result, js nats.JetStreamContext) error {
func publishK8sDepricatedDeletedAPI(result *model.Result, js nats.JetStreamContext) error {
for _, deprecatedAPI := range result.DeprecatedAPIs {
deprecatedAPI.ClusterName = ClusterName
deprecatedAPIJson, _ := json.Marshal(deprecatedAPI)
Expand Down Expand Up @@ -109,7 +109,7 @@ func KubePreUpgradeDetector(config *rest.Config, js nats.JetStreamContext) error
return err
}
result = getResults(config, kubernetesAPIs)
err = publishK8sDepricatedDeletedApi(result, js)
err = publishK8sDepricatedDeletedAPI(result, js)
return err
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

type Config struct {
DbPort int `envconfig:"DB_PORT" required:"true"`
DBPort int `envconfig:"DB_PORT" required:"true"`
DBAddress string `envconfig:"DB_ADDRESS" required:"true"`
ClickHouseUsername string `envconfig:"CLICKHOUSE_USERNAME"`
ClickHousePassword string `envconfig:"CLICKHOUSE_PASSWORD"`
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/config/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (cfg *Config) openClickHouseConn() (*sql.DB, error) {
if cfg.ClickHouseUsername != "" && cfg.ClickHousePassword != "" {
fmt.Println("Using provided username and password")
options = clickhouse.Options{
Addr: []string{fmt.Sprintf("%s:%d", cfg.DBAddress, cfg.DbPort)},
Addr: []string{fmt.Sprintf("%s:%d", cfg.DBAddress, cfg.DBPort)},
Debug: true,
Auth: clickhouse.Auth{
Username: cfg.ClickHouseUsername,
Expand All @@ -33,7 +33,7 @@ func (cfg *Config) openClickHouseConn() (*sql.DB, error) {
} else {
fmt.Println("Using connection without username and password")
options = clickhouse.Options{
Addr: []string{fmt.Sprintf("%s:%d", cfg.DBAddress, cfg.DbPort)},
Addr: []string{fmt.Sprintf("%s:%d", cfg.DBAddress, cfg.DBPort)},
}
}

Expand Down

0 comments on commit 26af4f5

Please sign in to comment.