hammond-deployment.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: hammond
  5. spec:
  6. type: NodePort
  7. ports:
  8. - name: http
  9. port: 3000
  10. nodePort: 30081
  11. targetPort: hammond-http
  12. selector:
  13. app: hammond
  14. ---
  15. apiVersion: v1
  16. kind: PersistentVolumeClaim
  17. metadata:
  18. name: hammond-assets-claim
  19. labels:
  20. app: hammond
  21. spec:
  22. accessModes:
  23. - ReadWriteMany
  24. storageClassName: ""
  25. resources:
  26. requests:
  27. storage: 2Gi
  28. ---
  29. apiVersion: v1
  30. kind: PersistentVolumeClaim
  31. metadata:
  32. name: hammond-config-claim
  33. labels:
  34. app: hammond
  35. spec:
  36. accessModes:
  37. - ReadWriteMany
  38. storageClassName: ""
  39. resources:
  40. requests:
  41. storage: 1Gi
  42. ---
  43. apiVersion: apps/v1
  44. kind: Deployment
  45. metadata:
  46. name: hammond
  47. labels:
  48. app: hammond
  49. spec:
  50. selector:
  51. matchLabels:
  52. app: hammond
  53. tier: frontend
  54. strategy:
  55. type: Recreate
  56. template:
  57. metadata:
  58. labels:
  59. app: hammond
  60. tier: frontend
  61. spec:
  62. containers:
  63. - name: hammond
  64. image: akhilrex/hammond
  65. ports:
  66. - containerPort: 3000
  67. name: "hammond-http"
  68. volumeMounts:
  69. - name: hammond-assets-folder
  70. mountPath: /assets
  71. - name: hammond-config-folder
  72. mountPath: /config
  73. imagePullSecrets:
  74. - name: reg-cred-secret
  75. volumes:
  76. - name: hammond-assets-folder
  77. persistentVolumeClaim:
  78. claimName: hammond-assets-claim
  79. - name: hammond-config-folder
  80. persistentVolumeClaim:
  81. claimName: hammond-config-claim