diff --git a/internal/cmd/config/config.go b/internal/cmd/config/config.go index e5282b6b4..4d45c617a 100644 --- a/internal/cmd/config/config.go +++ b/internal/cmd/config/config.go @@ -196,8 +196,8 @@ type Worker struct { // TODO: This field is currently internal. StatusGracePeriodDuration time.Duration `hcl:"-"` - // StoragePath represents the location a pki worker stores its node credentials, if set. - AuthStoragePath string `hcl:"storage_path"` + // AuthStoragePath represents the location a worker stores its node credentials, if set + AuthStoragePath string `hcl:"auth_storage_path"` } func (w *Worker) InitNameIfEmpty() (string, error) { diff --git a/internal/cmd/config/config_test.go b/internal/cmd/config/config_test.go index 570a71503..6efbf8d2f 100644 --- a/internal/cmd/config/config_test.go +++ b/internal/cmd/config/config_test.go @@ -423,7 +423,7 @@ func TestDevWorkerCredentialStorageDir(t *testing.T) { tags { type = ["dev", "local"] } - storage_path = ".." + auth_storage_path = ".." } `, storagePath: "..", @@ -442,7 +442,7 @@ func TestDevWorkerCredentialStorageDir(t *testing.T) { tags { type = ["dev", "local"] } - storage_path = "nonexistent_dir/here" + auth_storage_path = "nonexistent_dir/here" } `, storagePath: "nonexistent_dir/here", diff --git a/internal/daemon/worker/worker.go b/internal/daemon/worker/worker.go index cae39f101..b4d5d417c 100644 --- a/internal/daemon/worker/worker.go +++ b/internal/daemon/worker/worker.go @@ -184,13 +184,6 @@ func (w *Worker) Start() error { controllerResolver := manual.NewBuilderWithScheme(scheme) w.controllerResolver.Store(controllerResolver) - var err error - w.NodeeFileStorage, err = nodeefile.NewFileStorage(w.baseContext, - nodeefile.WithBaseDirectory(w.conf.RawConfig.Worker.AuthStoragePath)) - if err != nil { - return err - } - if err := w.startListeners(); err != nil { return fmt.Errorf("error starting worker listeners: %w", err) }