gogs.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: gogs-default
  5. spec:
  6. replicas: 3
  7. selector:
  8. matchLabels:
  9. app: gogs-default
  10. template:
  11. metadata:
  12. labels:
  13. app: gogs-default
  14. spec:
  15. nodeSelector:
  16. "beta.kubernetes.io/os": linux
  17. containers:
  18. - name: gogs-default
  19. image: gogs/gogs
  20. resources:
  21. requests:
  22. cpu: 100m
  23. memory: 256Mi
  24. ports:
  25. - containerPort: 3000
  26. volumeMounts:
  27. - name: gogs-pvc
  28. mountPath: /data
  29. volumes:
  30. - name: gogs-pvc
  31. persistentVolumeClaim:
  32. claimName: gogs-pvc
  33. ---
  34. apiVersion: v1
  35. kind: PersistentVolumeClaim
  36. metadata:
  37. name: gogs-pvc
  38. labels:
  39. app: gogs-default
  40. spec:
  41. accessModes:
  42. - ReadWriteOnce
  43. resources:
  44. requests:
  45. storage: 10Gi
  46. ---
  47. apiVersion: v1
  48. kind: Service
  49. metadata:
  50. name: gogs-svc
  51. labels:
  52. app: gogs-default
  53. spec:
  54. ports:
  55. - port: 3000
  56. protocol: TCP
  57. selector:
  58. app: gogs-default
  59. type: LoadBalancer