Skip to content

Commit 6f40768

Browse files
committed
chore(k8s/magiclove/immich): add smb server
1 parent e8e7b11 commit 6f40768

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

k8s/magiclove/immich/server/deployment_list.cue

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,24 @@ import (
2323
volumes: [{
2424
name: "library"
2525
persistentVolumeClaim: claimName: "\(#Name)-library"
26+
}, {
27+
name: "external-library"
28+
persistentVolumeClaim: claimName: "\(#Name)-external-library"
29+
}, {
30+
name: "smb-var-cache"
31+
emptyDir: {}
32+
}, {
33+
name: "smb-var-lib"
34+
emptyDir: {}
35+
}, {
36+
name: "smb-var-lib-private"
37+
emptyDir: {}
38+
}, {
39+
name: "smb-var-log"
40+
emptyDir: {}
41+
}, {
42+
name: "smb-var-run"
43+
emptyDir: {}
2644
}]
2745
containers: [{
2846
name: "server"
@@ -69,6 +87,46 @@ import (
6987
volumeMounts: [{
7088
name: "library"
7189
mountPath: "/usr/src/app/upload"
90+
}, {
91+
name: "external-library"
92+
readOnly: true
93+
mountPath: "/external-library"
94+
}]
95+
imagePullPolicy: v1.#PullIfNotPresent
96+
securityContext: {
97+
capabilities: drop: ["ALL"]
98+
readOnlyRootFilesystem: true
99+
allowPrivilegeEscalation: false
100+
}
101+
}, {
102+
name: "samba"
103+
image: "ghcr.io/uhthomas/uhthomas/samba:6f48fe9eef20bc6966f2694e89d351c4727bfcd1"
104+
ports: [{
105+
name: "smb"
106+
containerPort: 445
107+
}]
108+
resources: limits: {
109+
(v1.#ResourceCPU): "1"
110+
(v1.#ResourceMemory): "1Gi"
111+
}
112+
volumeMounts: [{
113+
name: "smb-var-cache"
114+
mountPath: "/var/cache/samba"
115+
}, {
116+
name: "smb-var-lib"
117+
mountPath: "/var/lib/samba"
118+
}, {
119+
name: "smb-var-lib-private"
120+
mountPath: "/var/lib/samba/private"
121+
}, {
122+
name: "smb-var-log"
123+
mountPath: "/var/log/samba"
124+
}, {
125+
name: "smb-var-run"
126+
mountPath: "/var/run/samba"
127+
}, {
128+
name: "external-library"
129+
mountPath: "/data"
72130
}]
73131
imagePullPolicy: v1.#PullIfNotPresent
74132
securityContext: {

k8s/magiclove/immich/server/service_list.cue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ import "k8s.io/api/core/v1"
2121
name: "http-metrics"
2222
port: 8081
2323
targetPort: "http-metrics"
24+
}, {
25+
name: "smb"
26+
port: 445
27+
targetPort: "smb"
2428
}]
2529
selector: "app.kubernetes.io/name": #Name
30+
type: v1.#ServiceTypeLoadBalancer
2631
}
2732
}]

0 commit comments

Comments
 (0)