Update yamls for prom stack

This commit is contained in:
2024-01-25 23:33:05 +00:00
parent e8ab0382de
commit ed46799948
4 changed files with 20 additions and 30 deletions

View File

@@ -1,4 +1,7 @@
kube-state-metrics: kube-state-metrics:
# For kube-prometheus-stacks that are already installed and configured with
# custom collectors, commenting out the collectors and extraArgs below will
# retain any existing kube-state-metrics configuration.
collectors: [ ] collectors: [ ]
extraArgs: extraArgs:
- --custom-resource-state-only=true - --custom-resource-state-only=true
@@ -51,7 +54,7 @@ kube-state-metrics:
source_name: [ spec, sourceRef, name ] source_name: [ spec, sourceRef, name ]
- groupVersionKind: - groupVersionKind:
group: helm.toolkit.fluxcd.io group: helm.toolkit.fluxcd.io
version: v2beta1 version: v2beta2
kind: HelmRelease kind: HelmRelease
metricNamePrefix: gotk metricNamePrefix: gotk
metrics: metrics:
@@ -168,7 +171,7 @@ kube-state-metrics:
url: [ spec, url ] url: [ spec, url ]
- groupVersionKind: - groupVersionKind:
group: notification.toolkit.fluxcd.io group: notification.toolkit.fluxcd.io
version: v1beta2 version: v1beta3
kind: Alert kind: Alert
metricNamePrefix: gotk metricNamePrefix: gotk
metrics: metrics:
@@ -181,11 +184,10 @@ kube-state-metrics:
name: [ metadata, name ] name: [ metadata, name ]
labelsFromPath: labelsFromPath:
exported_namespace: [ metadata, namespace ] exported_namespace: [ metadata, namespace ]
ready: [ status, conditions, "[type=Ready]", status ]
suspended: [ spec, suspend ] suspended: [ spec, suspend ]
- groupVersionKind: - groupVersionKind:
group: notification.toolkit.fluxcd.io group: notification.toolkit.fluxcd.io
version: v1beta2 version: v1beta3
kind: Provider kind: Provider
metricNamePrefix: gotk metricNamePrefix: gotk
metrics: metrics:
@@ -198,7 +200,6 @@ kube-state-metrics:
name: [ metadata, name ] name: [ metadata, name ]
labelsFromPath: labelsFromPath:
exported_namespace: [ metadata, namespace ] exported_namespace: [ metadata, namespace ]
ready: [ status, conditions, "[type=Ready]", status ]
suspended: [ spec, suspend ] suspended: [ spec, suspend ]
- groupVersionKind: - groupVersionKind:
group: notification.toolkit.fluxcd.io group: notification.toolkit.fluxcd.io
@@ -271,4 +272,4 @@ kube-state-metrics:
exported_namespace: [ metadata, namespace ] exported_namespace: [ metadata, namespace ]
ready: [ status, conditions, "[type=Ready]", status ] ready: [ status, conditions, "[type=Ready]", status ]
suspended: [ spec, suspend ] suspended: [ spec, suspend ]
source_name: [ spec, sourceRef, name ] source_name: [ spec, sourceRef, name ]

View File

@@ -14,4 +14,4 @@ configMapGenerator:
app.kubernetes.io/part-of: flux app.kubernetes.io/part-of: flux
app.kubernetes.io/component: monitoring app.kubernetes.io/component: monitoring
configurations: configurations:
- kustomizeconfig.yaml - kustomizeconfig.yaml

View File

@@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1 apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease kind: HelmRelease
metadata: metadata:
name: kube-prometheus-stack name: kube-prometheus-stack
@@ -6,7 +6,7 @@ spec:
interval: 1h interval: 1h
chart: chart:
spec: spec:
version: "48.x" version: "55.x"
chart: kube-prometheus-stack chart: kube-prometheus-stack
sourceRef: sourceRef:
kind: HelmRepository kind: HelmRepository
@@ -16,6 +16,13 @@ spec:
crds: Create crds: Create
upgrade: upgrade:
crds: CreateReplace crds: CreateReplace
driftDetection:
mode: enabled
ignore:
# Ignore "validated" annotation which is not inserted during install
- paths: [ "/metadata/annotations/prometheus-operator-validated" ]
target:
kind: PrometheusRule
valuesFrom: valuesFrom:
- kind: ConfigMap - kind: ConfigMap
name: flux-kube-state-metrics-config name: flux-kube-state-metrics-config
@@ -37,22 +44,4 @@ spec:
app.kubernetes.io/component: monitoring app.kubernetes.io/component: monitoring
grafana: grafana:
defaultDashboardsEnabled: false defaultDashboardsEnabled: false
adminPassword: flux adminPassword: flux
postRenderers:
- kustomize:
patches:
- target:
# Ignore these objects from Flux diff as they are mutated from chart hooks
kind: (ValidatingWebhookConfiguration|MutatingWebhookConfiguration)
name: kube-prometheus-stack-admission
patch: |
- op: add
path: /metadata/annotations/helm.toolkit.fluxcd.io~1driftDetection
value: disabled
- target:
# Ignore these objects from Flux diff as they are mutated at apply time but not at dry-run time
kind: PrometheusRule
patch: |
- op: add
path: /metadata/annotations/helm.toolkit.fluxcd.io~1driftDetection
value: disabled

View File

@@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1 apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease kind: HelmRelease
metadata: metadata:
name: loki-stack name: loki-stack
@@ -31,4 +31,4 @@ spec:
max_look_back_period: 0s max_look_back_period: 0s
table_manager: table_manager:
retention_deletes_enabled: true retention_deletes_enabled: true
retention_period: 12h retention_period: 12h