From 7aa6d236f0dcb63d6a853382f6d5430dbb5bcd45 Mon Sep 17 00:00:00 2001 From: secustor Date: Fri, 17 Jan 2025 22:49:13 +0100 Subject: [PATCH] feat(immich): add initial chart --- .github/workflows/release.yaml | 56 +++++ .gitignore | 4 + README.md | 4 +- charts/immich/.helmignore | 23 ++ charts/immich/Chart.yaml | 7 + charts/immich/README.md | 9 + charts/immich/templates/NOTES.txt | 0 charts/immich/templates/_common.tpl | 107 +++++++++ charts/immich/templates/_secrets.tpl | 10 + charts/immich/templates/httproute.yaml | 17 ++ .../immich-machine-learning.service.yaml | 15 ++ .../templates/immich-machine-learning.yaml | 88 +++++++ .../immich/templates/immich-server.hpa.yaml | 32 +++ .../templates/immich-server.service.yaml | 15 ++ charts/immich/templates/immich-server.yaml | 118 ++++++++++ charts/immich/templates/ingress.yaml | 43 ++++ charts/immich/templates/secrets.yaml | 24 ++ charts/immich/templates/serviceaccount.yaml | 13 ++ charts/immich/values.yaml | 214 ++++++++++++++++++ cr.yaml | 5 + 20 files changed, 803 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml create mode 100644 .gitignore create mode 100644 charts/immich/.helmignore create mode 100644 charts/immich/Chart.yaml create mode 100644 charts/immich/README.md create mode 100644 charts/immich/templates/NOTES.txt create mode 100644 charts/immich/templates/_common.tpl create mode 100644 charts/immich/templates/_secrets.tpl create mode 100644 charts/immich/templates/httproute.yaml create mode 100644 charts/immich/templates/immich-machine-learning.service.yaml create mode 100644 charts/immich/templates/immich-machine-learning.yaml create mode 100644 charts/immich/templates/immich-server.hpa.yaml create mode 100644 charts/immich/templates/immich-server.service.yaml create mode 100644 charts/immich/templates/immich-server.yaml create mode 100644 charts/immich/templates/ingress.yaml create mode 100644 charts/immich/templates/secrets.yaml create mode 100644 charts/immich/templates/serviceaccount.yaml create mode 100644 charts/immich/values.yaml create mode 100644 cr.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..e15d3bf --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,56 @@ +name: Release Charts + +on: + push: + branches: + - main + +permissions: {} +jobs: + release: + permissions: + contents: write # to push chart release and create a release (helm/chart-releaser-action) + packages: write # needed for ghcr access + + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Set up Helm + uses: azure/setup-helm@v4.2.0 + with: + version: v3.12.0 + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.5.0 + with: + charts_dir: charts + config: cr.yaml + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + CR_SKIP_EXISTING: "true" + + - name: Login to GHCR + uses: docker/login-action@v3.0.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push charts to GHCR + run: | + shopt -s nullglob + for pkg in .cr-release-packages/*.tgz; do + if [ -z "${pkg:-}" ]; then + break + fi + helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY}" + done \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..73da4ad --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# Chart dependencies +**/charts/*.tgz + +output diff --git a/README.md b/README.md index a0d808f..ff1b269 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # helm-charts -Contains Helm charts maintained by myself +Contains Helm charts maintained by myself. + +See the README.md in each chart directory for more information. diff --git a/charts/immich/.helmignore b/charts/immich/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/immich/.helmignore @@ -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/ diff --git a/charts/immich/Chart.yaml b/charts/immich/Chart.yaml new file mode 100644 index 0000000..80a99cf --- /dev/null +++ b/charts/immich/Chart.yaml @@ -0,0 +1,7 @@ +apiVersion: v2 +name: immich +description: A Immich Helm chart targeted at advanced users + +type: application +version: 0.1.0 +appVersion: "v1.124.2" diff --git a/charts/immich/README.md b/charts/immich/README.md new file mode 100644 index 0000000..d6381c3 --- /dev/null +++ b/charts/immich/README.md @@ -0,0 +1,9 @@ +# Immich + +> [!WARNING] +> This chart is in alpha state and should be used with care. +> It is under heavy development. + + +This chart deploys [Immich](https://immich.app/) and +is targeted at an audience which wants to have some lower level control over the deployment. \ No newline at end of file diff --git a/charts/immich/templates/NOTES.txt b/charts/immich/templates/NOTES.txt new file mode 100644 index 0000000..e69de29 diff --git a/charts/immich/templates/_common.tpl b/charts/immich/templates/_common.tpl new file mode 100644 index 0000000..543b6b4 --- /dev/null +++ b/charts/immich/templates/_common.tpl @@ -0,0 +1,107 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "immich.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "immich.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "immich.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "immich.commonLabels" -}} +helm.sh/chart: {{ include "immich.chart" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Common Selector labels +*/}} +{{- define "immich.selectorLabels" -}} +app.kubernetes.io/name: {{ include "immich.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* + Define Immich Server Name +*/}} +{{- define "immich-server.name" -}} +{{- printf "%s-server" (include "immich.fullname" .) | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Immich Server labels +*/}} +{{- define "immich-server.labels" -}} +{{ include "immich.commonLabels" . }} +{{ include "immich-server.selectorLabels" . }} +{{- end }} + +{{/* +Immich Server Selector labels +*/}} +{{- define "immich-server.selectorLabels" -}} +{{ include "immich.selectorLabels" . }} +app.kubernetes.io/component: server +{{- end }} + +{{/* + Define Immich Machine Learning Name +*/}} +{{- define "immich-machine-learning.name" -}} +{{- printf "%s-machine-learning" (include "immich.fullname" .) | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Immich Machine Learning labels +*/}} +{{- define "immich-machine-learning.labels" -}} +{{ include "immich.commonLabels" . }} +{{ include "immich-machine-learning.selectorLabels" . }} +{{- end }} + +{{/* +Immich Machine Learning Selector labels +*/}} +{{- define "immich-machine-learning.selectorLabels" -}} +{{ include "immich.selectorLabels" . }} +app.kubernetes.io/component: machine-learning +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "immich.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "immich.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/immich/templates/_secrets.tpl b/charts/immich/templates/_secrets.tpl new file mode 100644 index 0000000..1c30f2e --- /dev/null +++ b/charts/immich/templates/_secrets.tpl @@ -0,0 +1,10 @@ +{{/* + Secret names +*/}} +{{- define "postgres.secretName" -}} +{{ include "immich.fullname" . }}-postgres +{{- end }} + +{{- define "redis.secretName" -}} +{{ include "immich.fullname" . }}-redis +{{- end }} diff --git a/charts/immich/templates/httproute.yaml b/charts/immich/templates/httproute.yaml new file mode 100644 index 0000000..92d3965 --- /dev/null +++ b/charts/immich/templates/httproute.yaml @@ -0,0 +1,17 @@ +{{- if .Values.httpRoute.enabled -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ include "immich-server.name" . }} + labels: + {{- include "immich-server.labels" . | nindent 4 }} +spec: + parentRefs: + {{- .Values.httpRoute.parentRefs | toYaml | nindent 4 }} + hostnames: + {{- .Values.httpRoute.hostnames | toYaml | nindent 4 }} + rules: + - backendRefs: + - name: {{ include "immich-server.name" . }} + port: {{ .Values.server.service.port }} +{{- end -}} diff --git a/charts/immich/templates/immich-machine-learning.service.yaml b/charts/immich/templates/immich-machine-learning.service.yaml new file mode 100644 index 0000000..ccc4e66 --- /dev/null +++ b/charts/immich/templates/immich-machine-learning.service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "immich-machine-learning.name" . }} + labels: + {{- include "immich-machine-learning.labels" . | nindent 4 }} +spec: + type: {{ .Values.machineLearning.service.type }} + ports: + - port: {{ .Values.machineLearning.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "immich-machine-learning.selectorLabels" . | nindent 4 }} diff --git a/charts/immich/templates/immich-machine-learning.yaml b/charts/immich/templates/immich-machine-learning.yaml new file mode 100644 index 0000000..495c57d --- /dev/null +++ b/charts/immich/templates/immich-machine-learning.yaml @@ -0,0 +1,88 @@ +{{- if .Values.machineLearning.enabled -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "immich-machine-learning.name" . }} + labels: + {{- include "immich-machine-learning.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.machineLearning.replicaCount }} + selector: + matchLabels: + {{- include "immich-machine-learning.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.machineLearning.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "immich-machine-learning.labels" . | nindent 8 }} + {{- with .Values.machineLearning.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "immich.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.machineLearning.podSecurityContext | nindent 8 }} + containers: + - name: immich-machine-learning + image: "{{ .Values.machineLearning.image.repository }}:{{ .Values.machineLearning.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.machineLearning.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.machineLearning.service.port }} + protocol: TCP + env: + {{- if .Values.machineLearning.cache.enabled }} + - name: TRANSFORMERS_CACHE_DIR + value: /cache + {{- end }} + {{- if .Values.machineLearning.env }} + {{- toYaml .Values.machineLearning.env | nindent 12 }} + {{- end }} + securityContext: + {{- toYaml .Values.machineLearning.securityContext | nindent 12 }} + livenessProbe: + httpGet: + port: http + path: /ping + resources: + {{- toYaml .Values.machineLearning.resources | nindent 12 }} + volumeMounts: + {{- if .Values.machineLearning.cache.enabled }} + - mountPath: /cache + name: model-cache + {{- end }} + {{- with .Values.machineLearning.volumeMounts }} + {{- toYaml . | nindent 12 }} + {{- end }} + volumes: + {{- if .Values.machineLearning.cache.enabled }} + - name: model-cache + emptyDir: + {{- if .Values.machineLearning.cache.useMemory }} + medium: Memory + {{- end }} + sizeLimit: {{ .Values.machineLearning.cache.sizeLimit }} + {{- end }} + {{- with .Values.machineLearning.volumes }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.machineLearning.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.machineLearning.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.machineLearning.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/charts/immich/templates/immich-server.hpa.yaml b/charts/immich/templates/immich-server.hpa.yaml new file mode 100644 index 0000000..9368c2c --- /dev/null +++ b/charts/immich/templates/immich-server.hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.server.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "immich-server.name" . }} + labels: + {{- include "immich-server.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "immich-server.name" . }} + minReplicas: {{ .Values.server.autoscaling.minReplicas }} + maxReplicas: {{ .Values.server.autoscaling.maxReplicas }} + metrics: + {{- if .Values.server.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.server.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.server.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.server.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/immich/templates/immich-server.service.yaml b/charts/immich/templates/immich-server.service.yaml new file mode 100644 index 0000000..289c557 --- /dev/null +++ b/charts/immich/templates/immich-server.service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "immich-server.name" . }} + labels: + {{- include "immich-server.labels" . | nindent 4 }} +spec: + type: {{ .Values.server.service.type }} + ports: + - port: {{ .Values.server.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "immich-server.selectorLabels" . | nindent 4 }} diff --git a/charts/immich/templates/immich-server.yaml b/charts/immich/templates/immich-server.yaml new file mode 100644 index 0000000..1716c0d --- /dev/null +++ b/charts/immich/templates/immich-server.yaml @@ -0,0 +1,118 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "immich-server.name" . }} + labels: + {{- include "immich-server.labels" . | nindent 4 }} +spec: + {{- if not .Values.server.autoscaling.enabled }} + replicas: {{ .Values.server.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "immich-server.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.server.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "immich-server.labels" . | nindent 8 }} + {{- with .Values.server.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "immich.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.server.podSecurityContext | nindent 8 }} + containers: + - name: immich-server + image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.server.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.server.service.port }} + protocol: TCP + env: + {{- with .Values.common.postgres }} + - name: DB_HOSTNAME + value: {{ .host }} + {{- if .existingSecret.enabled}} + - name: DB_USERNAME + valueFrom: + secretKeyRef: + name: {{ .existingSecret.secretName }} + key: {{ .existingSecret.usernameKey }} + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .existingSecret.secretName }} + key: {{ .existingSecret.passwordKey }} + {{- else }} + - name: DB_USERNAME + valueFrom: + secretKeyRef: + name: {{ include "postgres.secretName" $ }} + key: username + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "postgres.secretName" $ }} + key: password + {{- end }} + {{- end }} + + {{- with .Values.common.redis }} + - name: REDIS_HOSTNAME + value: {{ .host }} + {{- if .existingSecret.enabled}} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .existingSecret.secretName }} + key: {{ .existingSecret.passwordKey }} + {{- else }} + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "redis.secretName" $ }} + key: password + {{- end }} + {{- end }} + + {{- if .Values.server.env }} + {{- toYaml .Values.server.env | nindent 12 }} + {{- end }} + securityContext: + {{- toYaml .Values.server.securityContext | nindent 12 }} + livenessProbe: + httpGet: + port: http + path: /api/server/ping + resources: + {{- toYaml .Values.server.resources | nindent 12 }} + {{- with .Values.server.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.server.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.server.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.server.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.server.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/immich/templates/ingress.yaml b/charts/immich/templates/ingress.yaml new file mode 100644 index 0000000..62034da --- /dev/null +++ b/charts/immich/templates/ingress.yaml @@ -0,0 +1,43 @@ +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "immich.fullname" . }} + labels: + {{- include "immich-server.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} + backend: + service: + name: {{ include "immich.fullname" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/immich/templates/secrets.yaml b/charts/immich/templates/secrets.yaml new file mode 100644 index 0000000..69af2d3 --- /dev/null +++ b/charts/immich/templates/secrets.yaml @@ -0,0 +1,24 @@ +{{- if not .Values.common.postgres.existingSecret.enabled }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "immich.fullname" . }}-postgres + labels: + {{- include "immich.commonLabels" . | nindent 4 }} +type: Opaque +data: + username: "{{ .Values.common.postgres.createSecret.username | b64enc }}" + password: "{{ .Values.common.postgres.createSecret.password | b64enc }}" +{{- end }} +--- +{{- if not .Values.common.redis.existingSecret.enabled }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "immich.fullname" . }}-redis + labels: + {{- include "immich.commonLabels" . | nindent 4 }} +type: Opaque +data: + password: "{{ .Values.common.redis.createSecret.password | b64enc }}" +{{- end }} diff --git a/charts/immich/templates/serviceaccount.yaml b/charts/immich/templates/serviceaccount.yaml new file mode 100644 index 0000000..515176f --- /dev/null +++ b/charts/immich/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "immich.serviceAccountName" . }} + labels: + {{- include "immich.commonLabels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/charts/immich/values.yaml b/charts/immich/values.yaml new file mode 100644 index 0000000..b247a99 --- /dev/null +++ b/charts/immich/values.yaml @@ -0,0 +1,214 @@ +# This is to override the chart name. +nameOverride: "" +fullnameOverride: "" + +imagePullSecrets: [] + +# Configurations that are relevant for all the components of the chart +common: + postgres: + host: immich-db + existingSecret: + enabled: false + secretName: "" + usernameKey: username + passwordKey: password + createSecret: + username: "" + password: "" + + redis: + host: immich-redis + existingSecret: + enabled: false + secretName: "" + passwordKey: password + createSecret: + password: "" + +server: + # This will set the replicaset count. Ignored if autoscaling is enabled. + replicaCount: 1 + # This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/ + autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + + image: + repository: ghcr.io/immich-app/immich-server + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + + podAnnotations: {} + podLabels: {} + + resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + service: + type: ClusterIP + port: 2283 + + nodeSelector: {} + + tolerations: [] + + affinity: {} + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + # Additional environment variables to set on the container. + env: [] + # - name: DB_VECTOR_EXTENSION + # value: "pgvector" + # - name: SOME_OTHER_ENV + # valueFrom: + # secretKeyRef: + # name: mySecret + # key: secretField + + # Additional volumes on the output Deployment definition. + volumes: [] + # - name: uploads + # hostPath: + # path: /data/upload + # - name: foo + # secret: + # secretName: mysecret + # optional: false + + # Additional volumeMounts on the output Deployment definition. + volumeMounts: [] + # - name: uploads + # mountPath: /usr/src/app/upload + + +machineLearning: + enabled: false + cache: + enabled: true + # If enabled the cache will be stored in memory, rather than local disk. This will increase performance but will require more memory. + useMemory: false + sizeLimit: 10Gi + + replicaCount: 1 + + image: + repository: ghcr.io/immich-app/immich-machine-learning + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + + podAnnotations: {} + podLabels: {} + + resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + + service: + type: ClusterIP + port: 3003 + + nodeSelector: {} + + tolerations: [] + + affinity: {} + + podSecurityContext: {} + # fsGroup: 2000 + + securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + + # Additional environment variables to set on the container. + env: [] + # - name: DB_VECTOR_EXTENSION + # value: "pgvector" + # - name: SOME_OTHER_ENV + # valueFrom: + # secretKeyRef: + # name: mySecret + # key: secretField + + # Additional volumes on the output Deployment definition. + volumes: [] + # - name: uploads + # hostPath: + # path: /data/upload + # - name: foo + # secret: + # secretName: mysecret + # optional: false + + # Additional volumeMounts on the output Deployment definition. + volumeMounts: [] + # - name: uploads + # mountPath: /usr/src/app/upload + +# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + + +# This block is for setting up the HTTPROUTE for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/gateway/#api-kind-httproute +httpRoute: + enabled: false + hostnames: [] + # - chart-example.local + parentRefs: [] + # - name: public-web + # namespace: ingress diff --git a/cr.yaml b/cr.yaml new file mode 100644 index 0000000..d616ba7 --- /dev/null +++ b/cr.yaml @@ -0,0 +1,5 @@ +sign: false + +# Enable automatic generation of release notes using GitHubs release notes generator. +# see: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes +generate-release-notes: true