Skip to content

Instantly share code, notes, and snippets.

View rverchere's full-sized avatar

Rémi Verchère rverchere

View GitHub Profile
@rverchere
rverchere / promtail_custom_values_1.yaml
Last active September 18, 2023 20:38
Promtail Custom Values 1
# Mount folder /var/log from node
extraVolumes:
- name: node-logs
hostPath:
path: /var/log
extraVolumeMounts:
- name: node-logs
mountPath: /var/log/host
readOnly: true
@rverchere
rverchere / promtail_custom_values_2.yaml
Last active June 29, 2022 21:13
Promtail Custom Values 2
# Set fsGroup to allow syslog file reading
podSecurityContext:
fsGroup: 4
@rverchere
rverchere / promtail_custom_values_3.yaml
Created June 29, 2022 21:16
Promtail Custom Values 3
# Scrape config to read syslog file from node
config:
snippets:
extraScrapeConfigs: |
# Add an additional scrape config for syslog
- job_name: node-syslog
static_configs:
- targets:
- localhost
labels:
@rverchere
rverchere / promtail_custom_values_4.yaml
Created June 29, 2022 21:18
Promtail Custom Values 4
# Allow environment variables usage
extraArgs:
- -config.expand-env=true
# Scrape config to read syslog file from node
config:
snippets:
extraScrapeConfigs: |
# Add an additional scrape config for syslog
- job_name: node-syslog
@rverchere
rverchere / kube-state-metrics-vpa.yaml
Last active February 29, 2024 14:04
kube-state-metrics configuration for VPA metrics
## Kube State Metrics to get VPA metrics
# Old vs New metrics:
# - kube_verticalpodautoscaler_labels -> kube_customresource_verticalpodautoscaler_labels
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_target -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_target
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget
# Resources:
# - https://github.com/kubernetes/kube-state-metrics/blob/main/docs/customresourcestate-me