Skip to content

Commit

Permalink
Merge pull request #322 from kazvictor/fall_back_on_generateName_is_p…
Browse files Browse the repository at this point in the history
…od_name_is_unavailable

Fix: Fallback to the Pod generated name when creating a secret for an unnamed pod
  • Loading branch information
181192 authored Apr 18, 2022
2 parents b42779a + ce55e30 commit 8608ec7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/azure-keyvault-secrets-webhook/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ func (a AuthService) NewPodSecret(pod *corev1.Pod, namespace string, mutationID
} else {
name = ownerReferences[0].Name
}
} else {
name = pod.GetGenerateName()
}
}

Expand Down

0 comments on commit 8608ec7

Please sign in to comment.