Skip to content

Commit

Permalink
Add service monitors (#75)
Browse files Browse the repository at this point in the history
* Add service monitors

* Made service monitors work and bumped version to 100

* Update charts/immich/Chart.yaml

Co-authored-by: bo0tzz <[email protected]>

* Fixed some nits
Removed the need to add env variables

* Added P:3002 as primary on microservices as decided on discord

* Removed extra false defaults

* Added a line about enabling metrics

---------

Co-authored-by: bo0tzz <[email protected]>
  • Loading branch information
ndragon798 and bo0tzz authored Apr 5, 2024
1 parent 9145184 commit 430dbe6
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 6 deletions.
4 changes: 2 additions & 2 deletions charts/immich/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
apiVersion: v2
description: A chart to power Immich (immich.app) running on kubernetes
name: immich
version: 0.4.0
appVersion: v1.95.1
version: 0.5.0
appVersion: v1.100.0
home: https://immich.app/
icon: https://raw.githubusercontent.com/immich-app/immich/main/design/immich-logo.svg
sources:
Expand Down
25 changes: 24 additions & 1 deletion charts/immich/templates/microservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,32 @@ command: "/bin/sh"
args:
- "./start-microservices.sh"

env:
{{ if .Values.immich.metrics.enabled }}
IMMICH_METRICS: true
{{ end }}

service:
main:
enabled: false
enabled: {{ .Values.immich.metrics.enabled }}
type: ClusterIP
ports:
http:
enabled: false
primary: true
port: 3002
protocol: HTTP
metrics:
enabled: {{ .Values.immich.metrics.enabled }}
port: 8081
protocol: HTTP

serviceMonitor:
main:
enabled: {{ .Values.immich.metrics.enabled }}
endpoints:
- port: metrics
scheme: http

persistence:
library:
Expand Down
18 changes: 17 additions & 1 deletion charts/immich/templates/server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ command: "/bin/sh"
args:
- "./start-server.sh"

env:
{{ if .Values.immich.metrics.enabled }}
IMMICH_METRICS: true
{{ end }}

service:
main:
enabled: true
Expand All @@ -17,14 +22,25 @@ service:
primary: true
port: 3001
protocol: HTTP
metrics:
enabled: {{ .Values.immich.metrics.enabled }}
port: 8081
protocol: HTTP

serviceMonitor:
main:
enabled: {{ .Values.immich.metrics.enabled }}
endpoints:
- port: metrics
scheme: http

probes:
liveness: &probes
enabled: true
custom: true
spec:
httpGet:
path: /server-info/ping
path: /api/server-info/ping
port: http
initialDelaySeconds: 0
periodSeconds: 10
Expand Down
6 changes: 4 additions & 2 deletions charts/immich/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ env:
IMMICH_MACHINE_LEARNING_URL: '{{ printf "http://%s-machine-learning:3003" .Release.Name }}'

image:
tag: v1.95.1
tag: v1.100.0

immich:
metrics:
# Enabling this will create the service monitors needed to monitor immich with the prometheus operator
enabled: false
persistence:
# Main data store for all photos shared between different components.
library:
Expand Down Expand Up @@ -58,7 +61,6 @@ server:
image:
repository: ghcr.io/immich-app/immich-server
pullPolicy: IfNotPresent

ingress:
main:
enabled: false
Expand Down

0 comments on commit 430dbe6

Please sign in to comment.