Compare commits
9 Commits
208e12266f
...
e8f1185412
| Author | SHA1 | Date | |
|---|---|---|---|
| e8f1185412 | |||
| f4044715e4 | |||
| ffa4059b07 | |||
| 735d00eaf0 | |||
| 1c6ffc6fad | |||
| b5e1276977 | |||
| df4cf4ba77 | |||
| 5ff3589fc9 | |||
| 63b768ebf4 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -11,3 +11,7 @@ cronjobs
|
|||||||
|
|
||||||
*.crt
|
*.crt
|
||||||
*.key
|
*.key
|
||||||
|
|
||||||
|
chacal/
|
||||||
|
|
||||||
|
secrets/
|
||||||
@@ -23,10 +23,13 @@ The repository name references my local TLD, `.haven` ;)
|
|||||||
- Uptimekuma
|
- Uptimekuma
|
||||||
- Vaultwarden
|
- Vaultwarden
|
||||||
- OpenWebUI
|
- OpenWebUI
|
||||||
|
- Paperless
|
||||||
|
- cloud
|
||||||
|
- Cloudreve
|
||||||
|
- Slink
|
||||||
- dns
|
- dns
|
||||||
- AdGuardHome
|
- AdGuardHome
|
||||||
- AdGuardHome-2 (2nd instance)
|
- AdGuardSync
|
||||||
- AdGuard-Sync
|
|
||||||
- infra
|
- infra
|
||||||
- [Haven Notify](https://git.ivanch.me/ivanch/server-scripts/src/branch/main/haven-notify)
|
- [Haven Notify](https://git.ivanch.me/ivanch/server-scripts/src/branch/main/haven-notify)
|
||||||
- Beszel
|
- Beszel
|
||||||
|
|||||||
178
cloud/cloudreve.yaml
Normal file
178
cloud/cloudreve.yaml
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
# 2) Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: cloudreve
|
||||||
|
namespace: cloud
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: cloudreve
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: cloudreve
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: cloudreve
|
||||||
|
image: cloudreve/cloudreve:v4
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 5212
|
||||||
|
name: http
|
||||||
|
- containerPort: 6888
|
||||||
|
name: slave-tcp
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 6888
|
||||||
|
name: slave-udp
|
||||||
|
protocol: UDP
|
||||||
|
env:
|
||||||
|
- name: CR_CONF_Database.Type
|
||||||
|
value: "postgres"
|
||||||
|
- name: CR_CONF_Database.Host
|
||||||
|
value: "postgresql.haven"
|
||||||
|
- name: CR_CONF_Database.Port
|
||||||
|
value: "5432"
|
||||||
|
- name: CR_CONF_Database.User
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: cloudreve-secret
|
||||||
|
key: DB_USER
|
||||||
|
- name: CR_CONF_Database.Name
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: cloudreve-secret
|
||||||
|
key: DB_NAME
|
||||||
|
- name: CR_CONF_Database.Password
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: cloudreve-secret
|
||||||
|
key: DB_PASSWORD
|
||||||
|
- name: CR_CONF_Database.SSLMode
|
||||||
|
value: "disable"
|
||||||
|
- name: CR_CONF_Redis.Server
|
||||||
|
value: ""
|
||||||
|
- name: CR_CONF_Redis.Password
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: cloudreve-secret
|
||||||
|
key: REDIS_PASSWORD
|
||||||
|
volumeMounts:
|
||||||
|
- name: cloudreve-data
|
||||||
|
mountPath: /cloudreve/data
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "250m"
|
||||||
|
memory: "256Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "1000m"
|
||||||
|
memory: "1Gi"
|
||||||
|
volumes:
|
||||||
|
- name: cloudreve-data
|
||||||
|
nfs:
|
||||||
|
server: 192.168.15.99
|
||||||
|
path: /export/Storage/Cloud
|
||||||
|
---
|
||||||
|
# 3) Service (HTTP)
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: cloudreve
|
||||||
|
namespace: cloud
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: cloudreve
|
||||||
|
ports:
|
||||||
|
- port: 5212
|
||||||
|
targetPort: 5212
|
||||||
|
name: http
|
||||||
|
|
||||||
|
---
|
||||||
|
# 4) Service (Slave node / WebDAV — optional)
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: cloudreve-slave
|
||||||
|
namespace: cloud
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: cloudreve
|
||||||
|
ports:
|
||||||
|
- port: 6888
|
||||||
|
targetPort: 6888
|
||||||
|
name: slave-tcp
|
||||||
|
protocol: TCP
|
||||||
|
- port: 6888
|
||||||
|
targetPort: 6888
|
||||||
|
name: slave-udp
|
||||||
|
protocol: UDP
|
||||||
|
|
||||||
|
---
|
||||||
|
# 5) PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: cloudreve-data
|
||||||
|
namespace: cloud
|
||||||
|
annotations:
|
||||||
|
nfs.io/storage-path: "cloudreve-data"
|
||||||
|
spec:
|
||||||
|
storageClassName: "nfs-client"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
limits:
|
||||||
|
storage: 50Gi
|
||||||
|
---
|
||||||
|
# 6) Ingress
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: cloudreve
|
||||||
|
namespace: cloud
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: cloud.haven
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: cloudreve
|
||||||
|
port:
|
||||||
|
number: 5212
|
||||||
|
---
|
||||||
|
# 7) Ingress Public
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: cloudreve-public
|
||||||
|
namespace: cloud
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: cloud.ivanch.me
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: cloudreve
|
||||||
|
port:
|
||||||
|
number: 5212
|
||||||
136
cloud/slink.yaml
Normal file
136
cloud/slink.yaml
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
# 1) Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: slink
|
||||||
|
namespace: cloud
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: slink
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: slink
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: slink
|
||||||
|
image: anirdev/slink:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
|
env:
|
||||||
|
- name: PUID
|
||||||
|
value: "1000"
|
||||||
|
- name: PGID
|
||||||
|
value: "1000"
|
||||||
|
- name: ORIGIN
|
||||||
|
value: "http://slink.haven"
|
||||||
|
- name: TZ
|
||||||
|
value: "America/Sao_Paulo"
|
||||||
|
- name: USER_APPROVAL_REQUIRED
|
||||||
|
value: "true"
|
||||||
|
- name: USER_PASSWORD_MIN_LENGTH
|
||||||
|
value: "8"
|
||||||
|
- name: USER_PASSWORD_REQUIREMENTS
|
||||||
|
value: "15"
|
||||||
|
- name: ADMIN_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: slink-secret
|
||||||
|
key: ADMIN_USERNAME
|
||||||
|
- name: ADMIN_EMAIL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: slink-secret
|
||||||
|
key: ADMIN_EMAIL
|
||||||
|
- name: ADMIN_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: slink-secret
|
||||||
|
key: ADMIN_PASSWORD
|
||||||
|
- name: IMAGE_MAX_SIZE
|
||||||
|
value: "50M"
|
||||||
|
- name: IMAGE_STRIP_EXIF_METADATA
|
||||||
|
value: "true"
|
||||||
|
- name: IMAGE_COMPRESSION_QUALITY
|
||||||
|
value: "90"
|
||||||
|
- name: STORAGE_PROVIDER
|
||||||
|
value: "local"
|
||||||
|
ports:
|
||||||
|
- containerPort: 3000
|
||||||
|
name: slink-port
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: "64Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "512Mi"
|
||||||
|
volumeMounts:
|
||||||
|
- name: slink-data
|
||||||
|
mountPath: /app/var/data
|
||||||
|
- name: slink-data
|
||||||
|
mountPath: /app/slink/images
|
||||||
|
volumes:
|
||||||
|
- name: slink-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: slink-data
|
||||||
|
---
|
||||||
|
# 2) Service
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: slink
|
||||||
|
namespace: cloud
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: slink
|
||||||
|
ports:
|
||||||
|
- port: 3000
|
||||||
|
targetPort: slink-port
|
||||||
|
---
|
||||||
|
# 3) PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: slink-data
|
||||||
|
namespace: cloud
|
||||||
|
annotations:
|
||||||
|
nfs.io/storage-path: "slink-data"
|
||||||
|
spec:
|
||||||
|
storageClassName: "nfs-client"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
|
limits:
|
||||||
|
storage: 15Gi
|
||||||
|
---
|
||||||
|
# 4) Ingress
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: slink
|
||||||
|
namespace: cloud
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: slink.haven
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: slink
|
||||||
|
port:
|
||||||
|
number: 3000
|
||||||
@@ -15,17 +15,24 @@ spec:
|
|||||||
app: sonic
|
app: sonic
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: sonic
|
- name: sonic
|
||||||
image: archivebox/sonic:latest
|
image: archivebox/sonic:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 1491
|
- containerPort: 1491
|
||||||
env:
|
env:
|
||||||
- name: SEARCH_BACKEND_PASSWORD
|
- name: SEARCH_BACKEND_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: password
|
name: password
|
||||||
key: password
|
key: password
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "50m"
|
||||||
|
limits:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "200m"
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@@ -43,43 +50,50 @@ spec:
|
|||||||
app: archivebox
|
app: archivebox
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: archivebox
|
- name: archivebox
|
||||||
image: archivebox/archivebox:latest
|
image: archivebox/archivebox:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
env:
|
env:
|
||||||
- name: SONIC_HOST
|
- name: SONIC_HOST
|
||||||
value: "sonic.default.svc.cluster.local"
|
value: "sonic.default.svc.cluster.local"
|
||||||
- name: SONIC_PORT
|
- name: SONIC_PORT
|
||||||
value: "1491"
|
value: "1491"
|
||||||
- name: SEARCH_BACKEND_ENGINE
|
- name: SEARCH_BACKEND_ENGINE
|
||||||
value: "sonic"
|
value: "sonic"
|
||||||
- name: SONIC_PASSWORD
|
- name: SONIC_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: password
|
name: password
|
||||||
key: password
|
key: password
|
||||||
- name: ADMIN_USERNAME
|
- name: ADMIN_USERNAME
|
||||||
value: "ivanch"
|
value: "ivanch"
|
||||||
- name: ADMIN_PASSWORD
|
- name: ADMIN_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: password
|
name: password
|
||||||
key: password
|
key: password
|
||||||
- name: CSRF_TRUSTED_ORIGINS
|
- name: CSRF_TRUSTED_ORIGINS
|
||||||
value: "archive.haven"
|
value: "archive.haven"
|
||||||
- name: ALLOWED_HOSTS
|
- name: ALLOWED_HOSTS
|
||||||
value: "*"
|
value: "*"
|
||||||
- name: PUBLIC_ADD_VIEW
|
- name: PUBLIC_ADD_VIEW
|
||||||
value: "false"
|
value: "false"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: archivebox-data
|
- name: archivebox-data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "256Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "2Gi"
|
||||||
|
cpu: "3000m"
|
||||||
volumes:
|
volumes:
|
||||||
- name: archivebox-data
|
- name: archivebox-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: archivebox-data
|
claimName: archivebox-data
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@@ -90,9 +104,9 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: sonic
|
app: sonic
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 1491
|
port: 1491
|
||||||
targetPort: 1491
|
targetPort: 1491
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@@ -103,9 +117,9 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: archivebox
|
app: archivebox
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 8000
|
port: 8000
|
||||||
targetPort: 8000
|
targetPort: 8000
|
||||||
---
|
---
|
||||||
# 3) PersistentVolumeClaim
|
# 3) PersistentVolumeClaim
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@@ -133,13 +147,13 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
rules:
|
rules:
|
||||||
- host: "archive.haven"
|
- host: "archive.haven"
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: archivebox-svc
|
name: archivebox-svc
|
||||||
port:
|
port:
|
||||||
number: 8000
|
number: 8000
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: homepage
|
app.kubernetes.io/name: homepage
|
||||||
annotations:
|
annotations:
|
||||||
configmap.reloader/checksum: "{{ include (print $.Template.BasePath \"/app/config/services.yaml\") . | sha256sum }}"
|
configmap.reloader/checksum: '{{ include (print $.Template.BasePath "/app/config/services.yaml") . | sha256sum }}'
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: homepage
|
serviceAccountName: homepage
|
||||||
automountServiceAccountToken: true
|
automountServiceAccountToken: true
|
||||||
@@ -138,6 +138,13 @@ spec:
|
|||||||
- name: homepage-config
|
- name: homepage-config
|
||||||
mountPath: /app/public/images
|
mountPath: /app/public/images
|
||||||
subPath: images
|
subPath: images
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "512Mi"
|
||||||
|
cpu: "500m"
|
||||||
volumes:
|
volumes:
|
||||||
- name: homepage-config
|
- name: homepage-config
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
@@ -167,7 +174,6 @@ metadata:
|
|||||||
namespace: default
|
namespace: default
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: homepage
|
app.kubernetes.io/name: homepage
|
||||||
annotations:
|
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
@@ -185,12 +191,6 @@ metadata:
|
|||||||
namespace: default
|
namespace: default
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: homepage
|
app.kubernetes.io/name: homepage
|
||||||
# annotations:
|
|
||||||
# gethomepage.dev/description: Dynamically Detected Homepage
|
|
||||||
# gethomepage.dev/enabled: "true"
|
|
||||||
# gethomepage.dev/group: Cluster Management
|
|
||||||
# gethomepage.dev/icon: homepage.png
|
|
||||||
# gethomepage.dev/name: Homepage
|
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
@@ -15,17 +15,24 @@ spec:
|
|||||||
app: it-tools
|
app: it-tools
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: it-tools
|
- name: it-tools
|
||||||
image: corentinth/it-tools:latest
|
image: corentinth/it-tools:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
port: 80
|
port: 80
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "64Mi"
|
||||||
|
cpu: "50m"
|
||||||
|
limits:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "200m"
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@@ -36,9 +43,9 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: it-tools
|
app: it-tools
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 80
|
targetPort: 80
|
||||||
---
|
---
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
@@ -48,13 +55,13 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
rules:
|
rules:
|
||||||
- host: "tools.haven"
|
- host: "tools.haven"
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: it-tools-svc
|
name: it-tools-svc
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
|
|||||||
@@ -19,8 +19,25 @@ spec:
|
|||||||
- name: notepad
|
- name: notepad
|
||||||
image: jdreinhardt/minimalist-web-notepad:latest
|
image: jdreinhardt/minimalist-web-notepad:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
# The image entrypoint runs `chown -R www-data:www-data` on the NFS-mounted
|
||||||
|
# _tmp dir, which fails because the NFS export uses all_squash (anonuid=65534).
|
||||||
|
# Override the entrypoint to skip chown — ownership is handled by the NFS server.
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- >-
|
||||||
|
mkdir -p /var/www/html/_tmp &&
|
||||||
|
cp -n /var/www/html/notes.htaccess /var/www/html/_tmp/.htaccess 2>/dev/null;
|
||||||
|
exec docker-php-entrypoint apache2-foreground
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 64Mi
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 128Mi
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: notepad-data
|
- name: notepad-data
|
||||||
mountPath: /var/www/html/_tmp
|
mountPath: /var/www/html/_tmp
|
||||||
@@ -69,7 +86,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
rules:
|
rules:
|
||||||
- host: notepad.lab
|
- host: notepad.haven
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
|
|||||||
@@ -14,12 +14,34 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: openwebui
|
app: openwebui
|
||||||
spec:
|
spec:
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- iris
|
||||||
containers:
|
containers:
|
||||||
- name: openwebui
|
- name: openwebui
|
||||||
image: ghcr.io/open-webui/open-webui:main-slim
|
image: ghcr.io/open-webui/open-webui:main-slim
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: PUID
|
||||||
|
value: "1000"
|
||||||
|
- name: PGID
|
||||||
|
value: "1000"
|
||||||
|
- name: TZ
|
||||||
|
value: "America/Sao_Paulo"
|
||||||
|
- name: DATABASE_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: openwebui-secret
|
||||||
|
key: DATABASE_URL
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: "250m"
|
cpu: "250m"
|
||||||
|
|||||||
131
default/paperless.yaml
Normal file
131
default/paperless.yaml
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
---
|
||||||
|
# 1) Deployment
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: paperless
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: paperless
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: paperless
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- iris
|
||||||
|
containers:
|
||||||
|
- name: paperless
|
||||||
|
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: PUID
|
||||||
|
value: "1000"
|
||||||
|
- name: PGID
|
||||||
|
value: "1000"
|
||||||
|
- name: PAPERLESS_URL
|
||||||
|
value: "http://paperless.haven"
|
||||||
|
- name: PAPERLESS_TIME_ZONE
|
||||||
|
value: "America/Sao_Paulo"
|
||||||
|
- name: PAPERLESS_OCR_LANGUAGE
|
||||||
|
value: "por"
|
||||||
|
- name: PAPERLESS_OCR_LANGUAGES
|
||||||
|
value: "por"
|
||||||
|
- name: PAPERLESS_OCR_USER_ARGS
|
||||||
|
value: '{"invalidate_digital_signatures": true}'
|
||||||
|
- name: PAPERLESS_DBHOST
|
||||||
|
value: postgresql.haven
|
||||||
|
- name: PAPERLESS_REDIS
|
||||||
|
value: "redis://redis.haven:6379"
|
||||||
|
- name: PAPERLESS_PORT
|
||||||
|
value: "8000"
|
||||||
|
ports:
|
||||||
|
- containerPort: 8000
|
||||||
|
name: paperless-port
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: "256Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "4000m"
|
||||||
|
memory: "1Gi"
|
||||||
|
volumeMounts:
|
||||||
|
- name: paperless-data
|
||||||
|
subPath: data
|
||||||
|
mountPath: /usr/src/paperless/data
|
||||||
|
- name: paperless-data
|
||||||
|
subPath: media
|
||||||
|
mountPath: /usr/src/paperless/media
|
||||||
|
- name: paperless-data
|
||||||
|
subPath: export
|
||||||
|
mountPath: /usr/src/paperless/export
|
||||||
|
- name: paperless-data
|
||||||
|
subPath: consume
|
||||||
|
mountPath: /usr/src/paperless/consume
|
||||||
|
volumes:
|
||||||
|
- name: paperless-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: paperless-data
|
||||||
|
---
|
||||||
|
# 2) Service
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: paperless
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: paperless
|
||||||
|
ports:
|
||||||
|
- port: 8000
|
||||||
|
targetPort: paperless-port
|
||||||
|
---
|
||||||
|
# 3) PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: paperless-data
|
||||||
|
namespace: default
|
||||||
|
annotations:
|
||||||
|
nfs.io/storage-path: "paperless-data"
|
||||||
|
spec:
|
||||||
|
storageClassName: "nfs-client"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
|
limits:
|
||||||
|
storage: 15Gi
|
||||||
|
---
|
||||||
|
# 4) Ingress
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: paperless
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: paperless.haven
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: paperless
|
||||||
|
port:
|
||||||
|
number: 8000
|
||||||
@@ -40,7 +40,7 @@ spec:
|
|||||||
name: web-port
|
name: web-port
|
||||||
env:
|
env:
|
||||||
- name: CRON
|
- name: CRON
|
||||||
value: "*/2 * * * *"
|
value: "0 * * * *"
|
||||||
- name: RUN_ON_START
|
- name: RUN_ON_START
|
||||||
value: "true"
|
value: "true"
|
||||||
- name: LOG_LEVEL
|
- name: LOG_LEVEL
|
||||||
|
|||||||
@@ -1,145 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: adguardhome2-pvc
|
|
||||||
namespace: dns
|
|
||||||
annotations:
|
|
||||||
nfs.io/storage-path: "adguardhome2-config"
|
|
||||||
spec:
|
|
||||||
storageClassName: "nfs-client"
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: adguardhome2
|
|
||||||
namespace: dns
|
|
||||||
spec:
|
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: adguardhome2
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: adguardhome2
|
|
||||||
spec:
|
|
||||||
affinity:
|
|
||||||
nodeAffinity:
|
|
||||||
preferredDuringSchedulingIgnoredDuringExecution:
|
|
||||||
- weight: 100
|
|
||||||
preference:
|
|
||||||
matchExpressions:
|
|
||||||
- key: kubernetes.io/hostname
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- iris
|
|
||||||
containers:
|
|
||||||
- name: adguardhome2
|
|
||||||
image: adguard/adguardhome:latest
|
|
||||||
imagePullPolicy: Always
|
|
||||||
ports:
|
|
||||||
- containerPort: 53
|
|
||||||
protocol: TCP
|
|
||||||
- containerPort: 53
|
|
||||||
protocol: UDP
|
|
||||||
- containerPort: 3000
|
|
||||||
protocol: TCP
|
|
||||||
name: install-port
|
|
||||||
- containerPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
name: web-port
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 256Mi
|
|
||||||
volumeMounts:
|
|
||||||
- name: adguardhome2-storage
|
|
||||||
mountPath: /opt/adguardhome/work
|
|
||||||
- name: adguardhome2-storage
|
|
||||||
mountPath: /opt/adguardhome/conf
|
|
||||||
volumes:
|
|
||||||
- name: adguardhome2-storage
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: adguardhome2-pvc
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: adguardhome2-svc
|
|
||||||
namespace: dns
|
|
||||||
spec:
|
|
||||||
type: LoadBalancer
|
|
||||||
selector:
|
|
||||||
app: adguardhome2
|
|
||||||
loadBalancerIP: 192.168.15.201
|
|
||||||
ports:
|
|
||||||
- name: dns-tcp
|
|
||||||
port: 53
|
|
||||||
targetPort: 53
|
|
||||||
protocol: TCP
|
|
||||||
- name: dns-udp
|
|
||||||
port: 53
|
|
||||||
targetPort: 53
|
|
||||||
protocol: UDP
|
|
||||||
- name: web
|
|
||||||
port: 80
|
|
||||||
targetPort: 80
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: adguard2-install-svc
|
|
||||||
namespace: dns
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: adguardhome2
|
|
||||||
ports:
|
|
||||||
- name: install
|
|
||||||
port: 3000
|
|
||||||
targetPort: 3000
|
|
||||||
---
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: adguardhome2-ingress
|
|
||||||
namespace: dns
|
|
||||||
spec:
|
|
||||||
ingressClassName: nginx
|
|
||||||
rules:
|
|
||||||
- host: adguard2.haven
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: adguardhome2-svc
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
---
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: adguardhome2-install-ingress
|
|
||||||
namespace: dns
|
|
||||||
spec:
|
|
||||||
ingressClassName: nginx
|
|
||||||
rules:
|
|
||||||
- host: install.adguard2.haven
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: adguard2-install-svc
|
|
||||||
port:
|
|
||||||
number: 3000
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
# docker-node: iris.haven
|
|
||||||
# port: 4100
|
|
||||||
|
|
||||||
# Service
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: paperless-service
|
|
||||||
namespace: docker-ingress
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
targetPort: 4200
|
|
||||||
---
|
|
||||||
# Endpoints
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Endpoints
|
|
||||||
metadata:
|
|
||||||
name: paperless-service
|
|
||||||
namespace: docker-ingress
|
|
||||||
subsets:
|
|
||||||
- addresses:
|
|
||||||
- ip: 192.168.20.100
|
|
||||||
ports:
|
|
||||||
- port: 4200
|
|
||||||
---
|
|
||||||
# Ingress
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: paperless-ingress
|
|
||||||
namespace: docker-ingress
|
|
||||||
spec:
|
|
||||||
rules:
|
|
||||||
- host: paperless.haven
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: paperless-service
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
@@ -15,6 +15,16 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: code-config
|
app: code-config
|
||||||
spec:
|
spec:
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- iris
|
||||||
containers:
|
containers:
|
||||||
- name: code-config
|
- name: code-config
|
||||||
image: lscr.io/linuxserver/code-server:latest
|
image: lscr.io/linuxserver/code-server:latest
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 250m
|
cpu: 250m
|
||||||
memory: 750Mi
|
memory: 750Mi
|
||||||
|
limits:
|
||||||
|
memory: 1Gi
|
||||||
|
cpu: 500m
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /var/lib/grafana
|
- mountPath: /var/lib/grafana
|
||||||
name: grafana-pv
|
name: grafana-pv
|
||||||
@@ -103,3 +106,22 @@ spec:
|
|||||||
name: grafana
|
name: grafana
|
||||||
port:
|
port:
|
||||||
number: 3000
|
number: 3000
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
namespace: monitoring
|
||||||
|
name: grafana-public
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: grafanah.ivanch.me
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: grafana
|
||||||
|
port:
|
||||||
|
number: 3000
|
||||||
|
|||||||
Reference in New Issue
Block a user