Skip to content

Commit

Permalink
Update cmd/vault-secrets-webhook/secret.go
Browse files Browse the repository at this point in the history
Co-Authored-By: Balint Molnar <balintmolnar91@gmail.com>
  • Loading branch information
bonifaido and baluchicken committed Jun 3, 2019
1 parent 15322f6 commit 3fbabd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/vault-secrets-webhook/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func mutateDockerCreds(secret *corev1.Secret, dc *dockerCreds, vaultConfig vault
if strings.HasPrefix(string(creds.Auth), "vault:") {
logger.Debugf("auth %s %s", key, creds.Auth)
split := strings.Split(creds.Auth, ":")
if len(split) < 4 {
if len(split) != 4 {
return errors.New("splitting auth credentials failed")
}
username := fmt.Sprintf("%s:%s", split[0], split[1])
Expand Down

0 comments on commit 3fbabd9

Please sign in to comment.