Add a endpoint returning only a 200 to be used as a liveness probe for k8s
This commit is contained in:
parent
85e83e6389
commit
9371eb1077
@ -60,7 +60,7 @@ spec:
|
|||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /hc
|
path: /liveness
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 120
|
initialDelaySeconds: 120
|
||||||
@ -125,7 +125,7 @@ spec:
|
|||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /hc
|
path: /liveness
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 120
|
initialDelaySeconds: 120
|
||||||
@ -212,7 +212,7 @@ spec:
|
|||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /hc
|
path: /liveness
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 120
|
initialDelaySeconds: 120
|
||||||
@ -282,7 +282,7 @@ spec:
|
|||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /hc
|
path: /liveness
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 120
|
initialDelaySeconds: 120
|
||||||
@ -357,7 +357,7 @@ spec:
|
|||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /hc
|
path: /liveness
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 120
|
initialDelaySeconds: 120
|
||||||
@ -437,7 +437,7 @@ spec:
|
|||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /hc
|
path: /liveness
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 120
|
initialDelaySeconds: 120
|
||||||
@ -527,7 +527,7 @@ spec:
|
|||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /hc
|
path: /liveness
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 120
|
initialDelaySeconds: 120
|
||||||
@ -582,7 +582,7 @@ spec:
|
|||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /hc
|
path: /liveness
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 120
|
initialDelaySeconds: 120
|
||||||
@ -704,7 +704,7 @@ spec:
|
|||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /hc
|
path: /liveness
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 120
|
initialDelaySeconds: 120
|
||||||
@ -897,7 +897,7 @@ spec:
|
|||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /hc
|
path: /liveness
|
||||||
port: 80
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 120
|
initialDelaySeconds: 120
|
||||||
|
@ -189,6 +189,11 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
|
|||||||
app.UsePathBase(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();
|
app.UseStaticFiles();
|
||||||
app.UseCors("CorsPolicy");
|
app.UseCors("CorsPolicy");
|
||||||
|
|
||||||
|
@ -191,6 +191,10 @@
|
|||||||
app.UsePathBase(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");
|
app.UseCors("CorsPolicy");
|
||||||
|
|
||||||
app.UseMvcWithDefaultRoute();
|
app.UseMvcWithDefaultRoute();
|
||||||
|
@ -138,6 +138,11 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
|
|||||||
app.UsePathBase(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();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,6 +162,10 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
|
|||||||
app.UsePathBase(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");
|
app.UseCors("CorsPolicy");
|
||||||
|
|
||||||
ConfigureAuth(app);
|
ConfigureAuth(app);
|
||||||
|
@ -194,6 +194,10 @@
|
|||||||
app.UsePathBase(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");
|
app.UseCors("CorsPolicy");
|
||||||
|
|
||||||
ConfigureAuth(app);
|
ConfigureAuth(app);
|
||||||
|
@ -213,6 +213,10 @@
|
|||||||
app.UsePathBase(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");
|
app.UseCors("CorsPolicy");
|
||||||
|
|
||||||
ConfigureAuth(app);
|
ConfigureAuth(app);
|
||||||
|
@ -113,6 +113,9 @@ namespace Ordering.BackgroundTasks
|
|||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,6 +103,10 @@ namespace Payment.API
|
|||||||
app.UsePathBase(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
|
||||||
|
|
||||||
ConfigureEventBus(app);
|
ConfigureEventBus(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,6 +160,11 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
|||||||
app.UsePathBase(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.UseSession();
|
app.UseSession();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
|
@ -112,6 +112,11 @@ namespace eShopConContainers.WebSPA
|
|||||||
app.UsePathBase(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) =>
|
app.Use(async (context, next) =>
|
||||||
{
|
{
|
||||||
await next();
|
await next();
|
||||||
|
@ -74,6 +74,11 @@ namespace WebStatus
|
|||||||
app.UsePathBase(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();
|
app.UseStaticFiles();
|
||||||
|
|
||||||
app.UseMvc(routes =>
|
app.UseMvc(routes =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user