gogs.yaml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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