git.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ---
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: git-deployment
  6. namespace: default
  7. labels:
  8. app: git
  9. spec:
  10. replicas: 1
  11. selector:
  12. matchLabels:
  13. app: git
  14. template:
  15. metadata:
  16. labels:
  17. app: git
  18. spec:
  19. containers:
  20. - image: gogs/gogs
  21. name: gogs
  22. imagePullPolicy: IfNotPresent
  23. ports:
  24. - containerPort: 3000
  25. volumeMounts:
  26. - name: gogs-vol
  27. mountPath: /data
  28. volumes:
  29. - name: gogs-vol
  30. hostPath:
  31. path: /mnt/gogs2/
  32. type: Directory
  33. ---
  34. apiVersion: v1
  35. kind: Service
  36. metadata:
  37. name: git
  38. namespace: default
  39. labels:
  40. app: git
  41. spec:
  42. type: ClusterIP
  43. selector:
  44. app: git
  45. ports:
  46. - port: 80
  47. targetPort: 3000
  48. ---
  49. apiVersion: cert-manager.io/v1
  50. kind: Certificate
  51. metadata:
  52. name: git.bodicsek.host
  53. spec:
  54. secretName: git.bodicsek.host
  55. issuerRef:
  56. name: letsencrypt-prod
  57. kind: ClusterIssuer
  58. dnsNames:
  59. - git.bodicsek.host
  60. ---
  61. apiVersion: traefik.containo.us/v1alpha1
  62. kind: IngressRoute
  63. metadata:
  64. name: git
  65. namespace: default
  66. spec:
  67. entryPoints:
  68. - websecure
  69. routes:
  70. - kind: Rule
  71. match: Host(`git.bodicsek.host`)
  72. services:
  73. - kind: Service
  74. name: git
  75. namespace: default
  76. passHostHeader: true
  77. port: 80
  78. tls:
  79. secretName: git.bodicsek.host