reymota-deployment.yaml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: reymota
  5. namespace: <NS>
  6. labels:
  7. app: reymota
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: reymota
  13. strategy:
  14. type: Recreate
  15. template:
  16. metadata:
  17. labels:
  18. app: reymota
  19. spec:
  20. containers:
  21. - name: reymota
  22. image: <REGISTRO>/reymota:<TAG>
  23. env:
  24. - name: IMG_VERSION
  25. value: "<TAG>"
  26. - name: OPENSHIFT
  27. value: "False"
  28. - name: ENVIRONMENT
  29. valueFrom:
  30. configMapKeyRef:
  31. key: ENTORNO
  32. name: env-prod
  33. - name: DEBUG
  34. valueFrom:
  35. configMapKeyRef:
  36. key: DEBUG
  37. name: env-prod
  38. - name: APP_VERSION
  39. valueFrom:
  40. configMapKeyRef:
  41. key: APP_VERSION
  42. name: env-prod
  43. - name: DATABASE
  44. valueFrom:
  45. configMapKeyRef:
  46. key: DATABASE
  47. name: env-prod
  48. - name: SQL_HOST
  49. valueFrom:
  50. configMapKeyRef:
  51. key: SQL_HOST
  52. name: env-prod
  53. - name: SQL_PORT
  54. valueFrom:
  55. configMapKeyRef:
  56. key: SQL_PORT
  57. name: env-prod
  58. ports:
  59. - containerPort: 8000
  60. protocol: TCP
  61. volumeMounts:
  62. - mountPath: /app/mediafiles
  63. name: reymota-media
  64. - mountPath: /app/lyrics/migrations
  65. name: reymota-lyrics-migrations
  66. - mountPath: /app/repostajes/migrations
  67. name: reymota-repostajes-migrations
  68. - mountPath: /app/reymotausers/migrations
  69. name: reymota-reymotausers-migrations
  70. - mountPath: /app/staticfiles
  71. name: static-volume
  72. imagePullSecrets:
  73. - name: myregistrykey
  74. restartPolicy: Always
  75. volumes:
  76. - name: reymota-media
  77. persistentVolumeClaim:
  78. claimName: reymota-media
  79. - name: reymota-lyrics-migrations
  80. persistentVolumeClaim:
  81. claimName: reymota-lyrics-migrations
  82. - name: reymota-repostajes-migrations
  83. persistentVolumeClaim:
  84. claimName: reymota-repostajes-migrations
  85. - name: reymota-reymotausers-migrations
  86. persistentVolumeClaim:
  87. claimName: reymota-reymotausers-migrations
  88. - name: static-volume
  89. persistentVolumeClaim:
  90. claimName: static-volume
  91. status: {}