feat(ganymede): add ServiceMonitor

This commit is contained in:
SeanOMik 2024-11-24 19:50:42 -05:00
parent 383fbf4e01
commit 67be3879b3
Signed by: SeanOMik
GPG Key ID: FEC9E2FC15235964
1 changed files with 19 additions and 27 deletions

View File

@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json # yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2 apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease kind: HelmRelease
metadata: metadata:
@ -9,33 +9,19 @@ spec:
chart: chart:
spec: spec:
chart: app-template chart: app-template
version: 3.1.0 version: 3.5.1
sourceRef: sourceRef:
kind: HelmRepository kind: HelmRepository
name: bjws-charts name: bjws-charts
namespace: flux-system namespace: flux-system
values: values:
controllers: controllers:
main: main:
# pod:
# securityContext:
# runAsNonRoot: true
# runAsUser: 10000
# runAsGroup: 10000
# fsGroup: 10000
# fsGroupChangePolicy: OnRootMismatch
containers: containers:
api: api:
image: image:
repository: ghcr.io/zibbp/ganymede repository: ghcr.io/zibbp/ganymede
tag: 3.1.0 tag: 3.1.0
securityContext:
#allowPrivilegeEscalation: false
#capabilities: { drop: ["ALL"] }
env: env:
- name: PUID - name: PUID
value: 10555 value: 10555
@ -89,7 +75,6 @@ spec:
value: "https://twvods.${SECRET_NEW_DOMAIN}/api/v1/auth/oauth/callback" value: "https://twvods.${SECRET_NEW_DOMAIN}/api/v1/auth/oauth/callback"
- name: TEMPORAL_URL - name: TEMPORAL_URL
value: "temporal:7233" value: "temporal:7233"
# WORKER # WORKER
- name: MAX_CHAT_DOWNLOAD_EXECUTIONS - name: MAX_CHAT_DOWNLOAD_EXECUTIONS
value: "5" value: "5"
@ -104,7 +89,6 @@ spec:
image: image:
repository: ghcr.io/zibbp/ganymede-frontend repository: ghcr.io/zibbp/ganymede-frontend
tag: 3.1.0 tag: 3.1.0
env: env:
- name: API_URL - name: API_URL
# /api will be added to this # /api will be added to this
@ -123,7 +107,6 @@ spec:
image: image:
repository: nginxinc/nginx-unprivileged repository: nginxinc/nginx-unprivileged
tag: 1.27.2-alpine tag: 1.27.2-alpine
securityContext: securityContext:
allowPrivilegeEscalation: false allowPrivilegeEscalation: false
capabilities: { drop: ["ALL"] } capabilities: { drop: ["ALL"] }
@ -131,23 +114,36 @@ spec:
service: service:
app: app:
controller: main controller: main
ports: ports:
nginx: nginx:
port: 8080 port: 8080
frontend: frontend:
port: 3000 port: 3000
api: api:
port: 4000 port: 4000
serviceMonitor:
app:
labels:
release: kube-prometheus-stack
serviceName: app
endpoints:
- port: api
interval: 1m
scrapeTimeout: 5s
path: /metrics
metricRelabelings:
- sourceLabels: [__name__]
targetLabel: __name__
regex: (.*)
replacement: ganymede_${1}
action: replace
ingress: ingress:
main: main:
annotations: annotations:
cert-manager.io/cluster-issuer: letsencrypt-production cert-manager.io/cluster-issuer: letsencrypt-production
traefik.ingress.kubernetes.io/router.entrypoints: websecure traefik.ingress.kubernetes.io/router.entrypoints: websecure
hosts: hosts:
- host: twvods.${SECRET_NEW_DOMAIN} - host: twvods.${SECRET_NEW_DOMAIN}
paths: paths:
@ -173,7 +169,6 @@ spec:
accessMode: ReadWriteOnce accessMode: ReadWriteOnce
globalMounts: globalMounts:
- path: /data/videos - path: /data/videos
ganymede-data: ganymede-data:
type: persistentVolumeClaim type: persistentVolumeClaim
size: 5Gi size: 5Gi
@ -184,7 +179,6 @@ spec:
main: # controller name main: # controller name
api: # container name api: # container name
- path: /data/temp - path: /data/temp
ganymede-logs: ganymede-logs:
type: persistentVolumeClaim type: persistentVolumeClaim
size: 5Gi size: 5Gi
@ -195,7 +189,6 @@ spec:
main: # controller name main: # controller name
api: # container name api: # container name
- path: /data/logs - path: /data/logs
nginx-conf: nginx-conf:
name: ganymede-nginx-conf name: ganymede-nginx-conf
type: configMap type: configMap
@ -205,7 +198,6 @@ spec:
nginx: # container name nginx: # container name
- path: /etc/nginx/nginx.conf - path: /etc/nginx/nginx.conf
subPath: nginx.conf subPath: nginx.conf
ganymede-conf: ganymede-conf:
name: ganymede-conf name: ganymede-conf
type: configMap type: configMap