kube-exam/helm/values.yaml

131 lines
3.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: true
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.yaml
secrets:
username: "username"
password: "password1234"
database-url: "postgresql://username:password1234@exam-db/api_prod"
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: 3
initContainer:
command: ['/bin/sh', '-c', 'until nc -z exam-db "${EXAM_DB_SERVICE_PORT-5432}"; do sleep 1; done;']
# cmd: ['sh', '-c', 'until pg_isready -U username -h exam-db -p 5432; do sleep 1; done']
- client:
name: *clientName
tier: *clientTier
image:
repository: client
tag: prod
port: 80
- db:
name: *dbName
tier: *dbTier
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: true
forwarder:
initContainers:
- name: fluentd-init
image: busybox
command: ['/bin/sh', '-c', 'until nc -z exam-fluentd-0.exam-fluentd-headless.exam.svc.cluster.local ${EXAM_FLUENTD_AGGREGATOR_SERVICE_PORT_TCP-24224}; do sleep 5; done;']
configMapFiles:
fluentd-inputs.conf: |
<source>
@type http
port 9880
</source>
<source>
@type tail
path /var/log/containers/exam-*.log
exclude_path /var/log/containers/*fluentd*.log
pos_file /opt/bitnami/fluentd/logs/buffers/fluentd-docker.pos
tag kubernetes.*
read_from_head true
<parse>
@type json
time_key time
time_format %Y-%m-%dT%H:%M:%S.%NZ
</parse>
</source>
<filter kubernetes.**>
@type kubernetes_metadata
</filter>