-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom env variables for model builder (#1100)
* pydantic * WORKFLOW_GENERATOR_CUSTOM_MODEL_BUILDER_ENVS * Black reformating
- Loading branch information
Showing
6 changed files
with
88 additions
and
26 deletions.
There are no files selected for viewing
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 typing import Optional, Union | ||
from pydantic import BaseModel | ||
|
||
ValueType = Union[str, int, float, bool] | ||
|
||
|
||
class RefValue(BaseModel): | ||
name: str | ||
key: str | ||
|
||
|
||
class ValueFrom(BaseModel): | ||
configMapKeyRef: Optional[RefValue] | ||
secretKeyRef: Optional[RefValue] | ||
|
||
|
||
class CustomEnv(BaseModel): | ||
name: str | ||
value: Optional[ValueType] | ||
valueFrom: Optional[ValueFrom] |
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 |
---|---|---|
|
@@ -29,3 +29,4 @@ PyYAML~=5.3.1 | |
gordo-dataset~=2.3.0 | ||
jeepney>=0.6 | ||
packaging~=20.7 | ||
pydantic~=1.7.3 |