Compare commits
1 Commits
auto-updat
...
auto-updat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae6ed229f3 |
@@ -47,7 +47,6 @@ ArgoCD homelab project
|
|||||||
| **jellyfin** | [](https://ag.hexor.cy/applications/argocd/jellyfin) |
|
| **jellyfin** | [](https://ag.hexor.cy/applications/argocd/jellyfin) |
|
||||||
| **k8s-secrets** | [](https://ag.hexor.cy/applications/argocd/k8s-secrets) |
|
| **k8s-secrets** | [](https://ag.hexor.cy/applications/argocd/k8s-secrets) |
|
||||||
| **khm** | [](https://ag.hexor.cy/applications/argocd/khm) |
|
| **khm** | [](https://ag.hexor.cy/applications/argocd/khm) |
|
||||||
| **lidarr** | [](https://ag.hexor.cy/applications/argocd/lidarr) |
|
|
||||||
| **mtproxy** | [](https://ag.hexor.cy/applications/argocd/mtproxy) |
|
| **mtproxy** | [](https://ag.hexor.cy/applications/argocd/mtproxy) |
|
||||||
| **n8n** | [](https://ag.hexor.cy/applications/argocd/n8n) |
|
| **n8n** | [](https://ag.hexor.cy/applications/argocd/n8n) |
|
||||||
| **ollama** | [](https://ag.hexor.cy/applications/argocd/ollama) |
|
| **ollama** | [](https://ag.hexor.cy/applications/argocd/ollama) |
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ metadata:
|
|||||||
name: comfyui
|
name: comfyui
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
spec:
|
spec:
|
||||||
project: apps
|
project: core
|
||||||
destination:
|
destination:
|
||||||
namespace: comfyui
|
namespace: comfyui
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
|
|||||||
@@ -16,30 +16,18 @@ spec:
|
|||||||
app: comfyui
|
app: comfyui
|
||||||
spec:
|
spec:
|
||||||
runtimeClassName: nvidia
|
runtimeClassName: nvidia
|
||||||
tolerations:
|
|
||||||
- key: workload
|
|
||||||
operator: Equal
|
|
||||||
value: desktop
|
|
||||||
effect: NoSchedule
|
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/hostname: uk-desktop.tail2fe2d.ts.net
|
kubernetes.io/hostname: uk-desktop.tail2fe2d.ts.net
|
||||||
# Fix permissions mismatch usually happening when mapping host paths
|
# Fix permissions mismatch usually happening when mapping host paths
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
initContainers:
|
|
||||||
- name: create-data-dir
|
|
||||||
image: busybox
|
|
||||||
command: ["sh", "-c", "mkdir -p /host.data && chown -R 1000:1000 /host.data"]
|
|
||||||
volumeMounts:
|
|
||||||
- name: data
|
|
||||||
mountPath: /host.data
|
|
||||||
containers:
|
containers:
|
||||||
- name: comfyui
|
- name: comfyui
|
||||||
image: runpod/comfyui:latest-5090
|
image: ghcr.io/ai-dock/comfyui:latest-cuda
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
- name: COMFYUI_PORT
|
- name: CLI_ARGS
|
||||||
value: "8188"
|
value: "--listen 0.0.0.0 --port 8188"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8188
|
- containerPort: 8188
|
||||||
name: http
|
name: http
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: lidarr
|
|
||||||
namespace: argocd
|
|
||||||
spec:
|
|
||||||
project: apps
|
|
||||||
destination:
|
|
||||||
namespace: lidarr
|
|
||||||
server: https://kubernetes.default.svc
|
|
||||||
source:
|
|
||||||
repoURL: ssh://git@gt.hexor.cy:30022/ab/homelab.git
|
|
||||||
targetRevision: HEAD
|
|
||||||
path: k8s/apps/lidarr
|
|
||||||
syncPolicy:
|
|
||||||
automated:
|
|
||||||
selfHeal: true
|
|
||||||
prune: true
|
|
||||||
syncOptions:
|
|
||||||
- CreateNamespace=true
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
|
|
||||||
resources:
|
|
||||||
- app.yaml
|
|
||||||
|
|
||||||
helmCharts:
|
|
||||||
- name: lidarr
|
|
||||||
repo: https://k8s-home-lab.github.io/helm-charts/
|
|
||||||
version: 15.3.0
|
|
||||||
releaseName: lidarr
|
|
||||||
namespace: lidarr
|
|
||||||
valuesFile: lidarr-values.yaml
|
|
||||||
includeCRDs: true
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
env:
|
|
||||||
TZ: Asia/Nicosia
|
|
||||||
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: "512Mi"
|
|
||||||
cpu: "200m"
|
|
||||||
limits:
|
|
||||||
memory: "2Gi"
|
|
||||||
cpu: "1500m"
|
|
||||||
|
|
||||||
nodeSelector:
|
|
||||||
kubernetes.io/hostname: master.tail2fe2d.ts.net
|
|
||||||
|
|
||||||
persistence:
|
|
||||||
config:
|
|
||||||
enabled: true
|
|
||||||
type: hostPath
|
|
||||||
hostPath: /k8s/lidarr
|
|
||||||
mountPath: /config
|
|
||||||
|
|
||||||
downloads:
|
|
||||||
enabled: true
|
|
||||||
type: hostPath
|
|
||||||
hostPath: /k8s/media/downloads
|
|
||||||
mountPath: /downloads
|
|
||||||
accessMode: ReadWriteOnce
|
|
||||||
@@ -10,14 +10,3 @@ tolerations:
|
|||||||
runtimeClassName: nvidia
|
runtimeClassName: nvidia
|
||||||
|
|
||||||
setAsDefault: false
|
setAsDefault: false
|
||||||
|
|
||||||
config:
|
|
||||||
default: any
|
|
||||||
map:
|
|
||||||
any: |-
|
|
||||||
version: v1
|
|
||||||
sharing:
|
|
||||||
timeSlicing:
|
|
||||||
resources:
|
|
||||||
- name: nvidia.com/gpu
|
|
||||||
replicas: 4
|
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ data:
|
|||||||
to: 0
|
to: 0
|
||||||
datasourceUid: P76F38748CEC837F0
|
datasourceUid: P76F38748CEC837F0
|
||||||
model:
|
model:
|
||||||
expr: 'node_load15 / on(instance) group_left count by(instance)(node_cpu_seconds_total{mode="idle"})'
|
expr: 'node_load5 / on(instance) group_left count by(instance)(node_cpu_seconds_total{mode="idle"})'
|
||||||
refId: A
|
refId: A
|
||||||
intervalMs: 1000
|
intervalMs: 1000
|
||||||
maxDataPoints: 43200
|
maxDataPoints: 43200
|
||||||
@@ -273,7 +273,7 @@ data:
|
|||||||
conditions:
|
conditions:
|
||||||
- evaluator:
|
- evaluator:
|
||||||
params:
|
params:
|
||||||
- 2
|
- 0.8
|
||||||
type: gt
|
type: gt
|
||||||
operator:
|
operator:
|
||||||
type: and
|
type: and
|
||||||
@@ -283,16 +283,16 @@ data:
|
|||||||
type: __expr__
|
type: __expr__
|
||||||
uid: __expr__
|
uid: __expr__
|
||||||
expression: A
|
expression: A
|
||||||
reducer: last
|
reducer: max
|
||||||
refId: B
|
refId: B
|
||||||
type: reduce
|
type: reduce
|
||||||
noDataState: NoData
|
noDataState: NoData
|
||||||
execErrState: Alerting
|
execErrState: Alerting
|
||||||
for: 15m
|
for: 5m
|
||||||
annotations:
|
annotations:
|
||||||
node: '{{ $labels.instance }}'
|
node: '{{ $labels.instance }}'
|
||||||
load_average: '{{ printf "%.2f" $values.A }}'
|
load_average: '{{ printf "%.2f" $values.A }}'
|
||||||
summary: 'Node load average is critically high relative to CPU count'
|
summary: 'Node load average is high relative to CPU count'
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|
||||||
|
|||||||
85
k8s/core/prom-stack/grafana-values.yaml
Normal file
85
k8s/core/prom-stack/grafana-values.yaml
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
envFromSecret: grafana-admin
|
||||||
|
nodeSelector:
|
||||||
|
kubernetes.io/hostname: master.tail2fe2d.ts.net
|
||||||
|
|
||||||
|
admin:
|
||||||
|
existingSecret: grafana-admin
|
||||||
|
userKey: username
|
||||||
|
passwordKey: password
|
||||||
|
|
||||||
|
grafana.ini:
|
||||||
|
auth:
|
||||||
|
signout_redirect_url: https://idm.hexor.cy/application/o/grafana/end-session/
|
||||||
|
# oauth_auto_login: true
|
||||||
|
auth.generic_oauth:
|
||||||
|
name: authentik
|
||||||
|
enabled: true
|
||||||
|
scopes: "openid profile email"
|
||||||
|
auth_url: https://idm.hexor.cy/application/o/authorize/
|
||||||
|
token_url: https://idm.hexor.cy/application/o/token/
|
||||||
|
api_url: https://idm.hexor.cy/application/o/userinfo/
|
||||||
|
role_attribute_path: >-
|
||||||
|
contains(groups, 'Grafana Admin') && 'Admin' ||
|
||||||
|
contains(groups, 'Grafana Editors') && 'Editor' ||
|
||||||
|
contains(groups, 'Grafana Viewer') && 'Viewer'
|
||||||
|
database:
|
||||||
|
type: postgres
|
||||||
|
host: psql.psql.svc:5432
|
||||||
|
name: grafana
|
||||||
|
user: grafana
|
||||||
|
ssl_mode: disable
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
datasources.yaml:
|
||||||
|
apiVersion: 1
|
||||||
|
datasources:
|
||||||
|
- name: Prometheus Local
|
||||||
|
type: prometheus
|
||||||
|
url: http://prometheus-kube-prometheus-prometheus.prometheus.svc:9090
|
||||||
|
access: proxy
|
||||||
|
isDefault: true
|
||||||
|
- name: Loki
|
||||||
|
type: loki
|
||||||
|
url: http://loki-gateway.prometheus.svc:80
|
||||||
|
access: proxy
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
ingressClassName: traefik
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt
|
||||||
|
traefik.ingress.kubernetes.io/router.middlewares: kube-system-https-redirect@kubernetescrd
|
||||||
|
hosts:
|
||||||
|
- gf.hexor.cy
|
||||||
|
tls:
|
||||||
|
- secretName: grafana-tls
|
||||||
|
hosts:
|
||||||
|
- '*.hexor.cy'
|
||||||
|
|
||||||
|
extraConfigmapMounts:
|
||||||
|
- name: grafana-alerting-rules
|
||||||
|
mountPath: /etc/grafana/provisioning/alerting/rules.yaml
|
||||||
|
configMap: grafana-alerting
|
||||||
|
subPath: rules.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: grafana-alerting-contactpoints
|
||||||
|
mountPath: /etc/grafana/provisioning/alerting/contactpoints.yaml
|
||||||
|
configMap: grafana-alerting
|
||||||
|
subPath: contactpoints.yaml
|
||||||
|
readOnly: true
|
||||||
|
- name: grafana-alerting-policies
|
||||||
|
mountPath: /etc/grafana/provisioning/alerting/policies.yaml
|
||||||
|
configMap: grafana-alerting
|
||||||
|
subPath: policies.yaml
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
|
envValueFrom:
|
||||||
|
TELEGRAM_BOT_TOKEN:
|
||||||
|
secretKeyRef:
|
||||||
|
name: grafana-telegram
|
||||||
|
key: bot-token
|
||||||
|
TELEGRAM_CHAT_ID:
|
||||||
|
secretKeyRef:
|
||||||
|
name: grafana-telegram
|
||||||
|
key: chat-id
|
||||||
|
|
||||||
@@ -16,6 +16,14 @@ helmCharts:
|
|||||||
valuesFile: prom-values.yaml
|
valuesFile: prom-values.yaml
|
||||||
includeCRDs: true
|
includeCRDs: true
|
||||||
|
|
||||||
|
- name: grafana
|
||||||
|
repo: https://grafana.github.io/helm-charts
|
||||||
|
version: 10.2.0
|
||||||
|
releaseName: grafana
|
||||||
|
namespace: prometheus
|
||||||
|
valuesFile: grafana-values.yaml
|
||||||
|
includeCRDs: true
|
||||||
|
|
||||||
- name: loki
|
- name: loki
|
||||||
repo: https://grafana.github.io/helm-charts
|
repo: https://grafana.github.io/helm-charts
|
||||||
version: 6.29.0
|
version: 6.29.0
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
|
grafana:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
alertmanager:
|
alertmanager:
|
||||||
config:
|
config:
|
||||||
@@ -91,88 +92,3 @@ prometheus:
|
|||||||
requests:
|
requests:
|
||||||
storage: 400Gi
|
storage: 400Gi
|
||||||
|
|
||||||
grafana:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
serviceAccount:
|
|
||||||
create: true
|
|
||||||
name: "prom-grafana-sa"
|
|
||||||
|
|
||||||
envFromSecret: grafana-admin
|
|
||||||
nodeSelector:
|
|
||||||
kubernetes.io/hostname: master.tail2fe2d.ts.net
|
|
||||||
|
|
||||||
admin:
|
|
||||||
existingSecret: grafana-admin
|
|
||||||
userKey: username
|
|
||||||
passwordKey: password
|
|
||||||
|
|
||||||
grafana.ini:
|
|
||||||
auth:
|
|
||||||
signout_redirect_url: https://idm.hexor.cy/application/o/grafana/end-session/
|
|
||||||
auth.generic_oauth:
|
|
||||||
name: authentik
|
|
||||||
enabled: true
|
|
||||||
scopes: "openid profile email"
|
|
||||||
auth_url: https://idm.hexor.cy/application/o/authorize/
|
|
||||||
token_url: https://idm.hexor.cy/application/o/token/
|
|
||||||
api_url: https://idm.hexor.cy/application/o/userinfo/
|
|
||||||
role_attribute_path: >-
|
|
||||||
contains(groups, 'Grafana Admin') && 'Admin' ||
|
|
||||||
contains(groups, 'Grafana Editors') && 'Editor' ||
|
|
||||||
contains(groups, 'Grafana Viewer') && 'Viewer'
|
|
||||||
database:
|
|
||||||
type: postgres
|
|
||||||
host: psql.psql.svc:5432
|
|
||||||
name: grafana
|
|
||||||
user: grafana
|
|
||||||
ssl_mode: disable
|
|
||||||
|
|
||||||
# The Loki datasource config needs to be preserved,
|
|
||||||
# but instead of "datasources.datasources.yaml", we define it like this for the prometheus-stack chart:
|
|
||||||
additionalDataSources:
|
|
||||||
- name: Loki
|
|
||||||
type: loki
|
|
||||||
url: http://loki-gateway.prometheus.svc:80
|
|
||||||
access: proxy
|
|
||||||
orgId: 1
|
|
||||||
|
|
||||||
ingress:
|
|
||||||
enabled: true
|
|
||||||
ingressClassName: traefik
|
|
||||||
annotations:
|
|
||||||
cert-manager.io/cluster-issuer: letsencrypt
|
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: kube-system-https-redirect@kubernetescrd
|
|
||||||
hosts:
|
|
||||||
- gf.hexor.cy
|
|
||||||
tls:
|
|
||||||
- secretName: grafana-tls
|
|
||||||
hosts:
|
|
||||||
- '*.hexor.cy'
|
|
||||||
|
|
||||||
extraConfigmapMounts:
|
|
||||||
- name: grafana-alerting-rules
|
|
||||||
mountPath: /etc/grafana/provisioning/alerting/rules.yaml
|
|
||||||
configMap: grafana-alerting
|
|
||||||
subPath: rules.yaml
|
|
||||||
readOnly: true
|
|
||||||
- name: grafana-alerting-contactpoints
|
|
||||||
mountPath: /etc/grafana/provisioning/alerting/contactpoints.yaml
|
|
||||||
configMap: grafana-alerting
|
|
||||||
subPath: contactpoints.yaml
|
|
||||||
readOnly: true
|
|
||||||
- name: grafana-alerting-policies
|
|
||||||
mountPath: /etc/grafana/provisioning/alerting/policies.yaml
|
|
||||||
configMap: grafana-alerting
|
|
||||||
subPath: policies.yaml
|
|
||||||
readOnly: true
|
|
||||||
|
|
||||||
envValueFrom:
|
|
||||||
TELEGRAM_BOT_TOKEN:
|
|
||||||
secretKeyRef:
|
|
||||||
name: grafana-telegram
|
|
||||||
key: bot-token
|
|
||||||
TELEGRAM_CHAT_ID:
|
|
||||||
secretKeyRef:
|
|
||||||
name: grafana-telegram
|
|
||||||
key: chat-id
|
|
||||||
|
|||||||
Reference in New Issue
Block a user