Skip to content

Commit

Permalink
Merge pull request #51 from boxboat/fix-vault-auth
Browse files Browse the repository at this point in the history
Set AuthType for vault
  • Loading branch information
matthewdevenny authored May 31, 2023
2 parents 01310aa + 1242b93 commit ce917b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/v2/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,12 +674,12 @@ func (h *Handler) getProfileFuncMap(profile *dockhand.Profile) (template.FuncMap
}
}
if roleID != "" && secretID != "" {
opts = append(opts, vault.RoleAndSecretID(roleID, secretID))
opts = append(opts, vault.RoleAndSecretID(roleID, secretID), vault.AuthType(vault.RoleAuth))
}
if profile.Vault.TokenRef != nil {
if secretData, err := h.secrets.Get(profile.Namespace, profile.Vault.TokenRef.Name, metav1.GetOptions{}); err == nil {
if secretData != nil {
opts = append(opts, vault.Token(string(secretData.Data[profile.Vault.TokenRef.Key])))
opts = append(opts, vault.Token(string(secretData.Data[profile.Vault.TokenRef.Key])), vault.AuthType(vault.RoleAuth))
}
} else {
return nil, err
Expand Down

0 comments on commit ce917b9

Please sign in to comment.