chore: Update kubernetes configs

This commit is contained in:
Pc 2023-02-21 23:20:41 +03:30
parent 20795825a3
commit b5d98699c1
3 changed files with 17 additions and 14 deletions

View File

@ -15,37 +15,37 @@ spec:
app: flight
spec:
containers:
- image: meysamh66/booking-microservices-flight:v1.5.9
- image: meysamh66/booking-microservices-flight:v1.6.1
name: flight
ports:
- containerPort: 80
env:
- name: "ASPNETCORE_ENVIRONMENT"
value: "docker"
value: "docker"
- name: ASPNETCORE_URLS
value: "http://+"
- name: "RabbitMqOptions__HostName"
value: "rabbitmq"
value: "rabbitmq"
- name: "RabbitMqOptions__ExchangeName"
value: "flight"
value: "flight"
- name: "RabbitMqOptions__UserName"
value: "guest"
value: "guest"
- name: "RabbitMqOptions__Password"
value: "guest"
value: "guest"
- name: "RabbitMqOptions__Port"
value: "5672"
- name: "MongoOptions__ConnectionString"
value: "mongodb://mongo:27017"
value: "mongodb://mongo:27017"
- name: "MongoOptions__DatabaseName"
value: "flight-db"
- name: "Jwt__Authority"
value: "http://127.0.0.1:13872"
value: "http://127.0.0.1:2521"
- name: "Jwt__Audience"
value: "flight-api"
- name: "Jwt__RequireHttpsMetadata"
value: "false"
value: "false"
# - name: "HealthOptions__Enabled"
# value: "true"
# value: "true"
volumeMounts:
- name: appsettings-volume
mountPath: /app/Settings
@ -67,4 +67,4 @@ spec:
port: 80
# targetPort: 80
nodePort: 30444
type: NodePort
type: NodePort

View File

@ -15,7 +15,7 @@ spec:
app: identity
spec:
containers:
- image: meysamh66/booking-microservices-identity:v1.5.9
- image: meysamh66/booking-microservices-identity:v1.6.1
name: identity
ports:
- containerPort: 80
@ -23,7 +23,7 @@ spec:
- name: "ASPNETCORE_ENVIRONMENT"
value: "docker"
- name: ASPNETCORE_URLS
value: http://+:80
value: http://+:80
volumeMounts:
- name: appsettings-volume
mountPath: /app/Settings
@ -45,4 +45,4 @@ spec:
port: 80
targetPort: 80
nodePort: 30443
type: NodePort
type: NodePort

View File

@ -5,6 +5,8 @@ using Microsoft.Extensions.DependencyInjection;
namespace BuildingBlocks.Jwt;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
public static class JwtExtensions
{
public static IServiceCollection AddJwt(this IServiceCollection services)
@ -17,6 +19,7 @@ public static class JwtExtensions
options.Authority = jwtOptions.Authority;
options.TokenValidationParameters.ValidateAudience = false;
options.RequireHttpsMetadata = jwtOptions.RequireHttpsMetadata;
options.Configuration = new OpenIdConnectConfiguration();
});
if (!string.IsNullOrEmpty(jwtOptions.Audience))