Advertisement
perimcomm

API KMS

Aug 30th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: api-node
  5. labels:
  6. app: api-node
  7. spec:
  8. replicas: 1
  9. selector:
  10. matchLabels:
  11. app: api-node
  12. template:
  13. metadata:
  14. labels:
  15. app: api-node
  16. spec:
  17. containers:
  18. - name: kpb-api-business
  19. image: gcr.io/projeto/api-node
  20. ports:
  21. - containerPort: 3000
  22. env:
  23. - name: NODE_ENV
  24. value: staging
  25. - name: PORT
  26. value: "3000"
  27. - name: VIRTUAL_PORT
  28. value: "3000"
  29. - name: GCS_BUCKET
  30. value: bucket
  31. - name: GCLOUD_PROJECT
  32. value: project
  33. - name: GOOGLE_APPLICATION_CREDENTIALS
  34. value: /app/credential_file
  35. - name: ENC_FILE
  36. value: "/app/encfile.enc"
  37. - name: DB_USER
  38. valueFrom:
  39. secretKeyRef:
  40. name: cloudsql-db-user-credentials
  41. key: username
  42. - name: DB_PASSWORD
  43. valueFrom:
  44. secretKeyRef:
  45. name: cloudsql-db-passwd-credentials
  46. key: password
  47.  
  48. - name: cloudsql-proxy
  49. image: gcr.io/cloudsql-docker/gce-proxy:1.11
  50. command: ["/cloud_sql_proxy","-instances=instance-connection=tcp:3306","-credential_file=/secrets/cloudsql/credentials.json"]
  51. securityContext:
  52. runAsUser: 2
  53. allowPrivilegeEscalation: false
  54. volumeMounts:
  55. - name: cloudsql-instance-credentials
  56. mountPath: /secrets/cloudsql
  57. readOnly: true
  58. volumes:
  59. - name: cloudsql-instance-credentials
  60. secret:
  61. secretName: cloudsql-instance-credentials
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement