kube-exam/helm/values.yaml

108 lines
2.1 KiB
YAML

shared:
host: &host kube.slc.ar
api:
name: &apiName "api"
port: &apiPort 5000
tier: &apiTier "backend"
db:
name: &dbName "db"
port: &dbPort 5432
tier: &dbTier "backend"
client:
name: &clientName "client"
port: &clientPort 8080
tier: &clientTier "frontend"
ingress:
ssl:
enabled: true
# cert: ca.crt
# key: ca.key
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/use-regex: "true"
hosts:
- host: *host
paths:
- path: /()(.*)
name: "client"
port: *clientPort
- path: /api(/|$)(.*)
name: "api"
port: *apiPort
tls:
- secretName: exam-crt
hosts:
- *host
services:
- api:
name: *apiName
tier: *apiTier
port: *apiPort
- client:
name: *clientName
tier: *clientTier
port: *clientPort
target: 80
- db:
name: *dbName
tier: *dbTier
port: *dbPort
secrets:
username: ""
password: ""
database-url: ""
pv:
class: local-storage
request: 1Gi
path: /var/lib/minikube
deployments:
- api:
name: *apiName
tier: *apiTier
env:
app-settings: src.config.ProductionConfig
port: *apiPort
secrets:
database-url: database-url
image:
repository: api
tag: prod
port: *apiPort
replicas: 2
initContainer:
command: ['/bin/sh', '-c', 'until nc -z exam-db "${EXAM_DB_SERVICE_PORT-5432}"; do sleep 1; done;']
- client:
name: *clientName
tier: *clientTier
image:
repository: client
tag: prod
port: 80
statefuls:
- db:
name: *dbName
tier: *dbTier
grace: 60
env:
pgdata: /var/lib/postgresql/data/pgdata
secrets:
postgres-password: password
postgres-user: username
image:
repository: db
tag: 13.3
port: *dbPort
mountPath: /var/lib/postgresql/data
storage: pv-storage
probe:
command: ['/bin/sh', '-c', 'exec pg_isready -U "$POSTGRES_USER" -h 127.0.0.1 -p "${EXAM_DB_SERVICE_PORT-5432}";']
fluentd:
enabled: false