gogs.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ---
  2. apiVersion: v1
  3. kind: Namespace
  4. metadata:
  5. name: gogs
  6. ---
  7. apiVersion: apps/v1
  8. kind: Deployment
  9. metadata:
  10. name: gogs
  11. namespace: gogs
  12. spec:
  13. strategy:
  14. type: Recreate
  15. selector:
  16. matchLabels:
  17. app: gogs
  18. replicas: 1
  19. template:
  20. metadata:
  21. labels:
  22. app: gogs
  23. spec:
  24. containers:
  25. - name: gogs
  26. image: gogs/gogs:0.13.0
  27. env:
  28. - name: SOCAT_LINK
  29. value: "false"
  30. name: DISABLE_REGISTRATION
  31. value: "true"
  32. ports:
  33. - containerPort: 22
  34. name: ssh-svc
  35. - containerPort: 3000
  36. name: http-web-svc
  37. volumeMounts:
  38. - mountPath: "/data"
  39. name: data
  40. livenessProbe:
  41. httpGet:
  42. path: /
  43. port: 3000
  44. failureThreshold: 10
  45. initialDelaySeconds: 30
  46. periodSeconds: 10
  47. volumes:
  48. - name: data
  49. persistentVolumeClaim:
  50. claimName: gogs-pvc
  51. ---
  52. apiVersion: v1
  53. kind: Service
  54. metadata:
  55. name: gogs-service
  56. namespace: gogs
  57. spec:
  58. selector:
  59. app: gogs
  60. type: ClusterIP
  61. ports:
  62. - name: gogs-web-port
  63. protocol: TCP
  64. port: 3000
  65. targetPort: http-web-svc
  66. - name: gogs-ssh-port
  67. protocol: TCP
  68. port: 22
  69. targetPort: ssh-svc
  70. ---
  71. apiVersion: traefik.containo.us/v1alpha1
  72. kind: IngressRoute
  73. metadata:
  74. name: gogs
  75. namespace: gogs
  76. spec:
  77. entryPoints:
  78. - websecure
  79. routes:
  80. - kind: Rule
  81. match: Host(`gogs.jibby.org`)
  82. services:
  83. - kind: Service
  84. name: gogs-service
  85. port: 3000