gogs.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: gogs
  5. labels:
  6. run: gogs
  7. spec:
  8. ports:
  9. - name: http
  10. port: 80
  11. targetPort: 3000
  12. - name: ssh
  13. port: 2222
  14. targetPort: 2222
  15. selector:
  16. run: gogs
  17. type: LoadBalancer
  18. status:
  19. loadBalancer: {}
  20. ---
  21. apiVersion: v1
  22. kind: PersistentVolume
  23. metadata:
  24. name: gogs-data
  25. spec:
  26. capacity:
  27. storage: 1Gi
  28. volumeMode: Filesystem
  29. accessModes:
  30. - ReadWriteOnce
  31. persistentVolumeReclaimPolicy: Retain # Keep 4eva
  32. storageClassName: default
  33. mountOptions:
  34. - hard
  35. - nfsvers=3
  36. nfs:
  37. path: /mnt/DroboFS/Shares/Public/important/gogs/
  38. server: 10.42.42.10
  39. claimRef:
  40. name: gogs-data
  41. namespace: default
  42. ---
  43. apiVersion: v1
  44. kind: PersistentVolumeClaim
  45. metadata:
  46. name: gogs-data
  47. spec:
  48. storageClassName: standard
  49. accessModes:
  50. - ReadWriteOnce
  51. resources:
  52. requests:
  53. storage: 1Gi
  54. status: {}
  55. ---
  56. apiVersion: apps/v1
  57. kind: Deployment
  58. metadata:
  59. name: gogs
  60. spec:
  61. replicas: 1
  62. selector:
  63. matchLabels:
  64. run: gogs
  65. strategy:
  66. type: Recreate
  67. template:
  68. metadata:
  69. labels:
  70. run: gogs
  71. spec:
  72. containers:
  73. # - image: whatever4711/gogs
  74. - image: fdamstra/gogs
  75. name: gogs
  76. ports:
  77. - containerPort: 3000
  78. - containerPort: 2222
  79. env:
  80. - name: SOCAT_LINK
  81. value: "false"
  82. resources: {}
  83. volumeMounts:
  84. - mountPath: /data
  85. name: gogs-data
  86. - mountPath: /app/gogs/custom/conf/app.ini
  87. name: gogs-data
  88. subPath: gogs/conf/app.ini
  89. restartPolicy: Always
  90. volumes:
  91. - name: gogs-data
  92. persistentVolumeClaim:
  93. claimName: gogs-data
  94. status: {}
  95. ---
  96. # Hosting
  97. apiVersion: networking.k8s.io/v1
  98. kind: Ingress
  99. metadata:
  100. name: gogs-ingress
  101. annotations:
  102. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  103. ## No basic auth for gogs
  104. ## type of authentication
  105. #nginx.ingress.kubernetes.io/auth-type: basic
  106. ## name of the secret that contains the user/password definitions
  107. #nginx.ingress.kubernetes.io/auth-secret: basic-auth
  108. ## message to display with an appropriate context why the authentication is required
  109. #nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Octoprint'
  110. spec:
  111. tls:
  112. - hosts:
  113. - git.monkeybox.org
  114. - gogs.monkeybox.org
  115. secretName: gogs-tls
  116. rules:
  117. - host: git.monkeybox.org
  118. http:
  119. paths:
  120. - path: /
  121. pathType: Prefix
  122. backend:
  123. service:
  124. name: gogs
  125. port:
  126. number: 80
  127. - host: gogs.monkeybox.org
  128. http:
  129. paths:
  130. - path: /
  131. pathType: Prefix
  132. backend:
  133. service:
  134. name: gogs
  135. port:
  136. number: 80