dapr / cli

Command-line tools for Dapr.
Apache License 2.0
315 stars 197 forks source link

Cannot set the Configuration for an application in Kubernetes Multi-app run #1351

Closed msfussell closed 9 months ago

msfussell commented 9 months ago

Expected Behavior

Cannot get Zipkin to show traces from the mult-app run on K8s deployment. The deployment is missing the configuration annotations. This dapr.io/config | Tells Dapr which Configuration resource to use From here https://docs.dapr.io/reference/arguments-annotations-overview/

Actual Behavior

The multi-app run K8s template https://v1-12.docs.dapr.io/developing-applications/local-development/multi-app-dapr-run/multi-app-template/ does not have this property that can be set in the template. These are the annotations that you see for the deployed applications. Note there is not config annotation.

Name:         pythonapp-54bdcfbd48-rg94r
Namespace:    default
Priority:     0
Node:         mark-control-plane/172.19.0.2
Start Time:   Mon, 02 Oct 2023 20:47:29 -0700
Labels:       app=pythonapp
              dapr.io/app-id=pythonapp
              dapr.io/metrics-enabled=true
              dapr.io/sidecar-injected=true
              pod-template-hash=54bdcfbd48
Annotations:  dapr.io/app-id: pythonapp
              dapr.io/enabled: true
              dapr.io/metrics-port: 65307
              dapr.io/unix-domain-socket-path:

Name:         nodeapp-56998d7c99-fhz8q
Namespace:    default
Priority:     0
Node:         mark-control-plane/172.19.0.2
Start Time:   Mon, 02 Oct 2023 20:47:25 -0700
Labels:       app=nodeapp
              dapr.io/app-id=nodeapp
              dapr.io/metrics-enabled=true
              dapr.io/sidecar-injected=true
              pod-template-hash=56998d7c99
Annotations:  dapr.io/app-id: nodeapp
              dapr.io/app-port: 3000
              dapr.io/enabled: true
              dapr.io/metrics-port: 65295
              dapr.io/unix-domain-socket-path:

Steps to Reproduce the Problem

Release Note

RELEASE NOTE: UPDATE Cannot set the Configuration for an application in Kubernetes Multi-app run

mukundansundar commented 9 months ago

Currently there is no way to set the config annotation, similar to having no way to set resources, only the default config can be used. The default config, does not seem to be set, we can add a fix for setting the default config.

mukundansundar commented 9 months ago

If the appconfig Dapr configuration is not found in default namespace for some reason, the dapr.io/config parameter will not be set and skipped emitting a warning:

⚠  Dapr configuration "appconfig" not found in namespace "default". Skipping annotation "dapr.io/config"

If the annotation is not skipped, the application deployment will go into crashloop backoff since the config is not there.

mukundansundar commented 9 months ago
image

I have made the changes locally and tested ....

mukundansundar commented 9 months ago

closed by #1352