gogs.yaml 1.5 KB

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