-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the way we figure out container to read the artifacts from #2310
Conversation
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.
Thanks for submitting this pull request 🎉. The team will review it soon and get back to you. If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document. |
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.
@kale-amruta FYI, I have added some code related to repo server as well. |
@pavannd1 the main change is in |
/ok-to-test |
Change Overview
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 PR 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 creatingpodOptions
we will use default container name everywhere otherwise we will use the container name that is specified in the podOptions.Pull request type
Please check the type of change your PR introduces:
Issues
Test Plan