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 / kube-state-metrics-vpa.yaml
Last active November 6, 2024 19:58
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
@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 / 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_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_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 / goldilocks-custom-values.yaml
Created May 16, 2022 21:14
Goldilocks Custom Values
dashboard:
replicaCount: 0
@rverchere
rverchere / vpa-custom-values.yaml
Created May 16, 2022 20:07
VPA Custom Values
admissionController:
enabled: false
recommender:
enabled: true
extraArgs:
prometheus-address: |
http://prometheus-operated.observability.svc.cluster.local:9090
storage: prometheus
updater:
enabled: false
chart-jobs:
stage: generate
needs:
- chart-generator
trigger:
include:
- artifact: generated-pipeline.yml
job: chart-generator
strategy: depend
rules:
#!/usr/bin/env bash
cat <<EOF
include: '/gci-templates/.gitlab-ci.yml'
stages:
- test
- install
- release
---
image: dtzar/helm-kubectl:3.5.3 #last version using k8s 1.20
.lint:
script:
- helm lint .
.release:
script:
- apk add git