-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the way we figure out container to read the artifacts from (#2310
) * Change how we figure out container to get logs from While running the kanister function, to read the artifact that the phase has produced we get the logs of the kanister function pod (let's say `KubeTask`). If there is just one container in the KubeTask pod in that case things would work but if there are multiple contianers in the pod (let's say service mesh injected one), in that case the logic that we have to figure out the container name was not efficient. If was relying on the first container of the pod. This commit changes that logic to read the container name from `podOptions` or fallback to the default container name. This should work in all the cases, if container name is not specified while creating `podOptions` we will use default container name everywhere otherwise we will use the container name that is spec ified in the podOptions. * Remove duplicate code that was overreding container name * Export the util fun `containerNameFromPodOpts` * Figure out container name from podOptions while creating repo server pod When we create pod for a repo server CR, we try to figure out the `podOverride` which added (I am not sure why) a container with hardcoded name. This commit changes that and we figure out the container name from podOptions now. * Rename `ContainerNameFromPodOpts` to `ContainerNameFromPodOptsOrDefault` * Move `ContainerNameFromPodOpts` from `pod_controller.go` to `pod.go` --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
535baf7
commit 86c1668
Showing
5 changed files
with
53 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters