diff --git a/servers/legion/apps/docuseal.yaml b/servers/legion/apps/docuseal.yaml new file mode 100644 index 0000000..d260f8d --- /dev/null +++ b/servers/legion/apps/docuseal.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: docuseal + namespace: argocd +spec: + project: default + source: + repoURL: https://git.neuralplatform.ai/will/infrastructure.git + targetRevision: main + path: servers/legion/k8s/docuseal + destination: + server: https://kubernetes.default.svc + namespace: docuseal + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/servers/legion/k8s/docuseal/deployment.yaml b/servers/legion/k8s/docuseal/deployment.yaml new file mode 100644 index 0000000..c81b22e --- /dev/null +++ b/servers/legion/k8s/docuseal/deployment.yaml @@ -0,0 +1,62 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: docuseal + namespace: docuseal +spec: + replicas: 1 + selector: + matchLabels: + app: docuseal + template: + metadata: + labels: + app: docuseal + spec: + containers: + - name: docuseal + image: docuseal/docuseal:latest + ports: + - containerPort: 3000 + env: + - name: SECRET_KEY_BASE + valueFrom: + secretKeyRef: + name: docuseal-secrets + key: secret_key_base + - name: FORCE_SSL + value: "false" + - name: DATABASE_URL + value: sqlite3:///data/docuseal.sqlite3 + volumeMounts: + - name: data + mountPath: /data + readinessProbe: + httpGet: + path: / + port: 3000 + initialDelaySeconds: 15 + periodSeconds: 10 + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 500m + memory: 512Mi + volumes: + - name: data + persistentVolumeClaim: + claimName: docuseal-data +--- +apiVersion: v1 +kind: Service +metadata: + name: docuseal + namespace: docuseal +spec: + selector: + app: docuseal + ports: + - port: 3000 + targetPort: 3000 diff --git a/servers/legion/k8s/docuseal/external-secrets.yaml b/servers/legion/k8s/docuseal/external-secrets.yaml new file mode 100644 index 0000000..e701bc1 --- /dev/null +++ b/servers/legion/k8s/docuseal/external-secrets.yaml @@ -0,0 +1,18 @@ +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: docuseal-secrets + namespace: docuseal +spec: + refreshInterval: 1h + secretStoreRef: + name: vault + kind: ClusterSecretStore + target: + name: docuseal-secrets + creationPolicy: Owner + data: + - secretKey: secret_key_base + remoteRef: + key: secret/data/docuseal + property: secret_key_base diff --git a/servers/legion/k8s/docuseal/ingress.yaml b/servers/legion/k8s/docuseal/ingress.yaml new file mode 100644 index 0000000..b09d567 --- /dev/null +++ b/servers/legion/k8s/docuseal/ingress.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: docuseal + namespace: docuseal + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: websecure + cert-manager.io/cluster-issuer: letsencrypt-prod +spec: + ingressClassName: traefik + tls: + - hosts: + - sign.neuralplatform.ai + secretName: docuseal-tls + rules: + - host: sign.neuralplatform.ai + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: docuseal + port: + number: 3000 diff --git a/servers/legion/k8s/docuseal/pvc.yaml b/servers/legion/k8s/docuseal/pvc.yaml new file mode 100644 index 0000000..cef7faa --- /dev/null +++ b/servers/legion/k8s/docuseal/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: docuseal-data + namespace: docuseal +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi diff --git a/servers/legion/main.tf b/servers/legion/main.tf index e2c4a50..7788d19 100644 --- a/servers/legion/main.tf +++ b/servers/legion/main.tf @@ -153,6 +153,15 @@ resource "cloudflare_zero_trust_tunnel_cloudflared_config" "legion" { } } + # sign.neuralplatform.ai — Docuseal e-signature + ingress_rule { + hostname = "sign.neuralplatform.ai" + service = "https://traefik.kube-system.svc:443" + origin_request { + no_tls_verify = true + } + } + # Catch-all — must be last ingress_rule { service = "http_status:404"