gogs.yaml 1.7 KB

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