Need to specify which Kubernetes annotations are used as daprd command line parameter values
What content needs to be created or modified?
Do we need to specify which Kubernetes annotations are used as daprd command line parameter values?
In the list in this document https://docs.dapr.io/reference/arguments-annotations-overview/, some of the Kubernetes annotations configurations are not used as command-line arguments to daprd, while others are used as daprd command line parameters.
As daprd command line arguments: dapr.io/app-id , dapr.io/app-port , dapr.io/log-level , etc.
Not as a command line argument: dapr.io/sidecar-image, dapr.io/unix-domain-socket-path, etc.
Describe the solution you'd like
Where should the new material be placed?
The associated pull request from dapr/dapr, dapr/components-contrib, or other Dapr code repos
Additional context
I think it is useful. Pls. complement :)
@CrazyHZM - Not sure what the goal of this is? What is the problem that you are trying to solve here? In the end people use one of the daprd, CLI or K8s annotations depending on their environment. Can you explain some more, why you want to provide this?
- It is mainly used to explain which configurations will affect each other. For example,
k8sanddaprdare configured withdapr.io/app-portat the same time. Which configuration is used first is actually describing the priority of configuration loading. - When some errors occur, users can clearly realize which k8s configuration is equivalent to the daprd configuration, so as to check all possible configuration errors @msfussell
@msfussell This doc will help user to diagnose incorrect or conflicting command line argument for daprd in k8s environment. Some of daprd's arguments are defined as pod's annotation and then injected into daprd's container as its command line arguments, but there's no doc there to carry this knowledge, therefore users who are not familiar with this area will have difficulty to solve issues like https://github.com/dapr/dapr/pull/4540 by themselves.
@CrazyHZM @beiwei30 - Well can you write down the list of the K8 annotations that are passed through to daprd as command line arguments. However I still do not see how someone uses this list in what scenario. The issue https://github.com/dapr/dapr/pull/4540 above is the the app-port and the http/grpc ports should not be set the same. This is just a bug to be fixed and presumably there are other command line argument checks like this that may also happen and need to be checked.
so in adding this information, can you given an example of how this would be used in the docs?
@CrazyHZM - Following up here
I will list all relevant command line arguments soon.
List of values passed as Daprd command line arguments:
| Daprd command line arguments | kubernetes annotations | ||
|---|---|---|---|
| --dapr-listen-addresses | apr.io/sidecar-listen-addresses | ||
| --app-port | dapr.io/app-port | ||
| --app-id | dapr.io/app-id | ||
| --app-protocol | dapr.io/app-protocol | ||
| --placement-host-address | dapr.io/placement-host-address | ||
| --config | dapr.io/config | ||
| --log-level | dapr.io/log-level | ||
| --app-max-concurrency | dapr.io/app-max-concurrency | ||
| --enable-metrics | dapr.io/enable-metrics | ||
| --metrics-port | dapr.io/metrics-port | ||
| --dapr-http-max-request-size | dapr.io/http-max-request-size | ||
| --dapr-http-read-buffer-size | dapr.io/http-read-buffer-size | ||
| --dapr-graceful-shutdown-seconds | dapr.io/graceful-shutdown-seconds | ||
| --enable-api-logging | dapr.io/enable-api-logging | ||
| --disable-builtin-k8s-secret-store | dapr.io/disable-builtin-k8s-secret-store | ||
| --listen | dapr.io/debug-port | ||
| --log-as-json | dapr.io/log-as-json | ||
| --enable-profiling | dapr.io/enable-profiling | ||
| --app-ssl | dapr.io/app-ssl | ||
| --http-stream-request-body | dapr.io/http-stream-request-body |
For example, when the log output app-port conflicts with the dapr grpc port, in addition to checking the --app-port configuration, the user also needs to find dapr.io/app-port according to this table, and check the dapr.io/app-port Is the configuration correct.
@msfussell
ping @msfussell
It looks like a lot of this was resolved in the docs? closing - @msfussell feel free to reopen if still needs worked on