-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Specify namespace when creating pod #19399
Specify namespace when creating pod #19399
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe what we need is to specify node selectors when creating the orchestrator pod, which is different from specifying the kubernetes namespace
in KubePodProcess we are already setting tolerations and selectors here airbyte/airbyte-commons-worker/src/main/java/io/airbyte/workers/process/KubePodProcess.java Lines 510 to 512 in ebbe5a9
So I believe what is happening is that in the container orchestrator app we are setting the tolerations and nodeSelectors properly when calling the KubePodProcess constructor, but when creating the actual orchestrator pods (which I believe should happen in the worker app) we are not setting these configs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks!
I think we should support pod tolerations as well for completeness, but for our own cluster setup we don't need it so I'll approve this PR as is so we can get it deployed.
We should add pod toleration support though, if not in this PR then in a follow up.
@@ -352,11 +353,13 @@ public void create(final Map<String, String> allLabels, | |||
.withContainers(mainContainer) | |||
.withInitContainers(initContainer) | |||
.withVolumes(volumes) | |||
.withNodeSelector(nodeSelectors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should include tolerations as well like in KubePodProcess
airbyte/airbyte-commons-worker/src/main/java/io/airbyte/workers/process/KubePodProcess.java
Line 510 in ebbe5a9
final Pod pod = podBuilder.withTolerations(buildPodTolerations(tolerations)) |
However, our current node pools don't actually use taints, so we don't need tolerations for this to work for our own cluster. In general though, we should include it (maybe in a separate followup PR. buildPodTolerations
looks like a private method though it should be easy to extract out of KubePodProcess
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this!
.endSpec() | ||
.build(); | ||
|
||
// should only create after the kubernetes API creates the pod | ||
final var createdPod = kubernetesClient.pods() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra newline
Ok, I'll do it in a follow up. |
the build seems to fail because of: https://airbytehq-team.slack.com/archives/C046KQF5GBT/p1668531356052829 |
* Specify namespace when creating pof * PR comments * rm new line * Fix micronaut injection
What
specify the namespace (pool) when creating a new pod