flexo.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: flexo
  5. spec:
  6. replicas: 1
  7. selector:
  8. matchLabels:
  9. app: flexo
  10. template:
  11. metadata:
  12. labels:
  13. app: flexo
  14. spec:
  15. containers:
  16. - name: flexo
  17. image: nroi/flexo
  18. ports:
  19. - containerPort: 7878
  20. # Mount the persistent volume claim
  21. volumeMounts:
  22. - name: storage-nfs
  23. mountPath: /var/cache/flexo/pkg
  24. - name: config
  25. mountPath: /etc/flexo/flexo.toml
  26. subPath: flexo.toml
  27. # Define persistent volume claim
  28. volumes:
  29. - name: storage-nfs
  30. persistentVolumeClaim:
  31. claimName: nroi-flexo-pvc
  32. - name: config
  33. configMap:
  34. name: flexo
  35. ---
  36. apiVersion: v1
  37. kind: PersistentVolumeClaim
  38. metadata:
  39. name: nroi-flexo-pvc
  40. spec:
  41. accessModes:
  42. - ReadWriteOnce
  43. resources:
  44. requests:
  45. storage: 250Gi
  46. storageClassName: nfs-vrt
  47. ---
  48. apiVersion: v1
  49. kind: Service
  50. metadata:
  51. name: flexo
  52. spec:
  53. type: NodePort
  54. selector:
  55. app: flexo
  56. ipFamilyPolicy: PreferDualStack
  57. ports:
  58. - protocol: TCP
  59. port: 7878
  60. targetPort: 7878
  61. nodePort: 31787
  62. name: flexo