Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
Signed-off-by: jnathangreeg <[email protected]>
  • Loading branch information
jnathangreeg committed Aug 25, 2024
1 parent 0ab9bb5 commit 2193a1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admission/rules/v1/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func resolveJob(ownerRef metav1.OwnerReference, namespace string, clientset kube
return "Job", ownerRef.Name, namespace
}

// GetContainerNameFromEvent returns the container name from the admission event.
// getContainerNameFromExecToPodEvent returns the container name from the admission event for exec operations.
func getContainerNameFromExecToPodEvent(event admission.Attributes) string {
if event.GetSubresource() == "exec" {
if obj := event.GetObject(); obj != nil {
Expand All @@ -86,7 +86,7 @@ func getContainerNameFromExecToPodEvent(event admission.Attributes) string {
return ""
}

// GetContainerNameFromPortForwardEvent returns the container name from the admission event.
// getContainerNameFromPortForwardEvent returns the container name from the admission event for port-forward operations.
func getContainerNameFromPortForwardEvent(event admission.Attributes) string {
if event.GetSubresource() == "portforward" {
if obj := event.GetObject(); obj != nil {
Expand Down

0 comments on commit 2193a1f

Please sign in to comment.