Skip to content

Instantly share code, notes, and snippets.

@pen-pal
Created February 13, 2025 12:16
Show Gist options
  • Save pen-pal/de686dad16679d61614f8d1976b4aa2d to your computer and use it in GitHub Desktop.
Save pen-pal/de686dad16679d61614f8d1976b4aa2d to your computer and use it in GitHub Desktop.
kube-prometheus-stack-values
# make sure to update your slack hook and apply
prometheusOperator:
enabled: true
prometheus:
enabled: true
server:
statefulSet:
enabled: true
extraFlags:
- web.enable-lifecycle
- storage.tsdb.wal-compression
prometheusSpec:
serviceMonitorSelectorNilUsesHelmValues: false #true
serviceMonitorSelector: {}
serviceMonitorNamespaceSelector: {}
storageSpec:
volumeClaimTemplate:
spec:
storageClassName: csi-gce-pd
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 50Gi
replicas: 1
retention: 30d
#additionalScrapeConfigs:
# - job_name: mysql
# static_configs:
# - targets:
# - mysql-exporter-prometheus-mysql-exporter:9104
grafana:
enabled: true
assertNoLeakedSecrets: false
defaultDashboardsEditable: true
defaultDashboardsEnabled: true
grafana.ini:
unified_alerting:
enabled: true
alerting:
enabled: false
server:
protocol: http
root_url: '%(protocol)s://%(domain)s'
force_migration: true
database:
host: "10.98.0.3:5432"
user: grafana
password: "M8iDvLNSW7Q6PTn2SP8iMNYCkWAzXNCA"
name: grafana
type: postgres
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: kubernetes
orgId: 1
folder:
type: file
disableDeletion: true
editable: true
options:
path: /var/lib/grafana/dashboards/default
- name: imported
orgId: 1
folder: imported
type: file
disableDeletion: true
editable: true
options:
path: /var/lib/grafana/dashboards/imported
dashboards:
imported:
Logs:
gnetId: 13639
revision: 2
datasource: Loki
Node-Full-Exporter:
gnetId: 1860
revision: 37
datasource: Prometheus
sidecar:
dashboards:
enabled: true
label: grafana_dashboard
labelValue: "1"
searchNamespace: ALL
annotations: {}
multicluster:
global:
enabled: false
etcd:
enabled: false
provider:
allowUiUpdates: false
datasources:
enabled: true
defaultDatasourceEnabled: true
isDefaultDatasource: true
uid: prometheus
additionalDataSources:
- name: Loki
type: loki
isDefault: false
editable: true
access: proxy
url: http://loki:3100
uid: loki
serviceMonitor:
enabled: true
path: "/metrics"
labels: {}
interval: ""
scheme: http
tlsConfig: {}
scrapeTimeout: 30s
autoscaling:
enabled: false #true
minReplicas: 1
maxReplicas: 5
targetCPU: "80"
targetMemory: "80"
behavior: {}
rbac:
extraRoleRules:
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
extraClusterRoleRules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]
ingress:
enabled: false
alertmanager:
config:
global:
resolve_timeout: 5m
route:
group_by: ['namespace', 'job']
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receiver: 'slack-notifications'
routes:
- match:
severity: critical
receiver: 'slack-notifications'
receivers:
- name: 'slack-notifications'
slack_configs:
- api_url: '{{your-slack-hook}}'
channel: '#alerts-dev'
send_resolved: true
defaultRules:
create: true
rules:
alertmanager: true
etcd: false #true
configReloaders: true
general: false #true
k8sContainerCpuUsageSecondsTotal: true
k8sContainerMemoryCache: true
k8sContainerMemoryRss: true
k8sContainerMemorySwap: true
k8sContainerResource: true
k8sContainerMemoryWorkingSetBytes: true
k8sPodOwner: true
kubeApiserverAvailability: true
kubeApiserverBurnrate: true
kubeApiserverHistogram: true
kubeApiserverSlos: true
kubeControllerManager: false #true
kubelet: true
kubeProxy: false #true
kubePrometheusGeneral: true
kubePrometheusNodeRecording: true
kubernetesApps: true
kubernetesResources: true
kubernetesStorage: true
kubernetesSystem: false #true
kubeSchedulerAlerting: false #true
kubeSchedulerRecording: false #true
windows: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment