clientepsql-deployment.yaml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: clientepsql
  5. namespace: <NS>
  6. spec:
  7. replicas: 1
  8. selector:
  9. matchLabels:
  10. app: clientepsql
  11. template:
  12. metadata:
  13. labels:
  14. app: clientepsql
  15. spec:
  16. containers:
  17. - name: psql
  18. image: registry.reymota.es/clientepsql:<TAG>
  19. imagePullPolicy: IfNotPresent
  20. env:
  21. - name: DATABASE
  22. valueFrom:
  23. configMapKeyRef:
  24. key: DATABASE
  25. name: env-prod
  26. - name: SQL_HOST
  27. valueFrom:
  28. configMapKeyRef:
  29. key: SQL_HOST
  30. name: env-prod
  31. - name: SQL_PORT
  32. valueFrom:
  33. configMapKeyRef:
  34. key: SQL_PORT
  35. name: env-prod
  36. # La contraseña es mejor con Secret (ver abajo)
  37. tty: true
  38. stdin: true
  39. envFrom:
  40. - secretRef:
  41. name: postgres-secret
  42. imagePullSecrets:
  43. - name: myregistrykey