From 28f2ab7bdbe9c5ef92e041762814a85a67acc662 Mon Sep 17 00:00:00 2001 From: Alan B <961130+defenestration@users.noreply.github.com> Date: Wed, 10 Jul 2024 10:26:54 -0400 Subject: [PATCH 1/3] add honorLabels to PodMonitor Signed-off-by: Alan B <961130+defenestration@users.noreply.github.com> --- charts/flagger/templates/podmonitor.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/flagger/templates/podmonitor.yaml b/charts/flagger/templates/podmonitor.yaml index fafca031..1f882e78 100644 --- a/charts/flagger/templates/podmonitor.yaml +++ b/charts/flagger/templates/podmonitor.yaml @@ -17,6 +17,7 @@ spec: - interval: {{ .Values.podMonitor.interval }} path: /metrics port: http + honorLabels: {{ .Values.podMonitor.honorLabels }} namespaceSelector: matchNames: - {{ .Release.Namespace }} From 417f035afbc868c7968fc07ebbe52ccf7c057889 Mon Sep 17 00:00:00 2001 From: Alan B <961130+defenestration@users.noreply.github.com> Date: Wed, 10 Jul 2024 10:51:48 -0400 Subject: [PATCH 2/3] Update values.yaml add honorLabels to default values.yaml Signed-off-by: Alan B <961130+defenestration@users.noreply.github.com> --- charts/flagger/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/flagger/values.yaml b/charts/flagger/values.yaml index 177f3ce9..8227b768 100644 --- a/charts/flagger/values.yaml +++ b/charts/flagger/values.yaml @@ -82,6 +82,7 @@ podMonitor: namespace: interval: 15s additionalLabels: {} + honorLabels: false #env: #- name: SLACK_URL From c09a61a198b4fb3d1f12c80a52c52d57941e4bfa Mon Sep 17 00:00:00 2001 From: Alan B <961130+defenestration@users.noreply.github.com> Date: Wed, 10 Jul 2024 10:53:58 -0400 Subject: [PATCH 3/3] add podMonitor.honorLabel Signed-off-by: Alan B <961130+defenestration@users.noreply.github.com> --- charts/flagger/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/flagger/README.md b/charts/flagger/README.md index 1528121b..ba74e483 100644 --- a/charts/flagger/README.md +++ b/charts/flagger/README.md @@ -157,6 +157,7 @@ The following tables lists the configurable parameters of the Flagger chart and | `podMonitor.namespace` | Namespace where the PodMonitor is created | the same namespace | | `podMonitor.interval` | Interval at which metrics should be scraped | `15s` | | `podMonitor.podMonitor` | Additional labels to add to the PodMonitor | `{}` | +| `podMonitor.honorLabels` | If `true`, label conflicts are resolved by keeping label values from the scraped data and ignoring the conflicting server-side labels | `false` | | `leaderElection.enabled` | If `true`, Flagger will run in HA mode | `false` | | `leaderElection.replicaCount` | Number of replicas | `1` | | `serviceAccount.create` | If `true`, Flagger will create service account | `true` |