gitea-deployment.yaml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: gitea
  5. namespace: gitea
  6. labels:
  7. app: gitea
  8. spec:
  9. type: NodePort
  10. ports:
  11. - port: 3000
  12. nodePort: 30780
  13. targetPort: gitea
  14. selector:
  15. app: gitea
  16. tier: frontend
  17. ---
  18. apiVersion: apps/v1
  19. kind: Deployment
  20. metadata:
  21. name: gitea
  22. namespace: gitea
  23. labels:
  24. app: gitea
  25. spec:
  26. replicas: 1
  27. selector:
  28. matchLabels:
  29. app: gitea
  30. template:
  31. metadata:
  32. labels:
  33. app: gitea
  34. spec:
  35. containers:
  36. - name: gitea
  37. image: gitea/gitea:latest
  38. ports:
  39. - containerPort: 3000
  40. name: gitea
  41. - containerPort: 22
  42. name: git-ssh
  43. volumeMounts:
  44. - mountPath: /data
  45. name: git-volume
  46. volumes:
  47. - name: git-volume
  48. persistentVolumeClaim:
  49. claimName: gitea-pv-claim
  50. ---
  51. apiVersion: v1
  52. kind: PersistentVolumeClaim
  53. metadata:
  54. name: gitea-pv-claim
  55. namespace: gitea
  56. spec:
  57. accessModes:
  58. - ReadWriteOnce
  59. resources:
  60. requests:
  61. storage: 2Gi