Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions pyhelm3/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def __init__(self, _command: Command, **kwargs):
#: Type for a name (chart or release)
Name = constr(pattern = r"^[a-z0-9-]+$")

#: Type for a dependency name
DependencyNameOrAlias = constr(pattern = r"^[a-z0-9_-]+$")


#: Type for a SemVer version
SemVerVersion = constr(pattern = r"^v?\d+\.\d+\.\d+(-[a-zA-Z0-9\.\-]+)?(\+[a-zA-Z0-9\.\-]+)?$")
Expand All @@ -71,9 +74,9 @@ class ChartDependency(BaseModel):
"""
Model for a chart dependency.
"""
name: Name = Field(
name: DependencyNameOrAlias = Field(
...,
description = "The name of the chart."
description = "The name of the chart (or alias, in case of an already-installed dependency)."
)
version: NonEmptyString = Field(
...,
Expand Down Expand Up @@ -273,7 +276,7 @@ class Release(ModelWithCommand):
)
namespace: Name = Field(
...,
description = "The namespace of the release."
description = "The namespace of the release."
)

async def current_revision(self) -> ReleaseRevisionType:
Expand Down Expand Up @@ -642,7 +645,7 @@ async def chart_metadata(self) -> ChartMetadata:
)
self.chart_metadata_ = ChartMetadata(**metadata)
return self.chart_metadata_

async def hooks(self) -> t.Iterable[Hook]:
"""
Returns the hooks that were executed as part of this revision.
Expand Down