Skip to content

Instantly share code, notes, and snippets.

@lbroudoux
Last active March 13, 2020 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lbroudoux/eb99d11afdb84794548a43397bed9d66 to your computer and use it in GitHub Desktop.
Save lbroudoux/eb99d11afdb84794548a43397bed9d66 to your computer and use it in GitHub Desktop.
secured-fruits-catalog-k8s-with-agent-deployment.yml #openshift #vault
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
[...]
spec:
template:
metadata:
annotations:
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-init-first: "true"
vault.hashicorp.com/agent-inject-status: "update"
vault.hashicorp.com/agent-inject-secret-application.properties: "database/creds/fruit-catalog-role"
vault.hashicorp.com/agent-inject-template-application.properties: |
{{- with secret "database/creds/fruit-catalog-role" -}}
spring.data.mongodb.uri=mongodb://{{ .Data.username }}:{{ .Data.password }}@mongodb/sampledb
{{- end }}
vault.hashicorp.com/secret-volume-path-application.properties: "/deployments/config/"
vault.hashicorp.com/agent-pre-populate-only: "true"
vault.hashicorp.com/role: "fruits-catalog"
vault.hashicorp.com/tls-skip-verify : "true"
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment