URL-5 Added Kubernetes manifests, services and deployments. Also included Ingress and namespace and service configs.
This commit is contained in:
28
k8s/base/configmaps/application-config.yaml
Normal file
28
k8s/base/configmaps/application-config.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: application-config
|
||||
namespace: urlshortener
|
||||
labels:
|
||||
app: urlshortener
|
||||
data:
|
||||
# Spring Boot Actuator configuration
|
||||
management.endpoints.web.exposure.include: "health,info,metrics,prometheus"
|
||||
management.endpoint.health.probes.enabled: "true"
|
||||
management.health.livenessState.enabled: "true"
|
||||
management.health.readinessState.enabled: "true"
|
||||
|
||||
# Logging configuration
|
||||
logging.level.root: "INFO"
|
||||
logging.level.me.lenajenichen: "DEBUG"
|
||||
logging.pattern.console: "%d{yyyy-MM-dd HH:mm:ss} - %msg%n"
|
||||
|
||||
# Application common settings
|
||||
spring.application.name: "urlshortener"
|
||||
|
||||
# Server configuration
|
||||
server.error.include-message: "always"
|
||||
server.error.include-binding-errors: "always"
|
||||
server.error.include-stacktrace: "on_param"
|
||||
server.error.include-exception: "false"
|
||||
|
||||
24
k8s/base/configmaps/database-config.yaml
Normal file
24
k8s/base/configmaps/database-config.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: database-config
|
||||
namespace: urlshortener
|
||||
labels:
|
||||
app: urlshortener
|
||||
data:
|
||||
# PostgreSQL connection settings
|
||||
# These will be used by services that need database access
|
||||
# Note: Password should be set via secret: urlshortener-secrets (database-password key)
|
||||
spring.r2dbc.url: "r2dbc:postgresql://postgres:5432/urlshortener"
|
||||
spring.r2dbc.username: "urlshortener"
|
||||
# Password is loaded from secret: urlshortener-secrets.database-password
|
||||
|
||||
# Connection pool settings
|
||||
spring.r2dbc.pool.initial-size: "5"
|
||||
spring.r2dbc.pool.max-size: "20"
|
||||
spring.r2dbc.pool.max-idle-time: "30m"
|
||||
|
||||
# Database migration (if using Flyway or Liquibase)
|
||||
spring.flyway.enabled: "true"
|
||||
spring.flyway.baseline-on-migrate: "true"
|
||||
|
||||
18
k8s/base/configmaps/service-config.yaml
Normal file
18
k8s/base/configmaps/service-config.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: service-config
|
||||
namespace: urlshortener
|
||||
labels:
|
||||
app: urlshortener
|
||||
data:
|
||||
# Service discovery - internal service URLs
|
||||
shortener.service.url: "http://shortener-service:8083"
|
||||
auth.service.url: "http://auth-service:8080"
|
||||
analytics.service.url: "http://analytics-service:8080"
|
||||
redirect.service.url: "http://redirect-service:8080"
|
||||
|
||||
# External service URLs (if needed)
|
||||
shortener.service.external.url: "https://api.urlshortener.example.com/api/shortener"
|
||||
redirect.service.external.url: "https://short.urlshortener.example.com"
|
||||
|
||||
Reference in New Issue
Block a user