Skip to content

Commit

Permalink
[helm] Add k8s fields to pydantic schema
Browse files Browse the repository at this point in the history
Summary: Adding more k8s fields to the pydantic schema, including `InitContainers` & `VolumeMounts`.

Test Plan: `helm lint` + bk

Reviewers: rexledesma, jordansanders

Reviewed By: rexledesma

Subscribers: johann

Differential Revision: https://dagster.phacility.com/D8439
  • Loading branch information
sidkmenon committed Jun 18, 2021
1 parent 8d5064f commit c6178f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def helm_steps() -> List[dict]:
supported_pythons=[SupportedPython.V3_8],
buildkite_label="dagster-helm-schema",
upload_coverage=False,
retries=2,
retries=4,
).get_tox_build_steps()

return tests
10 changes: 10 additions & 0 deletions helm/dagster/schema/schema/charts/utils/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ class Config:
schema_extra = {"$ref": create_definition_ref("io.k8s.api.core.v1.SecurityContext")}


class InitContainer(BaseModel):
class Config:
schema_extra = {"$ref": create_definition_ref("io.k8s.api.core.v1.Container")}


class Resources(BaseModel):
__root__: Dict[str, Any]

Expand Down Expand Up @@ -132,3 +137,8 @@ class Config:
class ConfigMapEnvSource(BaseModel):
class Config:
schema_extra = {"$ref": create_definition_ref("io.k8s.api.core.v1.ConfigMapEnvSource")}


class VolumeMount(BaseModel):
class Config:
schema_extra = {"$ref": create_definition_ref("io.k8s.api.core.v1.VolumeMount")}

0 comments on commit c6178f8

Please sign in to comment.