gogs.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. ports:
  29. - containerPort: 22
  30. name: ssh-svc
  31. - containerPort: 3000
  32. name: http-web-svc
  33. volumeMounts:
  34. - mountPath: "/data"
  35. name: data
  36. livenessProbe:
  37. httpGet:
  38. path: /
  39. port: 3000
  40. failureThreshold: 10
  41. initialDelaySeconds: 30
  42. periodSeconds: 10
  43. volumes:
  44. - name: data
  45. persistentVolumeClaim:
  46. claimName: gogs-pvc
  47. ---
  48. apiVersion: v1
  49. kind: Service
  50. metadata:
  51. name: gogs-service
  52. namespace: gogs
  53. spec:
  54. selector:
  55. app: gogs
  56. type: ClusterIP
  57. ports:
  58. - name: gogs-web-port
  59. protocol: TCP
  60. port: 3000
  61. targetPort: http-web-svc
  62. - name: gogs-ssh-port
  63. protocol: TCP
  64. port: 22
  65. targetPort: ssh-svc
  66. ---
  67. apiVersion: traefik.containo.us/v1alpha1
  68. kind: IngressRoute
  69. metadata:
  70. name: gogs
  71. namespace: gogs
  72. spec:
  73. entryPoints:
  74. - websecure
  75. routes:
  76. - kind: Rule
  77. match: Host(`gogs.jibby.org`)
  78. services:
  79. - kind: Service
  80. name: gogs-service
  81. port: 3000