tbrntmon project initialization
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tobias Brunner 2020-06-01 14:27:10 +02:00
parent 4385b427b1
commit 4d219c4c9b
6 changed files with 118 additions and 0 deletions

23
_apps/tbrntmon.yaml Normal file
View File

@ -0,0 +1,23 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: tbrntmon
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
namespace: tbrntmon
server: https://kubernetes.default.svc
project: default
source:
path: tbrntmon
repoURL: https://git.tbrnt.ch/tobru/gitops-tbrnt.git
targetRevision: HEAD
---
apiVersion: v1
kind: Namespace
metadata:
name: tbrntmon
labels:
name: tbrntmon

12
tbrntmon/endpoints.yaml Normal file
View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Endpoints
metadata:
name: nodeexporter
namespace: tbrntmon
labels:
app: nodeexporter
subsets:
- addresses:
- ip: 185.95.218.9
ports:
- port: 9100

49
tbrntmon/prometheus.yaml Normal file
View File

@ -0,0 +1,49 @@
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
labels:
prometheus: tbrntmon
name: tbrntmon
namespace: tbrntmon
spec:
alerting:
alertmanagers:
- name: alertmanager-main
namespace: monitoring
port: web
externalUrl: http://prometheus-k8s.monitoring:9090
image: quay.io/prometheus/prometheus:v2.17.2
version: v2.17.2
podMonitorNamespaceSelector:
matchLabels:
name: tbrntmon
podMonitorSelector: {}
replicas: 1
resources:
requests:
memory: 400Mi
retention: 7d
ruleSelector:
matchLabels:
prometheus: k8s
role: alert-rules
securityContext:
fsGroup: 2000
runAsNonRoot: true
runAsUser: 1000
serviceAccountName: prometheus-tbrntmon
serviceMonitorNamespaceSelector:
matchLabels:
name: tbrntmon
serviceMonitorSelector: {}
storage:
volumeClaimTemplate:
apiVersion: v1
kind: PersistentVolumeClaim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: local-path

13
tbrntmon/service.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: nodeexporter
namespace: tbrntmon
labels:
app: nodeexporter
spec:
ports:
- protocol: TCP
port: 9100
targetPort: 9100
name: nodeexporter

View File

@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus-tbrntmon
namespace: tbrntmon

View File

@ -0,0 +1,16 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: nodeexporter
namespace: tbrntmon
spec:
endpoints:
- interval: 30s
path: /metrics
port: "9100"
namespaceSelector:
matchNames:
- tbrntmon
selector:
matchLabels:
app: nodeexporter