add app obsidian

This commit is contained in:
2024-07-25 07:30:24 +10:00
parent 11e299d845
commit e5947cc8ee
7 changed files with 111 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: obsidian
namespace: obsidian
labels:
app.kubernetes.io/name: obsidian
spec:
selector:
matchLabels:
app.kubernetes.io/name: obsidian
template:
metadata:
labels:
app.kubernetes.io/name: obsidian
spec:
securityContext:
runAsUser: 1000
runAsGroup: 1000
containers:
- name: obsidian
image: ghcr.io/sytone/obsidian-remote:0.1.1
securityContext:
allowPrivilegeEscalation: false
ports:
- protocol: TCP
containerPort: 8080
name: http
volumeMounts:
- name: obsidian-config
mountPath: /config
- name: obsidian-vaults
mountPath: /vaults
volumes:
- name: obsidian-config
hostPath:
path: /mnt/nfs/AppData/obsidian/config
type: Directory
- name: obsidian-vaults
hostPath:
path: /mnt/nfs/AppData/obsidian/vaults
type: Directory

View File

@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./deployment.yaml
- ./service.yaml

View File

@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: obsidian
namespace: obsidian
labels:
app.kubernetes.io/name: obsidian
spec:
selector:
app.kubernetes.io/name: obsidian
type: ClusterIP
internalTrafficPolicy: Cluster
ports:
- protocol: TCP
port: 8080
targetPort: 8080
name: http

View File

@@ -0,0 +1,12 @@
{
"appName": "obsidian",
"userGivenName": "obsidian",
"namespace": "obsidian",
"destNamespace": "obsidian",
"destServer": "https://kubernetes.default.svc",
"srcPath": "apps/obsidian/env/k3s-cluster",
"srcRepoURL": "https://github.com/3dwardch3ng/home-cluster-ops.git",
"srcTargetRevision": "",
"labels": null,
"annotations": null
}

View File

@@ -0,0 +1,21 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: obsidian-ingress
namespace: obsidian
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
ingressClassName: nginx
rules:
- host: "obsidian.cluster.edward.sydney"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: obsidian
port:
number: 8080

View File

@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
- ./ingress.yaml

View File

@@ -0,0 +1,9 @@
apiVersion: v1
kind: Namespace
metadata:
annotations:
argocd.argoproj.io/sync-options: Prune=false
creationTimestamp: null
name: obsidian
spec: {}
status: {}