Skip to content

Commit

Permalink
feat: support oci protocol. fix azimuth-cloud#2
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-ikomia authored and voidlily committed Dec 9, 2024
1 parent 2475cdb commit 788033b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pyhelm3/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
FilePath,
AnyUrl as PydanticAnyUrl,
HttpUrl as PydanticHttpUrl,
UrlConstraints as PydanticUrlConstraints,
constr,
field_validator
)
from pydantic.functional_validators import AfterValidator
from typing_extensions import Annotated

from .command import Command, SafeLoader

Expand Down Expand Up @@ -46,6 +48,10 @@ def __init__(self, _command: Command, **kwargs):
SemVerVersion = constr(pattern = r"^v?\d+\.\d+\.\d+(-[a-zA-Z0-9\.\-]+)?(\+[a-zA-Z0-9\.\-]+)?$")


#: Type for an OCI scheme URI
OciUrl = Annotated[PydanticAnyUrl, PydanticUrlConstraints(allowed_schemes=["oci"], host_required=True)]


#: Type variables for forward references to the chart and release types
ChartType = t.TypeVar("ChartType", bound = "Chart")
ReleaseType = t.TypeVar("ReleaseType", bound = "Release")
Expand Down Expand Up @@ -195,7 +201,7 @@ class Chart(ModelWithCommand):
"""
Model for a reference to a chart.
"""
ref: t.Union[DirectoryPath, FilePath, HttpUrl, Name] = Field(
ref: t.Union[DirectoryPath, FilePath, HttpUrl, OciUrl, Name] = Field(
...,
description = (
"The chart reference. "
Expand Down

0 comments on commit 788033b

Please sign in to comment.