move k8s cluster data to its own dir
This commit is contained in:
21
kubernetes/infrastructure/monitoring/ingress.yaml
Normal file
21
kubernetes/infrastructure/monitoring/ingress.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: kubernetes-grafana-external-ingress
|
||||
namespace: monitoring
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-external
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`kubernetes-grafana.local.fascinated.cc`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: default-headers
|
||||
namespace: traefik
|
||||
services:
|
||||
- name: kube-prometheus-stack-grafana
|
||||
port: 80
|
||||
tls:
|
||||
secretName: fascinated-cc
|
@ -0,0 +1,58 @@
|
||||
---
|
||||
apiVersion: source.toolkit.fluxcd.io/v1
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: monitoring
|
||||
namespace: monitoring
|
||||
spec:
|
||||
interval: 12h
|
||||
url: https://prometheus-community.github.io/helm-charts
|
||||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: kube-prometheus-stack
|
||||
namespace: monitoring
|
||||
spec:
|
||||
interval: 30m
|
||||
chart:
|
||||
spec:
|
||||
chart: kube-prometheus-stack
|
||||
version: "62.7.0"
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: monitoring
|
||||
namespace: monitoring
|
||||
interval: 12h
|
||||
values:
|
||||
# Prometheus Volume
|
||||
prometheus:
|
||||
prometheusSpec:
|
||||
scrapeInterval: 30s
|
||||
evaluationInterval: 30s
|
||||
ruleSelectorNilUsesHelmValues: false
|
||||
serviceMonitorSelectorNilUsesHelmValues: false
|
||||
podMonitorSelectorNilUsesHelmValues: false
|
||||
probeSelectorNilUsesHelmValues: false
|
||||
scrapeConfigSelectorNilUsesHelmValues: false
|
||||
enableAdminAPI: true
|
||||
walCompression: true
|
||||
enableFeatures:
|
||||
- auto-gomemlimit
|
||||
- memory-snapshot-on-shutdown
|
||||
- new-service-discovery-manager
|
||||
retention: 30d
|
||||
retentionSize: 40GB
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 1500Mi
|
||||
storageSpec:
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
storageClassName: nfs-csi
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 50Gi
|
8
kubernetes/infrastructure/monitoring/kustomization.yaml
Normal file
8
kubernetes/infrastructure/monitoring/kustomization.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: monitoring
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- kube-prometheus-stack.yaml
|
||||
- ingress.yaml
|
8
kubernetes/infrastructure/monitoring/namespace.yaml
Normal file
8
kubernetes/infrastructure/monitoring/namespace.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: monitoring
|
||||
labels:
|
||||
pod-security.kubernetes.io/enforce: privileged
|
||||
pod-security.kubernetes.io/enforce-version: latest
|
Reference in New Issue
Block a user