diff --git a/silverback/_click_ext.py b/silverback/_click_ext.py index f0b969ed..e51da31b 100644 --- a/silverback/_click_ext.py +++ b/silverback/_click_ext.py @@ -110,7 +110,7 @@ def get_profile(ctx: click.Context, param, value) -> BaseProfile: "--profile", "profile", metavar="PROFILE", - default=DEFAULT_PROFILE, + default=settings.default_profile, callback=get_profile, expose_value=expose_value, is_eager=True, # NOTE: Required to ensure that `profile` is always set, even if not provied diff --git a/silverback/cluster/settings.py b/silverback/cluster/settings.py index 73c621ea..f1b202aa 100644 --- a/silverback/cluster/settings.py +++ b/silverback/cluster/settings.py @@ -36,6 +36,7 @@ class ProfileSettings(BaseModel): auth: dict[str, AuthenticationConfig] profile: dict[str, PlatformProfile | ClusterProfile] + default_profile: str = Field(default=DEFAULT_PROFILE, alias="default-profile") @model_validator(mode="after") def ensure_auth_exists_for_profile(self) -> Self: