Skip to content

Proposal: Create a CLI config file #1058

Open
@mukundansundar

Description

@mukundansundar

Describe the proposal

Currently a lot of commands in the dapr cli have a myriad of flags/environment variables and defaults and further more, more issues are there in the backlog asking for more configurability.

The current way the CLI works is that it is split from the runtime. Once CLI is init, then runtime binary can be installed in specific locations in Linux/Mac or Windows using the dapr init command. Furthermore the default places to look for components and configurations are within the ~/.dapr folder, with the only way to override being flags or env var.

Additionally there are multiple variants of dapr available, distroless vs mariner.

Also there are multiple different config options available for most of the commands init, run, mtls renew etc.

The proposal here is to create a single config file where defaults are well defined and user modifiable. The CLI config file is the one the dapr CLI uses for setting defaults, locating default configuration/resources directory, setting default runtime, locating binaries in install path, supporting and choosing default daprd version etc.

Also we need to define clear precedence rules, wherein the CLI config file is default, with environment vars overriding it and them being overridden by flags for a specific command.

The location of the CLI config file say .dapr_cli.yaml will be based on the default config locations for each platform.

cc @artursouza @yaron2 thoughts?

Release Note

RELEASE NOTE:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions