dapr / dapr/cli

Change `dapr annotate` command to use a `--set` based model

Open
#1,028 3 comments 0 reactions 0 assignees View on GitHub
area/cli area/test area/test/e2e breaking-change good first issue kind/feature P1 triaged/resolved
Dominant language
Go
Stars
353
Forks
221
Avg merge
3d 8h
Merged PRs (30d)
2

Description

## Describe the proposal
As it exists, in `dapr annotate` command, we have a flag defined for each annotation. That in itself has defined a huge number of flags for that particular command also there are slight variations between the flag in `dapr annotate` command the one annotations themselves. For eg: for most of the sidecar based annotations, the sidecar prefix is left off like `cpu-limit` or `cpu-request`.
Additionally, as the annotations grow, the number of flags need to grow as well and we need to keep track of each and every annotation that is added to make sure that it is added as part of the `dapr annotate` command so that there is no divergence.

The proposal here is to have a `--set` flag which gets input as a string which is directly set as the annotation for the sidecar, eg: `--set dapr.io/sidecar-cpu-limit: 1`. This way we use a single flag for any number of annotations.

@yaron2 @jjcollinge Thoughts on this?

## Release Note

RELEASE NOTE: Changed `dapr annotate` command to have a single `--set` flag

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.