We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 410994f commit 9106d08Copy full SHA for 9106d08
1 file changed
src/dstack/_internal/core/backends/kubernetes/models.py
@@ -37,7 +37,7 @@ class KubernetesBackendConfigWithCreds(KubernetesBackendConfig):
37
38
39
class KubeconfigFileConfig(CoreModel):
40
- filename: Annotated[str, Field(description="The path to the kubeconfig file")]
+ filename: Annotated[str, Field(description="The path to the kubeconfig file")] = ""
41
data: Annotated[
42
Optional[str],
43
Field(
@@ -50,7 +50,9 @@ class KubeconfigFileConfig(CoreModel):
50
] = None
51
52
@root_validator
53
- def fill_data(cls, values):
+ def fill_data(cls, values: dict) -> dict:
54
+ if values.get("filename") == "" and values.get("data") is None:
55
+ raise ValueError("filename or data must be specified")
56
return fill_data(values)
57
58
0 commit comments