helmsdeep/docs/service-with-vault-injected-creds-sample.yaml
vilorij beb05d3c18
Postgres (#21)
* cluster env without volumeclaims

* add volume

* back to minikube hostpath volume for riak

* add postgres

* pg version and minor fix

* add vault

* initdb

* add readme and sample

* Update README.md

Немного про волт

* autoinitiate vault

* Bump riak chart version and fallback to standard riak image

* Update README.md

Co-authored-by: vilorij <vilorij@ya.ru>

* typo fix

* delete doubled comment

* Comment resolve

* Drop useless comment and back to AppVersion in riak chart

* Delete pv creates from chart.

* delete state from values

Co-authored-by: Dmitry Skokov <d.skokov@rbkmoney.com>
Co-authored-by: Pospolita Nikita <nikita7asics@gmail.com>
2020-09-02 13:55:06 +03:00

29 lines
805 B
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: web-deployment
labels:
app: web
spec:
replicas: 1
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
annotations:
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-db-creds: "database/creds/db-app"
vault.hashicorp.com/agent-inject-template-db-creds: |
{{- with secret "database/creds/db-app" -}}
"db_connection": "postgresql://{{ .Data.username }}:{{ .Data.password }}@postgres-postgresql:5432/?sslmode=disable"
{{- end }}
vault.hashicorp.com/role: "db-app"
spec:
serviceAccountName: default
containers:
- name: web
image: nicholasjackson/fake-service:v0.7.3