Skip to content

Commit

Permalink
Nits
Browse files Browse the repository at this point in the history
Signed-off-by: Maia Iyer <[email protected]>
  • Loading branch information
maia-iyer committed Oct 10, 2024
1 parent 1ab19c6 commit f69bda9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@ func NewAgentsDB(dbPlugin *ast.ObjectItem) (agentdb.AgentDB, error) {
}

// NewCRDManager returns ...
func NewCRDManager(crdPlugin &ast.ObjectItem) (string, error) {
func NewCRDManager(crdPlugin *ast.ObjectItem) (string, error) {
_, data, _ := getPluginConfig(crdPlugin)

// check if data is defined
if data == nil {
return nil, errors.New("SPIREControllerManager plugin ('config > plugins > SPIREControllerManager > plugin_data') not populated")
return "", errors.New("SPIREControllerManager plugin ('config > plugins > SPIREControllerManager > plugin_data') not populated")
}
// decode config to struct
var config pluginControllerManager
if err := hcl.DecodeObject(&config, data); err != nil {
return nil, errors.Errorf("Couldn't parse SPIREControllerManager config: %v", err)
return "", errors.Errorf("Couldn't parse SPIREControllerManager config: %v", err)
}

fmt.Println("CRD Controller configured. WARNING: This is currently a no-op")
Expand Down Expand Up @@ -268,9 +268,9 @@ func (s *Server) Configure() error {
}
// configure controller maanger CRD management
case "SPIREControllerManager":
s.CRDManger, err = NewCRDManager(pluginObject)
s.CRDManager, err = NewCRDManager(pluginObject)
if err != nil {
return errors.Errorf("Cannot configure CRD management plugin: %v")
return errors.Errorf("Cannot configure CRD management plugin: %v", err)
}
// configure Authenticator
case "Authenticator":
Expand Down

0 comments on commit f69bda9

Please sign in to comment.