feat(workers): Add storage path parameter to worker config
This commit is contained in:
1 parent
8ebb8d1477
commit
898da56a77
2 files changed
+5
-1
No files matched your search
@@ -187,6 +187,9 @@ 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.
|
||||
StoragePath string `hcl:"storage_path"`
|
||||
}
|
||||
|
||||
func (w *Worker) InitNameIfEmpty() (string, error) {
|
||||
|
||||
@@ -180,7 +180,8 @@ func (w *Worker) Start() error {
|
||||
}
|
||||
|
||||
var err error
|
||||
w.NodeeFileStorage, err = nodeefile.NewFileStorage(w.baseContext)
|
||||
w.NodeeFileStorage, err = nodeefile.NewFileStorage(w.baseContext,
|
||||
nodeefile.WithFileStorageBaseDirectory(w.conf.RawConfig.Worker.StoragePath))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user