gogs.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. terminationGracePeriodSeconds: 30
  73. containers:
  74. # - image: whatever4711/gogs
  75. #- image: fdamstra/gogs:latest
  76. - image: gogs/gogs:latest
  77. imagePullPolicy: "Always"
  78. name: gogs
  79. ports:
  80. - containerPort: 3000
  81. - containerPort: 2222
  82. env:
  83. - name: SOCAT_LINK
  84. value: "false"
  85. resources:
  86. limits:
  87. memory: "2Gi"
  88. cpu: "1500m"
  89. requests:
  90. memory: "250Mi"
  91. cpu: "250m"
  92. volumeMounts:
  93. - mountPath: /data
  94. name: gogs-data
  95. - mountPath: /app/gogs/custom/conf/app.ini
  96. name: gogs-data
  97. subPath: gogs/conf/app.ini
  98. restartPolicy: Always
  99. volumes:
  100. - name: gogs-data
  101. persistentVolumeClaim:
  102. claimName: gogs-data
  103. dnsPolicy: "None"
  104. dnsConfig:
  105. nameservers:
  106. - 10.42.42.239
  107. - 10.42.42.1
  108. searches:
  109. - default.svc.cluster.local
  110. - svc.cluster.local
  111. - cluster.local
  112. options:
  113. - name: ndots
  114. value: "2"
  115. - name: edns0
  116. - name: trust-ad
  117. status: {}
  118. ---
  119. # Hosting
  120. apiVersion: networking.k8s.io/v1
  121. kind: Ingress
  122. metadata:
  123. name: gogs-ingress
  124. annotations:
  125. cert-manager.io/cluster-issuer: "letsencrypt-prod"
  126. ## No basic auth for gogs
  127. ## type of authentication
  128. #nginx.ingress.kubernetes.io/auth-type: basic
  129. ## name of the secret that contains the user/password definitions
  130. #nginx.ingress.kubernetes.io/auth-secret: basic-auth
  131. ## message to display with an appropriate context why the authentication is required
  132. #nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Octoprint'
  133. spec:
  134. tls:
  135. - hosts:
  136. - git.monkeybox.org
  137. - gogs.monkeybox.org
  138. secretName: gogs-tls
  139. rules:
  140. - host: git.monkeybox.org
  141. http:
  142. paths:
  143. - path: /
  144. pathType: Prefix
  145. backend:
  146. service:
  147. name: gogs
  148. port:
  149. number: 80
  150. - host: gogs.monkeybox.org
  151. http:
  152. paths:
  153. - path: /
  154. pathType: Prefix
  155. backend:
  156. service:
  157. name: gogs
  158. port:
  159. number: 80