Skip to content

Commit

Permalink
Fix: check if the servicemonitor resource exists
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangpeng committed Nov 13, 2023
1 parent e7cb7e1 commit f45a503
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/rabbitmq/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: 1.0.2
version: 1.0.3


# This is the version number of the application being deployed. This version number should be
Expand Down
2 changes: 2 additions & 0 deletions charts/rabbitmq/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{if .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand Down Expand Up @@ -48,3 +49,4 @@ spec:
app.kubernetes.io/component: rabbitmq
namespaceSelector:
any: true
{{ end }}

0 comments on commit f45a503

Please sign in to comment.