radicle.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: radicle
  5. spec:
  6. replicas: 1
  7. selector:
  8. matchLabels:
  9. name: radicle
  10. template:
  11. metadata:
  12. labels:
  13. name: radicle
  14. nginx: backend
  15. spec:
  16. volumes:
  17. - name: storage
  18. persistentVolumeClaim:
  19. claimName: "radicle-pvc"
  20. restartPolicy: Always
  21. containers:
  22. - name: radicle
  23. image: qdii/radicle:latest
  24. imagePullPolicy: "Always"
  25. env:
  26. - name: HOSTNAME
  27. value: "radicle.dodges.it"
  28. - name: RAD_SEEDING_POLICY
  29. value: "allow"
  30. - name: RAD_KEYGEN_SEED
  31. valueFrom:
  32. secretKeyRef:
  33. name: radicle
  34. key: seed
  35. - name: RAD_PASSPHRASE
  36. valueFrom:
  37. secretKeyRef:
  38. name: radicle
  39. key: passphrase
  40. resources:
  41. requests:
  42. cpu: "2"
  43. ephemeral-storage: "1Gi"
  44. memory: "5Gi"
  45. limits:
  46. cpu: "3"
  47. ephemeral-storage: "2Gi"
  48. memory: "6Gi"
  49. ports:
  50. - containerPort: 8776
  51. name: seed
  52. protocol: TCP
  53. - containerPort: 8080
  54. name: http
  55. protocol: TCP
  56. volumeMounts:
  57. - name: storage
  58. mountPath: /home/ubuntu/radicle
  59. livenessProbe:
  60. httpGet:
  61. path: /api/v1
  62. port: http
  63. ---
  64. apiVersion: v1
  65. kind: Service
  66. metadata:
  67. name: radicle
  68. spec:
  69. type: ClusterIP
  70. ipFamilyPolicy: SingleStack
  71. ipFamilies:
  72. - IPv4
  73. selector:
  74. name: radicle
  75. ports:
  76. - protocol: TCP
  77. port: 8080
  78. targetPort: 8080
  79. name: http
  80. - protocol: TCP
  81. port: 8776
  82. targetPort: 8776
  83. name: seed
  84. ---
  85. apiVersion: networking.k8s.io/v1
  86. kind: Ingress
  87. metadata:
  88. name: radicle-ingress
  89. annotations:
  90. cert-manager.io/cluster-issuer: "letsencrypt"
  91. acme.cert-manager.io/http01-edit-in-place: "true"
  92. nginx.ingress.kubernetes.io/client-body-buffer-size: "500m"
  93. nginx.ingress.kubernetes.io/proxy-connect-timeout: "60s"
  94. nginx.ingress.kubernetes.io/proxy-read-timeout: "60s"
  95. nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
  96. spec:
  97. tls:
  98. - hosts:
  99. - radicle.dodges.it
  100. secretName: radicle-le-secret
  101. rules:
  102. - host: radicle.dodges.it
  103. http:
  104. paths:
  105. - path: /
  106. pathType: Prefix
  107. backend:
  108. service:
  109. name: radicle
  110. port:
  111. number: 8080
  112. ingressClassName: nginx
  113. ---
  114. apiVersion: v1
  115. kind: PersistentVolumeClaim
  116. metadata:
  117. name: radicle-pvc
  118. spec:
  119. storageClassName: nfs-vrt
  120. accessModes:
  121. - ReadWriteOnce
  122. resources:
  123. requests:
  124. storage: 50Gi