diff --git a/trilium/argocd-app.yaml b/trilium/argocd-app.yaml new file mode 100644 index 0000000..15b768b --- /dev/null +++ b/trilium/argocd-app.yaml @@ -0,0 +1,20 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: trilium + namespace: argocd +spec: + project: default + source: + repoURL: https://git.chemavx.xyz/chemavx/k8s-manifests + targetRevision: HEAD + path: trilium + destination: + server: https://kubernetes.default.svc + namespace: trilium + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/trilium/deployment.yaml b/trilium/deployment.yaml new file mode 100644 index 0000000..3e68aa1 --- /dev/null +++ b/trilium/deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: trilium + namespace: trilium +spec: + replicas: 1 + selector: + matchLabels: + app: trilium + template: + metadata: + labels: + app: trilium + spec: + containers: + - name: trilium + image: zadam/trilium:latest + imagePullPolicy: Always + ports: + - containerPort: 8080 + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi + volumeMounts: + - name: data + mountPath: /home/node/trilium-data + volumes: + - name: data + persistentVolumeClaim: + claimName: trilium-pvc diff --git a/trilium/ingress.yaml b/trilium/ingress.yaml new file mode 100644 index 0000000..b30e3fa --- /dev/null +++ b/trilium/ingress.yaml @@ -0,0 +1,25 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: trilium + namespace: trilium + annotations: + cert-manager.io/cluster-issuer: letsencrypt-prod + traefik.ingress.kubernetes.io/router.entrypoints: websecure +spec: + ingressClassName: traefik + rules: + - host: trilium.chemavx.xyz + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: trilium + port: + number: 8080 + tls: + - hosts: + - trilium.chemavx.xyz + secretName: trilium-tls diff --git a/trilium/namespace.yaml b/trilium/namespace.yaml new file mode 100644 index 0000000..0de267e --- /dev/null +++ b/trilium/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: trilium diff --git a/trilium/pvc.yaml b/trilium/pvc.yaml new file mode 100644 index 0000000..f568722 --- /dev/null +++ b/trilium/pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: trilium-pvc + namespace: trilium +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi + storageClassName: local-path diff --git a/trilium/service.yaml b/trilium/service.yaml new file mode 100644 index 0000000..1a3f80e --- /dev/null +++ b/trilium/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: trilium + namespace: trilium +spec: + selector: + app: trilium + ports: + - name: http + port: 8080 + targetPort: 8080 + type: ClusterIP