-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
527ea13
commit a10917b
Showing
19 changed files
with
494 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v2 | ||
name: immich | ||
version: 1.0.0 | ||
|
||
dependencies: | ||
- name: redis | ||
version: 19.6.0 | ||
repository: https://charts.bitnami.com/bitnami | ||
condition: redis.enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Immich | ||
|
||
## How to use | ||
|
||
Add repository by running: | ||
|
||
```bash | ||
helm repo add k8s-at-our-home https://k8s-at-our-homes.github.io/helm-charts/ | ||
helm install immich k8s-at-our-home/immich | ||
``` | ||
|
||
Or get the chart from ghcr.io: | ||
|
||
```bash | ||
helm install generic-device-plugin oci://ghcr.io/k8s-at-our-homes/helm-charts/immich | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- define "common.name" -}} | ||
{{- .Chart.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "common.fullname" -}} | ||
{{- if contains .Chart.Name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "chartName" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "common.labels" -}} | ||
app.kubernetes.io/version: {{ .Chart.Version | quote }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
helm.sh/chart: {{ include "chartName" . }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
apiVersion: postgresql.cnpg.io/v1 | ||
kind: Cluster | ||
metadata: | ||
name: {{ .Values.database.clusterName }} | ||
labels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich" | ||
{{- include "common.labels" . | nindent 4 }} | ||
spec: | ||
instances: {{ .Values.database.replicas }} | ||
imageName: {{ .Values.database.image.registry }}/{{ .Values.database.image.repository }}:{{ .Values.database.image.tag }} | ||
|
||
postgresql: | ||
shared_preload_libraries: | ||
- "vectors.so" | ||
|
||
logLevel: {{ .Values.database.logLevel }} | ||
|
||
bootstrap: | ||
initdb: | ||
postInitApplicationSQL: | ||
- CREATE EXTENSION IF NOT EXISTS "vectors"; | ||
- CREATE EXTENSION IF NOT EXISTS "cube"; | ||
- CREATE EXTENSION IF NOT EXISTS "earthdistance"; | ||
- ALTER SYSTEM SET search_path TO app, public, vectors; | ||
- ALTER SCHEMA vectors OWNER TO app; | ||
# run this via kubectl exec in database pod after the schema is created | ||
#- \c app; GRANT SELECT ON TABLE pg_vector_index_stat TO app; | ||
|
||
storage: | ||
size: {{ .Values.database.size }} | ||
|
||
{{ if .Values.database.backups.enabled }} | ||
backup: | ||
retentionPolicy: {{ .Values.database.backups.retention }} | ||
barmanObjectStore: | ||
destinationPath: {{ .Values.database.backups.path | quote }} | ||
endpointURL: {{ .Values.database.backups.endpoint }} | ||
s3Credentials: | ||
accessKeyId: | ||
name: {{ .Values.database.backups.secretName }} | ||
key: ACCESS_KEY | ||
secretAccessKey: | ||
name: {{ .Values.database.backups.secretName }} | ||
key: SECRET_KEY | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.database.monitoring.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PodMonitor | ||
metadata: | ||
name: {{ template "common.fullname" . }}-data | ||
labels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich" | ||
{{- include "common.labels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
"cnpg.io/cluster": {{ .Values.database.clusterName }} | ||
podMetricsEndpoints: | ||
- port: metrics | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{ if .Values.ingress.enabled }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ template "common.fullname" . }} | ||
annotations: {{ toYaml .Values.ingress.annotations | nindent 4 }} | ||
labels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich" | ||
{{- include "common.labels" . | nindent 4 }} | ||
spec: | ||
{{- if .Values.ingress.class}} | ||
ingressClassName: {{ .Values.ingress.class }} | ||
{{- end }} | ||
rules: | ||
- host: {{ .Values.ingress.domain }} | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: {{ template "common.fullname" . }} | ||
port: | ||
number: 3001 | ||
path: / | ||
pathType: Prefix | ||
{{- if .Values.ingress.tls.enabled }} | ||
tls: | ||
- hosts: | ||
- {{ .Values.ingress.domain }} | ||
secretName: {{ .Values.ingress.tls.secretName}} | ||
{{- end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: {{ template "common.fullname" . }}-machine-learning | ||
labels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich-machine-learning" | ||
{{- include "common.labels" . | nindent 4 }} | ||
spec: | ||
revisionHistoryLimit: 0 | ||
replicas: {{ .Values.server.replicas }} | ||
strategy: | ||
type: Recreate | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich-machine-learning" | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich-machine-learning" | ||
{{- include "common.labels" . | nindent 8 }} | ||
spec: | ||
containers: | ||
- name: server | ||
image: "{{ .Values.machineLearning.image.registry }}/{{ .Values.machineLearning.image.repository }}:{{ .Values.machineLearning.image.tag }}" | ||
imagePullPolicy: {{ .Values.machineLearning.image.pullPolicy }} | ||
env: | ||
- name: IMMICH_PORT | ||
value: "3003" | ||
- name: TRANSFORMERS_CACHE | ||
value: /cache | ||
livenessProbe: | ||
initialDelaySeconds: 0 | ||
timeoutSeconds: 1 | ||
periodSeconds: 10 | ||
failureThreshold: 3 | ||
httpGet: | ||
port: http | ||
path: /ping | ||
readinessProbe: | ||
initialDelaySeconds: 0 | ||
timeoutSeconds: 1 | ||
periodSeconds: 10 | ||
failureThreshold: 3 | ||
httpGet: | ||
port: http | ||
path: /ping | ||
volumeMounts: | ||
- name: cache | ||
mountPath: /cache | ||
ports: | ||
- name: http | ||
containerPort: 3003 | ||
protocol: TCP | ||
resources: {{ toYaml .Values.machineLearning.resources | nindent 12 }} | ||
volumes: | ||
- name: cache | ||
emptyDir: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "common.fullname" . }}-machine-learning | ||
labels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich-machine-learning" | ||
{{- include "common.labels" . | nindent 4 }} | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 3003 | ||
targetPort: 3003 | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich-machine-learning" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: {{ template "common.fullname" . }}-library | ||
labels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich" | ||
{{- include "common.labels" . | nindent 4 }} | ||
spec: | ||
accessModes: | ||
- {{ .Values.persistence.accessMode }} | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistence.size }} | ||
{{- with .Values.persistence.storageClass }} | ||
storageClassName: {{ . }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: {{ template "common.fullname" . }}-server | ||
labels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich-server" | ||
{{- include "common.labels" . | nindent 4 }} | ||
spec: | ||
revisionHistoryLimit: 0 | ||
replicas: {{ .Values.server.replicas }} | ||
strategy: | ||
type: Recreate | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich-server" | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich-server" | ||
{{- include "common.labels" . | nindent 8 }} | ||
spec: | ||
containers: | ||
- name: server | ||
image: "{{ .Values.server.image.registry }}/{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}" | ||
imagePullPolicy: {{ .Values.server.image.pullPolicy }} | ||
env: | ||
- name: IMMICH_METRICS | ||
value: "true" | ||
- name: IMMICH_METRICS_PORT | ||
value: "8081" | ||
- name: IMMICH_PORT | ||
value: "3001" | ||
- name: DB_HOSTNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.database.clusterName }}-app | ||
key: host | ||
- name: DB_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.database.clusterName }}-app | ||
key: username | ||
- name: DB_DATABASE_NAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.database.clusterName }}-app | ||
key: dbname | ||
- name: REDIS_HOSTNAME | ||
value: {{ .Release.Name }}-redis-master | ||
- name: IMMICH_MACHINE_LEARNING_URL | ||
value: http://{{ template "common.fullname" . }}-machine-learning:3003 | ||
- name: DB_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.database.clusterName }}-app | ||
key: password | ||
livenessProbe: | ||
initialDelaySeconds: 0 | ||
timeoutSeconds: 1 | ||
periodSeconds: 10 | ||
failureThreshold: 3 | ||
httpGet: | ||
port: http | ||
path: /api/server-info/ping | ||
readinessProbe: | ||
initialDelaySeconds: 0 | ||
timeoutSeconds: 1 | ||
periodSeconds: 10 | ||
failureThreshold: 3 | ||
httpGet: | ||
port: http | ||
path: /api/server-info/ping | ||
volumeMounts: | ||
- name: library | ||
mountPath: /usr/src/app/upload | ||
ports: | ||
- name: http | ||
containerPort: 3001 | ||
protocol: TCP | ||
- name: metrics | ||
containerPort: 8081 | ||
protocol: TCP | ||
resources: {{ toYaml .Values.server.resources | nindent 12 }} | ||
volumes: | ||
- name: library | ||
persistentVolumeClaim: | ||
claimName: {{ template "common.fullname" . }}-library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "common.fullname" . }}-server-metrics | ||
labels: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich-server" | ||
{{- include "common.labels" . | nindent 4 }} | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 8081 | ||
targetPort: 8081 | ||
protocol: TCP | ||
name: metrics | ||
selector: | ||
app.kubernetes.io/name: {{ template "common.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: "immich-server" |
Oops, something went wrong.