Skip to content

Commit

Permalink
Revert unnecesarry specification of PodName
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Feb 13, 2024
1 parent cb13cb5 commit 98e60c8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions hack/benchmark/internal/starter/agent/core/ngt/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ var defaultOptions = []Option{
Enabled: false,
},
NGT: &iconfig.NGT{
PodName: "vald-agent-ngt-0",
PodNamespace: "default",
Dimension: 0,
DistanceType: "unknown",
ObjectType: "unknown",
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/core/ngt/service/ngt.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const (
)

func New(cfg *config.NGT, opts ...Option) (nn NGT, err error) {
if cfg.PodName == "" {
if cfg.PodName == "" && cfg.EnableExportIndexInfoToK8s {
return nil, errors.New("pod_name is empty. this must be set either from environment variable or from config file")
}

Check warning on line 174 in pkg/agent/core/ngt/service/ngt.go

View check run for this annotation

Codecov / codecov/patch

pkg/agent/core/ngt/service/ngt.go#L173-L174

Added lines #L173 - L174 were not covered by tests
n := &ngt{
Expand Down
1 change: 0 additions & 1 deletion pkg/agent/core/ngt/service/ngt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ var defaultConfig = config.NGT{
},
BrokenIndexHistoryLimit: 1,
ErrorBufferLimit: 100,
PodName: "vald-agent-ngt-test",
}

type index struct {
Expand Down

0 comments on commit 98e60c8

Please sign in to comment.