Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Fix Kafka Channel dispatcher ownerRef #1536

Merged
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix Kafka Channel dispatcher ownerRef
  • Loading branch information
aliok committed Sep 9, 2020
commit 9bb36bed0d2606c45affcf82c3128a51d027f0c4
2 changes: 1 addition & 1 deletion kafka/channel/pkg/utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TopicName(separator, namespace, name string) string {
}

func FindContainer(d *appsv1.Deployment, containerName string) *corev1.Container {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find a function like this in the codebase. Any pointers?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hrm...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

@aliok aliok Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/hold
Ok, looks like I need to write some unit tests for this function I created...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/unhold

Done with unit tests.
Next time I need this, I will refactor it into a function in knative/pkg

for i, _ := range d.Spec.Template.Spec.Containers {
for i := range d.Spec.Template.Spec.Containers {
if d.Spec.Template.Spec.Containers[i].Name == containerName {
return &d.Spec.Template.Spec.Containers[i]
}
Expand Down