diff options
Diffstat (limited to 'roles/photos/files')
-rw-r--r-- | roles/photos/files/core/Chart.yaml | 6 | ||||
-rw-r--r-- | roles/photos/files/core/templates/ingress.yaml | 33 | ||||
-rw-r--r-- | roles/photos/files/core/templates/pv.yaml | 16 | ||||
-rw-r--r-- | roles/photos/files/core/templates/pvc.yaml | 14 | ||||
-rw-r--r-- | roles/photos/files/postgres/Chart.yaml | 6 | ||||
-rw-r--r-- | roles/photos/files/postgres/templates/database.yaml | 37 | ||||
-rw-r--r-- | roles/photos/files/postgres/templates/pv.yaml | 16 | ||||
-rw-r--r-- | roles/photos/files/postgres/templates/pvc.yaml | 14 | ||||
-rw-r--r-- | roles/photos/files/postgres/templates/service.yaml | 12 |
9 files changed, 154 insertions, 0 deletions
diff --git a/roles/photos/files/core/Chart.yaml b/roles/photos/files/core/Chart.yaml new file mode 100644 index 0000000..7cb306b --- /dev/null +++ b/roles/photos/files/core/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: immich-core +description: Core for immich +type: application + +version: 0.1.0 diff --git a/roles/photos/files/core/templates/ingress.yaml b/roles/photos/files/core/templates/ingress.yaml new file mode 100644 index 0000000..c883185 --- /dev/null +++ b/roles/photos/files/core/templates/ingress.yaml @@ -0,0 +1,33 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: immich + annotations: + cert-manager.io/cluster-issuer: "letsencrypt-prod" +spec: + ingressClassName: traefik + tls: + - hosts: + - photos.aadityadhruv.com + secretName: immich-tls + rules: + - host: photos.home + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: immich-server + port: + number: 2283 + - host: photos.aadityadhruv.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: immich-server + port: + number: 2283 diff --git a/roles/photos/files/core/templates/pv.yaml b/roles/photos/files/core/templates/pv.yaml new file mode 100644 index 0000000..cacdcf9 --- /dev/null +++ b/roles/photos/files/core/templates/pv.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: "immich-pv" + labels: + app: "immich-pv" +spec: + storageClassName: nfs + capacity: + storage: 200Gi + accessModes: + - ReadWriteMany + nfs: + server: {{ .Values.nfs.server }} + path: {{ .Values.nfs.path }} + readOnly: false diff --git a/roles/photos/files/core/templates/pvc.yaml b/roles/photos/files/core/templates/pvc.yaml new file mode 100644 index 0000000..6ce8f0c --- /dev/null +++ b/roles/photos/files/core/templates/pvc.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: immich-pvc +spec: + storageClassName: nfs + accessModes: + - ReadWriteMany + resources: + requests: + storage: 200Gi + selector: + matchLabels: + app: "immich-pv" diff --git a/roles/photos/files/postgres/Chart.yaml b/roles/photos/files/postgres/Chart.yaml new file mode 100644 index 0000000..f64d74d --- /dev/null +++ b/roles/photos/files/postgres/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: pgvectors +description: Postgres chart with pgvector extension +type: application + +version: 0.1.0 diff --git a/roles/photos/files/postgres/templates/database.yaml b/roles/photos/files/postgres/templates/database.yaml new file mode 100644 index 0000000..098a410 --- /dev/null +++ b/roles/photos/files/postgres/templates/database.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "immich-postgres-deployment" + labels: + app: "immich-db" +spec: + replicas: 1 + selector: + matchLabels: + app: "immich-db" + template: + metadata: + labels: + app: "immich-db" + spec: + containers: + - name: immich-db + image: "{{ .Values.image }}:{{ .Values.version }}" + env: + - name: POSTGRES_USER + value: {{ .Values.user }} + - name: POSTGRES_DB + value: immich + - name: POSTGRES_PASSWORD + value: {{ .Values.password }} + - name: PGDATA + value: /var/lib/postgresql/data/_data + ports: + - containerPort: 5432 + volumeMounts: + - mountPath: "/var/lib/postgresql/data" + name: "immich-database-volume" + volumes: + - name: "immich-database-volume" + persistentVolumeClaim: + claimName: "immich-db-pvc" diff --git a/roles/photos/files/postgres/templates/pv.yaml b/roles/photos/files/postgres/templates/pv.yaml new file mode 100644 index 0000000..14b5aa2 --- /dev/null +++ b/roles/photos/files/postgres/templates/pv.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: "immich-db-pv" + labels: + app: "immich-db-pv" +spec: + storageClassName: nfs + capacity: + storage: 10Gi + accessModes: + - ReadWriteMany + nfs: + server: {{ .Values.nfs.server }} + path: {{ .Values.nfs.path }} + readOnly: false diff --git a/roles/photos/files/postgres/templates/pvc.yaml b/roles/photos/files/postgres/templates/pvc.yaml new file mode 100644 index 0000000..4b3aca7 --- /dev/null +++ b/roles/photos/files/postgres/templates/pvc.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: immich-db-pvc +spec: + storageClassName: nfs + accessModes: + - ReadWriteMany + resources: + requests: + storage: 10Gi + selector: + matchLabels: + app: "immich-db-pv" diff --git a/roles/photos/files/postgres/templates/service.yaml b/roles/photos/files/postgres/templates/service.yaml new file mode 100644 index 0000000..8fb9a49 --- /dev/null +++ b/roles/photos/files/postgres/templates/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: immich-db-service +spec: + type: ClusterIP + selector: + app: immich-db + ports: + - protocol: TCP + port: 5432 + targetPort: 5432 |