From 05b3e061db54b5424d25b57d1a8cac09a292238b Mon Sep 17 00:00:00 2001 From: Anders Bennedsgaard Date: Mon, 16 Jan 2023 14:01:42 +0100 Subject: [PATCH 1/2] create 'lint' makefile target --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bf8f06d2..8abd92eb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,11 @@ -.PHONY: docs +.PHONY: all docs lint + +all: docs lint docs: @docker run --rm --volume "$(PWD):/helm-docs" -u $(shell id -u) \ jnorwood/helm-docs:v1.11.0 --sort-values-order file --chart-search-root charts/ + +lint: + @docker run --rm --volume "$(PWD):/tmp" -u 1000 -w /tmp \ + quay.io/helmpack/chart-testing:v3.7.1 ct lint --config .github/ct-config.yaml From 41ed49da9fc39169f62bead6f98e421787e7901e Mon Sep 17 00:00:00 2001 From: Anders Bennedsgaard Date: Mon, 16 Jan 2023 14:01:55 +0100 Subject: [PATCH 2/2] set pod selector labels on podmonitor --- charts/cheetah-flink-native/Chart.yaml | 2 +- charts/cheetah-flink-native/README.md | 5 ++--- charts/cheetah-flink-native/templates/podmonitor.yaml | 1 + charts/cheetah-flink-native/values.yaml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/cheetah-flink-native/Chart.yaml b/charts/cheetah-flink-native/Chart.yaml index 5f41a0f8..08b4e781 100644 --- a/charts/cheetah-flink-native/Chart.yaml +++ b/charts/cheetah-flink-native/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.19 +version: 0.1.20 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/cheetah-flink-native/README.md b/charts/cheetah-flink-native/README.md index 999f93b3..293c2e27 100644 --- a/charts/cheetah-flink-native/README.md +++ b/charts/cheetah-flink-native/README.md @@ -1,6 +1,6 @@ # cheetah-flink-native -![Version: 0.1.19](https://img.shields.io/badge/Version-0.1.19-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square) +![Version: 0.1.20](https://img.shields.io/badge/Version-0.1.20-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square) A Helm chart for handling Cheetah Data Platform Flink jobs @@ -97,8 +97,7 @@ A Helm chart for handling Cheetah Data Platform Flink jobs | monitoring.podTargetLabels[0] | string | `"component"` | | | monitoring.podTargetLabels[1] | string | `"cluster"` | | | monitoring.flinkProperties | object | `{"metrics.reporter.prom.class":"org.apache.flink.metrics.prometheus.PrometheusReporter","metrics.reporter.prom.port":"9249","metrics.reporters":"prom"}` | Define which monitoring system to use, See more here: https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/metric_reporters/ | -| monitoring.podMonitorSelectorLabels.prometheus | string | `"cluster-metrics"` | | -| monitoring.podMonitorSelectorLabels.cheetah-monitoring | string | `"true"` | | +| monitoring.podMonitorSelectorLabels | object | `{"cheetah-monitoring":"true","prometheus":"cluster-metrics"}` | Additional pod selector labels, which are also added to the PodMonitor labels. Include labels which are selected for in the Prometheus operator | | monitoring.podMetricsEndpoints[0].port | string | `"metrics"` | | ---------------------------------------------- diff --git a/charts/cheetah-flink-native/templates/podmonitor.yaml b/charts/cheetah-flink-native/templates/podmonitor.yaml index 4f5ec1d0..fd1b602b 100644 --- a/charts/cheetah-flink-native/templates/podmonitor.yaml +++ b/charts/cheetah-flink-native/templates/podmonitor.yaml @@ -12,6 +12,7 @@ spec: {{- toYaml .Values.monitoring.podTargetLabels | nindent 4 }} selector: matchLabels: + {{- include "cheetah-flink-native.selectorLabels" . | nindent 6 }} {{- toYaml .Values.monitoring.podMonitorSelectorLabels | nindent 6 }} podMetricsEndpoints: {{- toYaml .Values.monitoring.podMetricsEndpoints | nindent 4 }} diff --git a/charts/cheetah-flink-native/values.yaml b/charts/cheetah-flink-native/values.yaml index 9724cd4a..876fbb6b 100644 --- a/charts/cheetah-flink-native/values.yaml +++ b/charts/cheetah-flink-native/values.yaml @@ -192,8 +192,8 @@ monitoring: metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter metrics.reporter.prom.port: "9249" - # include the podMonitorSelectorLabel which you have set in your prometheus-operator - # set podMonitorSelectorLabels {} if your prometheus-operator is set to collect all podMonitors + # -- Additional pod selector labels, which are also added to the PodMonitor labels. + # Include labels which are selected for in the Prometheus operator podMonitorSelectorLabels: prometheus: cluster-metrics cheetah-monitoring: "true"