From 529cc6f29f49a1e25b4cf74a71b1610e493df4aa Mon Sep 17 00:00:00 2001 From: gwg313 Date: Tue, 6 Jan 2026 13:30:18 -0500 Subject: [PATCH] add stirling-pdf Signed-off-by: gwg313 --- apps/stirling-pdf.yaml | 20 +++++++++++ stirling-pdf/certificate.yaml | 12 +++++++ stirling-pdf/custom-files-pvc.yaml | 12 +++++++ stirling-pdf/deployment.yaml | 52 +++++++++++++++++++++++++++++ stirling-pdf/extra-configs-pvc.yaml | 12 +++++++ stirling-pdf/gateway.yaml | 18 ++++++++++ stirling-pdf/logs-pvc.yaml | 12 +++++++ stirling-pdf/namespace.yaml | 4 +++ stirling-pdf/pipeline-pvc.yaml | 12 +++++++ stirling-pdf/service.yaml | 12 +++++++ stirling-pdf/training-data-pvc.yaml | 12 +++++++ stirling-pdf/virtualservice.yaml | 19 +++++++++++ 12 files changed, 197 insertions(+) create mode 100644 apps/stirling-pdf.yaml create mode 100644 stirling-pdf/certificate.yaml create mode 100644 stirling-pdf/custom-files-pvc.yaml create mode 100644 stirling-pdf/deployment.yaml create mode 100644 stirling-pdf/extra-configs-pvc.yaml create mode 100644 stirling-pdf/gateway.yaml create mode 100644 stirling-pdf/logs-pvc.yaml create mode 100644 stirling-pdf/namespace.yaml create mode 100644 stirling-pdf/pipeline-pvc.yaml create mode 100644 stirling-pdf/service.yaml create mode 100644 stirling-pdf/training-data-pvc.yaml create mode 100644 stirling-pdf/virtualservice.yaml diff --git a/apps/stirling-pdf.yaml b/apps/stirling-pdf.yaml new file mode 100644 index 0000000..f9649a3 --- /dev/null +++ b/apps/stirling-pdf.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: stirling-pdf + namespace: argocd +spec: + project: default + source: + repoURL: https://github.com/gwg313/homelab-gitops + targetRevision: main + path: stirling-pdf + destination: + server: https://kubernetes.default.svc + namespace: stirling-pdf + syncPolicy: + automated: + selfHeal: true + prune: true + syncOptions: + - CreateNamespace=true diff --git a/stirling-pdf/certificate.yaml b/stirling-pdf/certificate.yaml new file mode 100644 index 0000000..2d054bb --- /dev/null +++ b/stirling-pdf/certificate.yaml @@ -0,0 +1,12 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: stirling-pdf-cert + namespace: istio-system +spec: + secretName: stirling-pdf-cert + issuerRef: + name: letsencrypt-dns + kind: ClusterIssuer + dnsNames: + - pdftools.gwg313.xyz diff --git a/stirling-pdf/custom-files-pvc.yaml b/stirling-pdf/custom-files-pvc.yaml new file mode 100644 index 0000000..7994fec --- /dev/null +++ b/stirling-pdf/custom-files-pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: stirling-custom-files + namespace: stirling-pdf +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 512Mi + storageClassName: nfs-client diff --git a/stirling-pdf/deployment.yaml b/stirling-pdf/deployment.yaml new file mode 100644 index 0000000..6963d8a --- /dev/null +++ b/stirling-pdf/deployment.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: stirling-pdf + namespace: stirling-pdf +spec: + replicas: 1 + selector: + matchLabels: + app: stirling-pdf + template: + metadata: + labels: + app: stirling-pdf + spec: + containers: + - name: stirling-pdf + image: docker.stirlingpdf.com/stirlingtools/stirling-pdf:latest + ports: + - containerPort: 8080 + env: + - name: DISABLE_ADDITIONAL_FEATURES + value: "false" + - name: LANGS + value: "en_US" + volumeMounts: + - name: training-data + mountPath: /usr/share/tessdata + - name: extra-configs + mountPath: /configs + - name: custom-files + mountPath: /customFiles + - name: logs + mountPath: /logs + - name: pipeline + mountPath: /pipeline + volumes: + - name: training-data + persistentVolumeClaim: + claimName: stirling-training-data + - name: extra-configs + persistentVolumeClaim: + claimName: stirling-extra-configs + - name: custom-files + persistentVolumeClaim: + claimName: stirling-custom-files + - name: logs + persistentVolumeClaim: + claimName: stirling-logs + - name: pipeline + persistentVolumeClaim: + claimName: stirling-pipeline diff --git a/stirling-pdf/extra-configs-pvc.yaml b/stirling-pdf/extra-configs-pvc.yaml new file mode 100644 index 0000000..a77b9c2 --- /dev/null +++ b/stirling-pdf/extra-configs-pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: stirling-extra-configs + namespace: stirling-pdf +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 512Mi + storageClassName: nfs-client diff --git a/stirling-pdf/gateway.yaml b/stirling-pdf/gateway.yaml new file mode 100644 index 0000000..fab2b24 --- /dev/null +++ b/stirling-pdf/gateway.yaml @@ -0,0 +1,18 @@ +apiVersion: networking.istio.io/v1beta1 +kind: Gateway +metadata: + name: stirling-pdf-gateway + namespace: stirling-pdf +spec: + selector: + istio: gateway + servers: + - port: + number: 443 + name: https + protocol: HTTPS + tls: + mode: SIMPLE + credentialName: stirling-pdf-cert + hosts: + - pdftools.gwg313.xyz diff --git a/stirling-pdf/logs-pvc.yaml b/stirling-pdf/logs-pvc.yaml new file mode 100644 index 0000000..aa7e23a --- /dev/null +++ b/stirling-pdf/logs-pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: stirling-logs + namespace: stirling-pdf +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 512Mi + storageClassName: nfs-client diff --git a/stirling-pdf/namespace.yaml b/stirling-pdf/namespace.yaml new file mode 100644 index 0000000..4928d47 --- /dev/null +++ b/stirling-pdf/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: stirling-pdf diff --git a/stirling-pdf/pipeline-pvc.yaml b/stirling-pdf/pipeline-pvc.yaml new file mode 100644 index 0000000..cbdfdd7 --- /dev/null +++ b/stirling-pdf/pipeline-pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: stirling-pipeline + namespace: stirling-pdf +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 512Mi + storageClassName: nfs-client diff --git a/stirling-pdf/service.yaml b/stirling-pdf/service.yaml new file mode 100644 index 0000000..667284b --- /dev/null +++ b/stirling-pdf/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: stirling-pdf + namespace: stirling-pdf +spec: + selector: + app: stirling-pdf + ports: + - port: 80 + targetPort: 8080 + protocol: TCP diff --git a/stirling-pdf/training-data-pvc.yaml b/stirling-pdf/training-data-pvc.yaml new file mode 100644 index 0000000..864c9cc --- /dev/null +++ b/stirling-pdf/training-data-pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: stirling-training-data + namespace: stirling-pdf +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 1Gi + storageClassName: nfs-client diff --git a/stirling-pdf/virtualservice.yaml b/stirling-pdf/virtualservice.yaml new file mode 100644 index 0000000..eb5f156 --- /dev/null +++ b/stirling-pdf/virtualservice.yaml @@ -0,0 +1,19 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: stirling-pdf + namespace: stirling-pdf +spec: + hosts: + - pdftools.gwg313.xyz + gateways: + - stirling-pdf-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: stirling-pdf + port: + number: 80