gogs.yaml 3.2 KB

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