git.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. annotations:
  19. diun.enable: "true"
  20. diun.include_tags: '^\d+\.\d+$'
  21. spec:
  22. containers:
  23. - image: gogs/gogs:0.13
  24. name: gogs
  25. imagePullPolicy: IfNotPresent
  26. ports:
  27. - containerPort: 3000
  28. volumeMounts:
  29. - name: gogs-vol
  30. mountPath: /data
  31. volumes:
  32. - name: gogs-vol
  33. hostPath:
  34. path: /mnt/gogs2/
  35. type: Directory
  36. ---
  37. apiVersion: v1
  38. kind: Service
  39. metadata:
  40. name: git
  41. namespace: default
  42. labels:
  43. app: git
  44. spec:
  45. type: ClusterIP
  46. selector:
  47. app: git
  48. ports:
  49. - port: 80
  50. targetPort: 3000
  51. ---
  52. apiVersion: cert-manager.io/v1
  53. kind: Certificate
  54. metadata:
  55. name: git.bodicsek.host
  56. spec:
  57. secretName: git.bodicsek.host
  58. issuerRef:
  59. name: letsencrypt-prod
  60. kind: ClusterIssuer
  61. dnsNames:
  62. - git.bodicsek.host
  63. ---
  64. apiVersion: traefik.io/v1alpha1
  65. kind: IngressRoute
  66. metadata:
  67. name: git
  68. namespace: default
  69. spec:
  70. entryPoints:
  71. - websecure
  72. routes:
  73. - kind: Rule
  74. match: Host(`git.bodicsek.host`)
  75. services:
  76. - kind: Service
  77. name: git
  78. namespace: default
  79. passHostHeader: true
  80. port: 80
  81. tls:
  82. secretName: git.bodicsek.host