Merge pull request #345 from 3dwardch3ng/infra/prometheus-altertmanager

add infra app prometheus-altertmanager
This commit is contained in:
2024-06-26 18:21:29 +10:00
committed by GitHub
4 changed files with 54 additions and 1 deletions

View File

@@ -9,4 +9,5 @@ resources:
- ./namespaces/namespaces.yaml - ./namespaces/namespaces.yaml
- ./postgresql/postgresql.yaml - ./postgresql/postgresql.yaml
- ./prometheus/prometheus.yaml - ./prometheus/prometheus.yaml
- ./prometheus-alertmanager/prometheus-alertmanager.yaml
- ./repositories/repositories.yaml - ./repositories/repositories.yaml

View File

@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus-alertmanager
namespace: prometheus
labels:
app: prometheus-alertmanager
spec:
selector:
matchLabels:
app: prometheus-alertmanager
template:
metadata:
labels:
app: prometheus-alertmanager
spec:
securityContext:
runAsUser: 0
runAsGroup: 0
containers:
- name: prometheus-alertmanager
image: prom/prometheus-alertmanager:v0.27.0
args:
- "--config.file=/etc/prometheus/prometheus-alertmanager.yaml"
ports:
- containerPort: 9093
volumeMounts:
- name: config-volume
mountPath: /etc/prometheus/
volumes:
- name: config-volume
hostPath:
path: /mnt/nfs/AppData/prometheus/conf
type: Directory

View File

@@ -0,0 +1,18 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: prometheus-alertmanager
namespace: prometheus
spec:
interval: 10m
timeout: 1m30s
retryInterval: 30s
path: ./kubernetes/infrastructure/prometheus-alertmanager/app
prune: true
sourceRef:
kind: GitRepository
namespace: flux-system
name: flux-system
dependsOn:
- name: namespaces
namespace: flux-system

View File

@@ -24,7 +24,7 @@ spec:
- name: prometheus - name: prometheus
image: prom/prometheus:v2.53.0 image: prom/prometheus:v2.53.0
args: args:
- "--storage.tsdb.retention.time=12h" - "--storage.tsdb.retention.time=14d"
- "--config.file=/etc/prometheus/prometheus.yaml" - "--config.file=/etc/prometheus/prometheus.yaml"
- "--storage.tsdb.path=/prometheus/" - "--storage.tsdb.path=/prometheus/"
ports: ports: