Skip to content

Commit

Permalink
Merge pull request #129 from bderrly/vault-empty-data
Browse files Browse the repository at this point in the history
Fail if Vault data is empty
  • Loading branch information
danielfoehrKn authored Jul 9, 2024
2 parents b793fad + 3c0b5db commit 0965e19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/store/kubeconfig_store_vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ func (s *VaultStore) GetKubeconfigForPath(path string, _ map[string]string) ([]b
if err != nil {
return nil, fmt.Errorf("cannot read kubeconfig from %q: %v", secretsPath, err)
}
if len(bytes) == 0 {
s.Logger.Debugf("vault: data is empty from %q", secretsPath)
return nil, fmt.Errorf("kubeconfig is empty from %q", secretsPath)
}
return bytes, nil
}
}
Expand Down

0 comments on commit 0965e19

Please sign in to comment.