This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| using Microsoft.AspNetCore.Mvc; | |
| using Microsoft.Extensions.Logging; | |
| using DaprAdventures.PublisherService.Models; | |
| using Dapr.Client; | |
| namespace DaprAdventures.PublisherService.Controllers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Logging": { | |
| "LogLevel": { | |
| "Default": "Information", | |
| "Microsoft": "Warning", | |
| "Microsoft.Hosting.Lifetime": "Information" | |
| } | |
| }, | |
| "AllowedHosts": "*", | |
| "DAPR_HTTP_ENDPOINT": "http://localhost:5180", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| services.AddControllers(); | |
| services.AddControllers().AddDapr(builder => builder.UseHttpEndpoint(Configuration.GetValue<string>("DAPR_HTTP_ENDPOINT")) | |
| .UseGrpcEndpoint(Configuration.GetValue<string>("DAPR_GRPC_ENDPOINT"))); | |
| services.AddSwaggerGen(c => | |
| { | |
| c.SwaggerDoc("v1", new OpenApiInfo { Title = "DaprAdventures.PublisherService", Version = "v1" }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| info: Microsoft.Hosting.Lifetime[0] | |
| Now listening on: http://127.0.0.1:5100 | |
| Microsoft.Hosting.Lifetime: Information: Now listening on: http://127.0.0.1:5100 | |
| info: Microsoft.Hosting.Lifetime[0] | |
| Now listening on: https://127.0.0.1:5102 | |
| Microsoft.Hosting.Lifetime: Information: Now listening on: https://127.0.0.1:5102 | |
| info: Microsoft.Hosting.Lifetime[0] | |
| Application started. Press Ctrl+C to shut down. | |
| Microsoft.Hosting.Lifetime: Information: Application started. Press Ctrl+C to shut down. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: dapr.io/v1alpha1 | |
| kind: Component | |
| metadata: | |
| name: envvar-secret-store | |
| namespace: default | |
| spec: | |
| type: secretstores.local.env | |
| version: v1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DEBU[0000] found component. name: envvar-secret-store, type: secretstores.local.env/v1 app_id=publisher-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
| DEBU[0000] found component. name: pubsub, type: pubsub.azure.eventhubs/v1 app_id=publisher-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
| DEBU[0000] loading component. name: envvar-secret-store, type: secretstores.local.env/v1 app_id=publisher-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
| INFO[0000] component loaded. name: envvar-secret-store, type: secretstores.local.env/v1 app_id=publisher-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
| DEBU[0000] loading component. name: pubsub, type: pubsub.azure.eventhubs/v1 app_id=publisher-service instance=Kshitijs-MacBook-Pro.local scope=dapr.runtime type=log ver=1.2.2 | |
| INFO[0000] waiting for all outstanding components to be processed app_id=publisher-service instance=Kshitijs- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: dapr.io/v1alpha1 | |
| kind: Component | |
| metadata: | |
| name: pubsub | |
| spec: | |
| type: pubsub.azure.eventhubs | |
| version: v1 | |
| metadata: | |
| - name: connectionString | |
| secretKeyRef: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| KubePodInventory | |
| | where ClusterName == 'prod-aks-cluster' | |
| | where isnotempty(Computer) // eliminate unscheduled pods | |
| | where PodStatus in ('Running') | |
| | extend podLabels = parse_json (PodLabel) | |
| | where podLabels[0]['app.kubernetes.io/instance'] == "payment-service" | |
| | where Namespace == "payments-ns" | |
| | where $__timeFilter(TimeGenerated) | |
| | extend JustContainerName=tostring(split(ContainerName, '/')[1]) | |
| | extend InstanceName=strcat(ClusterId, '/', PodUid, '/', JustContainerName) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| KubePodInventory | |
| | where ClusterName == 'prod-aks-cluster' | |
| | where isnotempty(Computer) // eliminate unscheduled pods | |
| | where PodStatus in ('Running') | |
| | extend podLabels = parse_json (PodLabel) | |
| | where podLabels[0]['app.kubernetes.io/instance'] == "payments-service" | |
| | where Namespace == "payment-ns" | |
| | where $__timeFilter(TimeGenerated) | |
| | extend ActualContainerName=tostring(split(ContainerName, '/')[1]) | |
| | extend InstanceName=strcat(ClusterId, '/', PodUid, '/', ActualContainerName) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| KubePodInventory | |
| | where ClusterName == "prod-aks-cluster" | |
| | where isnotempty(Computer) // eliminate unscheduled pods | |
| | where PodStatus in ('Running') | |
| | extend podLabels = parse_json (PodLabel) | |
| | where podLabels[0]['app.kubernetes.io/instance'] == "payment-service" | |
| | where Namespace == "payment-ns" | |
| | extend ActualContainerName=tostring(split(ContainerName, '/')[1]) | |
| | extend InstanceName=strcat(ClusterId, '/', PodUid, '/', ActualContainerName) | |
| | distinct Name, InstanceName |