|
|
@ -49,7 +49,7 @@ namespace Microsoft.Tye.Extensions.Dapr |
|
|
|
|
|
|
|
|
// These environment variables are replaced with environment variables
|
|
|
// These environment variables are replaced with environment variables
|
|
|
// defined for this service.
|
|
|
// defined for this service.
|
|
|
Args = $"-app-id {project.Name} -app-port %APP_PORT% -dapr-grpc-port %DAPR_GRPC_PORT% --dapr-http-port %DAPR_HTTP_PORT% --metrics-port %METRICS_PORT% --placement-address localhost:50005", |
|
|
Args = $"-app-id {project.Name} -app-port %APP_PORT% -dapr-grpc-port %DAPR_GRPC_PORT% --dapr-http-port %DAPR_HTTP_PORT% --metrics-port %METRICS_PORT% -log-level %LOG_LEVEL% -config %CONFIG% --placement-address localhost:50005", |
|
|
}; |
|
|
}; |
|
|
context.Application.Services.Add(proxy); |
|
|
context.Application.Services.Add(proxy); |
|
|
|
|
|
|
|
|
@ -146,6 +146,16 @@ namespace Microsoft.Tye.Extensions.Dapr |
|
|
deployment.Annotations.Add("dapr.io/enabled", "true"); |
|
|
deployment.Annotations.Add("dapr.io/enabled", "true"); |
|
|
deployment.Annotations.Add("dapr.io/id", project.Name); |
|
|
deployment.Annotations.Add("dapr.io/id", project.Name); |
|
|
deployment.Annotations.Add("dapr.io/port", (httpBinding.Port ?? 80).ToString(CultureInfo.InvariantCulture)); |
|
|
deployment.Annotations.Add("dapr.io/port", (httpBinding.Port ?? 80).ToString(CultureInfo.InvariantCulture)); |
|
|
|
|
|
|
|
|
|
|
|
if (config.Data.TryGetValue("config", out var daprConfig) && daprConfig is object) |
|
|
|
|
|
{ |
|
|
|
|
|
deployment.Annotations.TryAdd("dapr.io/config", daprConfig!.ToString() ?? string.Empty); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (config.Data.TryGetValue("log-level", out var logLevel) && logLevel is object) |
|
|
|
|
|
{ |
|
|
|
|
|
deployment.Annotations.TryAdd("dapr.io/log-level", logLevel!.ToString() ?? string.Empty); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|