docs icon indicating copy to clipboard operation
docs copied to clipboard

Need to specify which Kubernetes annotations are used as daprd command line parameter values

Open CrazyHZM opened this issue 3 years ago • 9 comments

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

CrazyHZM avatar May 10 '22 09:05 CrazyHZM

I think it is useful. Pls. complement :)

beiwei30 avatar May 10 '22 10:05 beiwei30

@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?

msfussell avatar May 17 '22 04:05 msfussell

  1. It is mainly used to explain which configurations will affect each other. For example, k8s and daprd are configured with dapr.io/app-port at the same time. Which configuration is used first is actually describing the priority of configuration loading.
  2. 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

CrazyHZM avatar May 20 '22 03:05 CrazyHZM

@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.

beiwei30 avatar May 30 '22 07:05 beiwei30

@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?

msfussell avatar Jun 02 '22 23:06 msfussell

@CrazyHZM - Following up here

msfussell avatar Jun 17 '22 01:06 msfussell

I will list all relevant command line arguments soon.

CrazyHZM avatar Jun 17 '22 11:06 CrazyHZM

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

CrazyHZM avatar Jun 18 '22 01:06 CrazyHZM

ping @msfussell

CrazyHZM avatar Jul 23 '22 03:07 CrazyHZM

It looks like a lot of this was resolved in the docs? closing - @msfussell feel free to reopen if still needs worked on

hhunter-ms avatar Dec 21 '23 17:12 hhunter-ms