-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add options to KubernetesPodOperator #30992
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
Conversation
6eeae2e to
1d18d28
Compare
|
Sorry about that, the tests were failing before, but now they all pass. |
| security_context: dict | None = None, | ||
| container_security_context: dict | None = None, | ||
| dnspolicy: str | None = None, | ||
| dns_config: dict | None = None, |
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.
Kube has a type for this right?
| dns_config: dict | None = None, | |
| dns_config: V1PodDNSConfig | None = None, |
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.
Good catch, I have pushed changes to reflect this.
| ) | ||
|
|
||
| @patch(HOOK_CLASS, new=MagicMock) | ||
| def test_pod_additional_options(self): |
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: something about this test name seems too generic, maybe:
| def test_pod_additional_options(self): | |
| def test_pod_dns_options(self): |
| dns_config: k8s.V1PodDNSConfig | None = None, | ||
| hostname: str | None = None, | ||
| subdomain: str | None = None, |
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.
Can you please add these parameters to the docstring above?
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.
Good catch, I had forgotten to add them. I have added them now.
|
Hi everyone, I was wondering if there was anything else I should add to this PR or if these changes look good? |
Address #30851
I have added the following options to the kubernetes pod operator:
--dns,--dns-searches, and--dns-optarguments for docker run--hostnameargument for docker run