From 228f8ffdadc6996f01fc12f246dfb7211eea1833 Mon Sep 17 00:00:00 2001 From: Prem Saraswat Date: Sun, 2 May 2021 19:14:44 +0530 Subject: [PATCH 1/2] Add support for feature-flags in Prometheus --- jsonnet/kube-prometheus/components/prometheus.libsonnet | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jsonnet/kube-prometheus/components/prometheus.libsonnet b/jsonnet/kube-prometheus/components/prometheus.libsonnet index d537f3bc..3c0e6bfc 100644 --- a/jsonnet/kube-prometheus/components/prometheus.libsonnet +++ b/jsonnet/kube-prometheus/components/prometheus.libsonnet @@ -12,6 +12,7 @@ local defaults = { namespaces: ['default', 'kube-system', defaults.namespace], replicas: 2, externalLabels: {}, + enableFeatures: [], commonLabels:: { 'app.kubernetes.io/name': 'prometheus', 'app.kubernetes.io/version': defaults.version, @@ -278,6 +279,7 @@ function(params) { labels: p._config.commonLabels, }, externalLabels: p._config.externalLabels, + enableFeatures: p._config.enableFeatures, serviceAccountName: 'prometheus-' + p._config.name, podMonitorSelector: {}, podMonitorNamespaceSelector: {}, From 93282accb73dbbb546fb58dbe7b81488bc6f745b Mon Sep 17 00:00:00 2001 From: Prem Saraswat Date: Sun, 2 May 2021 19:18:50 +0530 Subject: [PATCH 2/2] Generate manifests --- manifests/prometheus-prometheus.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/manifests/prometheus-prometheus.yaml b/manifests/prometheus-prometheus.yaml index b466b670..58d462cf 100644 --- a/manifests/prometheus-prometheus.yaml +++ b/manifests/prometheus-prometheus.yaml @@ -16,6 +16,7 @@ spec: name: alertmanager-main namespace: monitoring port: web + enableFeatures: [] externalLabels: {} image: quay.io/prometheus/prometheus:v2.26.0 nodeSelector: