Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request involves significant changes focused on removing the
secretsmgr
dependency from theconfigmgr
package and enhancing thesecretsmgr
package functionality. The most important changes include updating theNew
function signatures, modifying thePolicyManager
to handle secrets, and adding a polling mechanism for secrets in thevaultManager
.Removal of
secretsmgr
dependency fromconfigmgr
:agent/agent.go
: Removed thesecretsmgr
dependency from theconfigmgr
initialization and updated theNew
function to reflect this change. [1] [2]agent/configmgr/git.go
: Removed thesecretsmgr
import and the associatedsMgr
field and methods. [1] [2] [3]agent/configmgr/local.go
: Removed thesecretsmgr
import and the associatedsMgr
field and methods. [1] [2]agent/configmgr/manager.go
: Updated theNew
function to remove thesecretsmgr
parameter and adjusted the initialization logic accordingly. [1] [2]Enhancements to
secretsmgr
:agent/secretsmgr/manager.go
: Modified theRegisterUpdateCallback
to use a map of policy IDs and added a log message for when no secrets manager is specified. [1] [2] [3]agent/secretsmgr/vault.go
: Introduced a polling mechanism for secrets and added a token lifecycle watcher to handle token renewal. [1] [2] [3] [4] [5]Modifications to
PolicyManager
:agent/policymgr/manager.go
: Updated thePolicyManager
to include thesecretsmgr
and handle secrets within policy management. Added a callback for policy changes and updated theManagePolicy
method to solve secrets. [1] [2] [3] [4]These changes streamline the configuration management process by decoupling the secrets management and enhancing the handling of secrets within the
PolicyManager
.