reymota-deployment-limpio.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: reymota
  5. namespace: reymota
  6. spec:
  7. ports:
  8. - name: "8000"
  9. port: 8000
  10. targetPort: 8000
  11. selector:
  12. app: reymota
  13. ---
  14. apiVersion: apps/v1
  15. kind: Deployment
  16. metadata:
  17. name: reymota
  18. namespace: reymota
  19. labels:
  20. app: reymota
  21. spec:
  22. replicas: 1
  23. selector:
  24. matchLabels:
  25. app: reymota
  26. strategy:
  27. type: Recreate
  28. template:
  29. metadata:
  30. labels:
  31. app: reymota
  32. spec:
  33. containers:
  34. - args:
  35. - gunicorn
  36. - reymota.wsgi:application
  37. - --bind
  38. - 0.0.0.0:8000
  39. name: reymota
  40. image: registry.reymota.es/reymota-x86_64:0.24
  41. env:
  42. - name: VERSION
  43. value: "0.24"
  44. - name: ENVIRONMENT
  45. valueFrom:
  46. configMapKeyRef:
  47. key: ENTORNO
  48. name: env-prod
  49. - name: DEBUG
  50. valueFrom:
  51. configMapKeyRef:
  52. key: DEBUG
  53. name: env-prod
  54. - name: DJANGO_ALLOWED_HOSTS
  55. valueFrom:
  56. configMapKeyRef:
  57. key: DJANGO_ALLOWED_HOSTS
  58. name: env-prod
  59. - name: CSRF_TRUSTED_ORIGINS
  60. valueFrom:
  61. configMapKeyRef:
  62. key: CSRF_TRUSTED_ORIGINS
  63. name: env-prod
  64. - name: SECRET_KEY
  65. valueFrom:
  66. configMapKeyRef:
  67. key: SECRET_KEY
  68. name: env-prod
  69. - name: DATABASE
  70. valueFrom:
  71. configMapKeyRef:
  72. key: DATABASE
  73. name: env-prod
  74. - name: SQL_HOST
  75. valueFrom:
  76. configMapKeyRef:
  77. key: SQL_HOST
  78. name: env-prod
  79. - name: SQL_PORT
  80. valueFrom:
  81. configMapKeyRef:
  82. key: SQL_PORT
  83. name: env-prod
  84. - name: SQL_ENGINE
  85. valueFrom:
  86. configMapKeyRef:
  87. key: SQL_ENGINE
  88. name: env-prod
  89. - name: SQL_DATABASE
  90. valueFrom:
  91. configMapKeyRef:
  92. key: SQL_DATABASE
  93. name: env-prod
  94. - name: SQL_USER
  95. valueFrom:
  96. configMapKeyRef:
  97. key: SQL_USER
  98. name: env-prod
  99. - name: SQL_PASSWORD
  100. valueFrom:
  101. configMapKeyRef:
  102. key: SQL_PASSWORD
  103. name: env-prod
  104. ports:
  105. - containerPort: 8000
  106. protocol: TCP
  107. volumeMounts:
  108. - mountPath: /app/reymota/mediafiles
  109. name: reymota-media
  110. - mountPath: /app/reymota/lyrics/migrations
  111. name: reymota-lyrics-migrations
  112. - mountPath: /app/reymota/repostajes/migrations
  113. name: reymota-repostajes-migrations
  114. - mountPath: /app/reymota/reymotausers/migrations
  115. name: reymota-reymotausers-migrations
  116. - mountPath: /app/reymota/staticfiles
  117. name: static-volume
  118. imagePullSecrets:
  119. - name: myregistrykey
  120. restartPolicy: Always
  121. volumes:
  122. - name: reymota-media
  123. persistentVolumeClaim:
  124. claimName: reymota-media
  125. - name: reymota-lyrics-migrations
  126. persistentVolumeClaim:
  127. claimName: reymota-lyrics-migrations
  128. - name: reymota-repostajes-migrations
  129. persistentVolumeClaim:
  130. claimName: reymota-repostajes-migrations
  131. - name: reymota-reymotausers-migrations
  132. persistentVolumeClaim:
  133. claimName: reymota-reymotausers-migrations
  134. - name: static-volume
  135. persistentVolumeClaim:
  136. claimName: static-volume
  137. status: {}