diff --git a/apps/stirling-pdf/base/deployment.yaml b/apps/stirling-pdf/base/deployment.yaml new file mode 100644 index 0000000..e41da8d --- /dev/null +++ b/apps/stirling-pdf/base/deployment.yaml @@ -0,0 +1,55 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: stirling-pdf + namespace: stirling-pdf + labels: + app.kubernetes.io/name: stirling-pdf +spec: + selector: + matchLabels: + app.kubernetes.io/name: stirling-pdf + template: + metadata: + labels: + app.kubernetes.io/name: stirling-pdf + spec: + containers: + - name: stirling-pdf + image: frooodle/s-pdf:0.26.1 + securityContext: + allowPrivilegeEscalation: false + env: + - name: DOCKER_ENABLE_SECURITY + value: "true" + ports: + - protocol: TCP + containerPort: 8080 + name: http + volumeMounts: + - name: s-pdf-tessdata + mountPath: /usr/share/tesseract-ocr/5/tessdata + - name: s-pdf-configs + mountPath: /configs + - name: s-pdf-custom-files + mountPath: /customFiles + - name: s-pdf-logs + mountPath: /logs + volumes: + - name: s-pdf-tessdata + hostPath: + path: /mnt/nfs/AppData/stirling-pdf/tessdata + type: Directory + - name: s-pdf-configs + hostPath: + path: /mnt/nfs/AppData/stirling-pdf/configs + type: Directory + - name: s-pdf-custom-files + hostPath: + path: /mnt/nfs/AppData/stirling-pdf/customFiles + type: Directory + - name: s-pdf-logs + hostPath: + path: /mnt/nfs/AppData/stirling-pdf/logs + type: Directory + diff --git a/apps/stirling-pdf/base/kustomization.yaml b/apps/stirling-pdf/base/kustomization.yaml new file mode 100644 index 0000000..87b09a3 --- /dev/null +++ b/apps/stirling-pdf/base/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./deployment.yaml + - ./service.yaml \ No newline at end of file diff --git a/apps/stirling-pdf/base/service.yaml b/apps/stirling-pdf/base/service.yaml new file mode 100644 index 0000000..c10f0b9 --- /dev/null +++ b/apps/stirling-pdf/base/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: stirling-pdf + namespace: stirling-pdf + labels: + app.kubernetes.io/name: stirling-pdf +spec: + selector: + app.kubernetes.io/name: stirling-pdf + type: ClusterIP + internalTrafficPolicy: Cluster + ports: + - protocol: TCP + port: 8080 + targetPort: 8080 + name: http diff --git a/apps/stirling-pdf/env/k3s-cluster/config.json b/apps/stirling-pdf/env/k3s-cluster/config.json new file mode 100644 index 0000000..ce892e5 --- /dev/null +++ b/apps/stirling-pdf/env/k3s-cluster/config.json @@ -0,0 +1,12 @@ +{ + "appName": "stirling-pdf", + "userGivenName": "stirling-pdf", + "namespace": "stirling-pdf", + "destNamespace": "stirling-pdf", + "destServer": "https://kubernetes.default.svc", + "srcPath": "apps/stirling-pdf/env/k3s-cluster", + "srcRepoURL": "https://github.com/3dwardch3ng/home-cluster-ops.git", + "srcTargetRevision": "", + "labels": null, + "annotations": null +} \ No newline at end of file diff --git a/apps/stirling-pdf/env/k3s-cluster/ingress.yaml b/apps/stirling-pdf/env/k3s-cluster/ingress.yaml new file mode 100644 index 0000000..150e9ac --- /dev/null +++ b/apps/stirling-pdf/env/k3s-cluster/ingress.yaml @@ -0,0 +1,21 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: stirling-pdf-ingress + namespace: stirling-pdf + annotations: + nginx.ingress.kubernetes.io/ssl-redirect: "false" + nginx.ingress.kubernetes.io/use-regex: "true" +spec: + ingressClassName: nginx + rules: + - host: "s-pdf.cluster.edward.sydney" + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: stirling-pdf + port: + number: 8080 \ No newline at end of file diff --git a/apps/stirling-pdf/env/k3s-cluster/kustomization.yaml b/apps/stirling-pdf/env/k3s-cluster/kustomization.yaml new file mode 100644 index 0000000..a227ac4 --- /dev/null +++ b/apps/stirling-pdf/env/k3s-cluster/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../../base \ No newline at end of file diff --git a/resources/namespaces/env/k3s-cluster/templates/stirling-pdf.yaml b/resources/namespaces/env/k3s-cluster/templates/stirling-pdf.yaml new file mode 100644 index 0000000..af61204 --- /dev/null +++ b/resources/namespaces/env/k3s-cluster/templates/stirling-pdf.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Namespace +metadata: + annotations: + argocd.argoproj.io/sync-options: Prune=false + creationTimestamp: null + name: stirling-pdf +spec: {} +status: {}