reymota-deployment.yaml 2.6 KB

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