Add Kubernetes manifests for self-hosted services
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: immich-env
|
||||
namespace: immich
|
||||
labels:
|
||||
app: immich
|
||||
data:
|
||||
DB_DATABASE_NAME: "immich"
|
||||
DB_HOSTNAME: "postgres.database.svc.cluster.local"
|
||||
DB_USERNAME: "immich"
|
||||
DISABLE_REVERSE_GEOCODING: "false"
|
||||
IMMICH_MACHINE_LEARNING_URL: "http://immich-machine-learning.immich.svc.cluster.local:3003"
|
||||
REDIS_DBINDEX: "0"
|
||||
REDIS_HOSTNAME: "immich-redis.immich.svc.cluster.local"
|
||||
REDIS_PASSWORD: ""
|
||||
REDIS_PORT: "6379"
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: immich-machine-learning
|
||||
namespace: immich
|
||||
labels:
|
||||
app: immich-machine-learning
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: immich-machine-learning
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: immich-machine-learning
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 0
|
||||
serviceAccountName: default
|
||||
automountServiceAccountToken: true
|
||||
dnsPolicy: ClusterFirst
|
||||
enableServiceLinks: true
|
||||
containers:
|
||||
- name: immich-machine-learning
|
||||
image: "ghcr.io/immich-app/immich-machine-learning:release"
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 3003
|
||||
env:
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: immich-db-secret
|
||||
key: DB_PASSWORD
|
||||
- name: TRANSFORMERS_CACHE
|
||||
value: /cache
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: immich-env
|
||||
optional: false
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: 3003
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: 3003
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 1
|
||||
volumeMounts:
|
||||
- name: cache
|
||||
mountPath: /cache
|
||||
resources: {}
|
||||
volumes:
|
||||
- name: cache
|
||||
emptyDir: {}
|
||||
@@ -0,0 +1,15 @@
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: immich-machine-learning
|
||||
namespace: immich
|
||||
labels:
|
||||
app: immich-machine-learning
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: immich-machine-learning
|
||||
ports:
|
||||
- port: 3003
|
||||
targetPort: 3003
|
||||
protocol: TCP
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: immich-redis
|
||||
namespace: immich
|
||||
spec:
|
||||
selector:
|
||||
app: immich-redis
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 6379
|
||||
targetPort: 6379
|
||||
@@ -0,0 +1,80 @@
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: immich-server
|
||||
namespace: immich
|
||||
labels:
|
||||
app: immich-server
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: immich-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: immich-server
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 0
|
||||
serviceAccountName: default
|
||||
dnsPolicy: ClusterFirst
|
||||
initContainers:
|
||||
- name: postgresql-isready
|
||||
image: "docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0"
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: immich-env
|
||||
key: DB_USERNAME
|
||||
- name: POSTGRES_DB
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: immich-env
|
||||
key: DB_DATABASE_NAME
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- until pg_isready -U "${POSTGRES_USER}" -d "${POSTGRES_DB}"
|
||||
-h postgres.database.svc.cluster.local -p 5432 ; do sleep 2 ; done
|
||||
containers:
|
||||
- name: immich-server
|
||||
image: "ghcr.io/immich-app/immich-server:release"
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
ports:
|
||||
- containerPort: 2283
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: immich-env
|
||||
optional: false
|
||||
- secretRef:
|
||||
name: immich-db-secret
|
||||
optional: false
|
||||
livenessProbe:
|
||||
failureThreshold: 120
|
||||
httpGet:
|
||||
path: /server/ping
|
||||
port: 2283
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 120
|
||||
timeoutSeconds: 1
|
||||
readinessProbe:
|
||||
failureThreshold: 120
|
||||
httpGet:
|
||||
path: /server/ping
|
||||
port: 2283
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 120
|
||||
timeoutSeconds: 1
|
||||
volumeMounts:
|
||||
- name: library
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: library
|
||||
persistentVolumeClaim:
|
||||
claimName: immich-lib
|
||||
@@ -0,0 +1,25 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: immich-redis
|
||||
namespace: immich
|
||||
labels:
|
||||
app: immich-redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: immich-redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: immich-redis
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-creds
|
||||
containers:
|
||||
- name: immich-redis
|
||||
image: docker.io/valkey/valkey:9@sha256:3b55fbaa0cd93cf0d9d961f405e4dfcc70efe325e2d84da207a0a8e6d8fde4f9
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
Reference in New Issue
Block a user