Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/extended/util/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,11 @@ func DumpPodLogs(pods []corev1.Pod, oc *CLI) {
for _, pod := range pods {
descOutput, err := oc.AsAdmin().Run("describe").WithoutNamespace().Args("pod/"+pod.Name, "-n", pod.Namespace).Output()
if err == nil {
if strings.Contains(descOutput, "BEGIN PRIVATE KEY") {
// replace private key with XXXXX string
re := regexp.MustCompile(`BEGIN\s+PRIVATE\s+KEY[\s\S]*END\s+PRIVATE\s+KEY`)
descOutput = re.ReplaceAllString(descOutput, "XXXXXXXXXXXXXX")
}
e2e.Logf("Describing pod %q\n%s\n\n", pod.Name, descOutput)
} else {
e2e.Logf("Error retrieving description for pod %q: %v\n\n", pod.Name, err)
Expand Down