Skip to content

Commit

Permalink
Fail is Vault data is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
bderrly committed Jun 25, 2024
1 parent b793fad commit 3c0b5db
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 3c0b5db

Please sign in to comment.