-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
pod_template
and pod_template_name
arguments for `PythonAutoC…
…ontainerTask`, its downstream tasks, and `@task`. (#1425) * Add `pod_template` and `pod_template_name` arguments for `PythonAutoContainerTask`, its downstream tasks, and `@task` Signed-off-by: byhsu <[email protected]> * clean Signed-off-by: byhsu <[email protected]> * fix test Signed-off-by: byhsu <[email protected]> * Fix taskmetadata Signed-off-by: byhsu <[email protected]> * add kubernetes in setup.py Signed-off-by: byhsu <[email protected]> * address comments Signed-off-by: byhsu <[email protected]> * Regenerate requirements using python 3.7 Signed-off-by: Eduardo Apolinario <[email protected]> Signed-off-by: byhsu <[email protected]> * keep container validation Signed-off-by: byhsu <[email protected]> * bump idl version Signed-off-by: byhsu <[email protected]> * Regenerate requirements using python 3.7 Signed-off-by: Eduardo Apolinario <[email protected]> * Regenerate doc-requirements.txt Signed-off-by: Eduardo Apolinario <[email protected]> * fix Signed-off-by: byhsu <[email protected]> --------- Signed-off-by: byhsu <[email protected]> Signed-off-by: Eduardo Apolinario <[email protected]> Co-authored-by: byhsu <[email protected]> Co-authored-by: Eduardo Apolinario <[email protected]>
- Loading branch information
1 parent
86fe324
commit 59574e5
Showing
20 changed files
with
885 additions
and
334 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from dataclasses import dataclass | ||
from typing import Dict, Optional | ||
|
||
from kubernetes.client.models import V1PodSpec | ||
|
||
from flytekit.exceptions import user as _user_exceptions | ||
|
||
PRIMARY_CONTAINER_DEFAULT_NAME = "primary" | ||
|
||
|
||
@dataclass | ||
class PodTemplate(object): | ||
pod_spec: V1PodSpec = V1PodSpec(containers=[]) | ||
primary_container_name: str = PRIMARY_CONTAINER_DEFAULT_NAME | ||
labels: Optional[Dict[str, str]] = None | ||
annotations: Optional[Dict[str, str]] = None | ||
|
||
def __post_init__(self): | ||
if not self.primary_container_name: | ||
raise _user_exceptions.FlyteValidationException("A primary container name cannot be undefined") |
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
Oops, something went wrong.