gogs.yaml 3.3 KB

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