radicle.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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.org/client-max-body-size: "500m"
  93. nginx.org/proxy-connect-timeout: "60s"
  94. nginx.org/proxy-read-timeout: "60s"
  95. # Uncomment to allow solving HTTP01 challenge
  96. nginx.org/hsts: "true"
  97. ingress.kubernetes.io/ssl-redirect: "true"
  98. nginx.org/redirect-to-https: "true"
  99. spec:
  100. tls:
  101. - hosts:
  102. - radicle.dodges.it
  103. secretName: radicle-le-secret
  104. rules:
  105. - host: radicle.dodges.it
  106. http:
  107. paths:
  108. - path: /
  109. pathType: Prefix
  110. backend:
  111. service:
  112. name: radicle
  113. port:
  114. number: 8080
  115. ingressClassName: nginx
  116. ---
  117. apiVersion: v1
  118. kind: PersistentVolumeClaim
  119. metadata:
  120. name: radicle-pvc
  121. spec:
  122. storageClassName: nfs-vrt
  123. accessModes:
  124. - ReadWriteOnce
  125. resources:
  126. requests:
  127. storage: 50Gi