diff --git a/k8s/deployments.yaml b/k8s/deployments.yaml index 65a8f7934..034842f8c 100644 --- a/k8s/deployments.yaml +++ b/k8s/deployments.yaml @@ -60,7 +60,7 @@ spec: periodSeconds: 60 livenessProbe: httpGet: - path: /hc + path: /liveness port: 80 scheme: HTTP initialDelaySeconds: 120 @@ -125,7 +125,7 @@ spec: periodSeconds: 60 livenessProbe: httpGet: - path: /hc + path: /liveness port: 80 scheme: HTTP initialDelaySeconds: 120 @@ -212,7 +212,7 @@ spec: periodSeconds: 60 livenessProbe: httpGet: - path: /hc + path: /liveness port: 80 scheme: HTTP initialDelaySeconds: 120 @@ -282,7 +282,7 @@ spec: periodSeconds: 60 livenessProbe: httpGet: - path: /hc + path: /liveness port: 80 scheme: HTTP initialDelaySeconds: 120 @@ -357,7 +357,7 @@ spec: periodSeconds: 60 livenessProbe: httpGet: - path: /hc + path: /liveness port: 80 scheme: HTTP initialDelaySeconds: 120 @@ -437,7 +437,7 @@ spec: periodSeconds: 60 livenessProbe: httpGet: - path: /hc + path: /liveness port: 80 scheme: HTTP initialDelaySeconds: 120 @@ -527,7 +527,7 @@ spec: periodSeconds: 60 livenessProbe: httpGet: - path: /hc + path: /liveness port: 80 scheme: HTTP initialDelaySeconds: 120 @@ -582,7 +582,7 @@ spec: periodSeconds: 60 livenessProbe: httpGet: - path: /hc + path: /liveness port: 80 scheme: HTTP initialDelaySeconds: 120 @@ -704,7 +704,7 @@ spec: periodSeconds: 60 livenessProbe: httpGet: - path: /hc + path: /liveness port: 80 scheme: HTTP initialDelaySeconds: 120 @@ -897,7 +897,7 @@ spec: periodSeconds: 60 livenessProbe: httpGet: - path: /hc + path: /liveness port: 80 scheme: HTTP initialDelaySeconds: 120 diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index 1b698a339..86b57c0cd 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -188,7 +188,12 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API { app.UsePathBase(pathBase); } - + + +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously + app.UseStaticFiles(); app.UseCors("CorsPolicy"); diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index 41dee0069..5eec48959 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -191,6 +191,10 @@ app.UsePathBase(pathBase); } +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously + app.UseCors("CorsPolicy"); app.UseMvcWithDefaultRoute(); diff --git a/src/Services/Identity/Identity.API/Startup.cs b/src/Services/Identity/Identity.API/Startup.cs index 58ac0bd10..f16f90965 100644 --- a/src/Services/Identity/Identity.API/Startup.cs +++ b/src/Services/Identity/Identity.API/Startup.cs @@ -136,7 +136,12 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API { loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'"); app.UsePathBase(pathBase); - } + } + + +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously app.UseStaticFiles(); diff --git a/src/Services/Location/Locations.API/Startup.cs b/src/Services/Location/Locations.API/Startup.cs index 55e9d52c0..e69180e61 100644 --- a/src/Services/Location/Locations.API/Startup.cs +++ b/src/Services/Location/Locations.API/Startup.cs @@ -162,6 +162,10 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API app.UsePathBase(pathBase); } +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously + app.UseCors("CorsPolicy"); ConfigureAuth(app); diff --git a/src/Services/Marketing/Marketing.API/Startup.cs b/src/Services/Marketing/Marketing.API/Startup.cs index a5f12b54e..f2dcd1578 100644 --- a/src/Services/Marketing/Marketing.API/Startup.cs +++ b/src/Services/Marketing/Marketing.API/Startup.cs @@ -192,8 +192,12 @@ if (!string.IsNullOrEmpty(pathBase)) { app.UsePathBase(pathBase); - } - + } + +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously + app.UseCors("CorsPolicy"); ConfigureAuth(app); diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs index 0084e0de7..1879175c9 100644 --- a/src/Services/Ordering/Ordering.API/Startup.cs +++ b/src/Services/Ordering/Ordering.API/Startup.cs @@ -211,8 +211,12 @@ { loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'"); app.UsePathBase(pathBase); - } - + } + +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously + app.UseCors("CorsPolicy"); ConfigureAuth(app); diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Startup.cs b/src/Services/Ordering/Ordering.BackgroundTasks/Startup.cs index 62215d126..bb7ae0902 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Startup.cs +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Startup.cs @@ -112,7 +112,10 @@ namespace Ordering.BackgroundTasks // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { - + +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously } diff --git a/src/Services/Payment/Payment.API/Startup.cs b/src/Services/Payment/Payment.API/Startup.cs index e06c7c7f2..02cd4c70e 100644 --- a/src/Services/Payment/Payment.API/Startup.cs +++ b/src/Services/Payment/Payment.API/Startup.cs @@ -103,6 +103,10 @@ namespace Payment.API app.UsePathBase(pathBase); } +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously + ConfigureEventBus(app); } diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs index ced47ea67..105b1ed9e 100644 --- a/src/Web/WebMVC/Startup.cs +++ b/src/Web/WebMVC/Startup.cs @@ -160,6 +160,11 @@ namespace Microsoft.eShopOnContainers.WebMVC app.UsePathBase(pathBase); } + +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously + app.UseSession(); app.UseStaticFiles(); diff --git a/src/Web/WebSPA/Startup.cs b/src/Web/WebSPA/Startup.cs index 3f2354b97..f49eba772 100644 --- a/src/Web/WebSPA/Startup.cs +++ b/src/Web/WebSPA/Startup.cs @@ -110,7 +110,12 @@ namespace eShopConContainers.WebSPA { loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'"); app.UsePathBase(pathBase); - } + } + + +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously app.Use(async (context, next) => { diff --git a/src/Web/WebStatus/Startup.cs b/src/Web/WebStatus/Startup.cs index 19aedc449..6f32ce5a8 100644 --- a/src/Web/WebStatus/Startup.cs +++ b/src/Web/WebStatus/Startup.cs @@ -72,7 +72,12 @@ namespace WebStatus if (!string.IsNullOrEmpty(pathBase)) { app.UsePathBase(pathBase); - } + } + + +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously + app.Map("/liveness", lapp => lapp.Run(async ctx => ctx.Response.StatusCode = 200)); +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously app.UseStaticFiles();