cli
cli copied to clipboard
Proposal: Create a CLI config file
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:
related to https://github.com/dapr/cli/issues/1056 and https://github.com/dapr/cli/issues/1035
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
👋