Skip to content

Commit

Permalink
Merge pull request #32 from trifork/fix/podmonitor-selector
Browse files Browse the repository at this point in the history
Fix podmonitor selector
  • Loading branch information
AndersBennedsgaard committed Jan 16, 2023
2 parents 5298318 + 41ed49d commit be431ed
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion charts/cheetah-flink-native/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions charts/cheetah-flink-native/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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"` | |

----------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions charts/cheetah-flink-native/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/cheetah-flink-native/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit be431ed

Please sign in to comment.