Skip to content

Commit

Permalink
Make ServiceMonitor optional (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
weseven authored May 24, 2024
1 parent 159c489 commit 29cad8a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Make ServiceMonitor optional through `serviceMonitor.enabled` helm value (useful in mc-bootstrap).

## [2.18.0] - 2024-05-02

### Added
Expand Down
2 changes: 2 additions & 0 deletions helm/cluster-api-provider-aws/files/copy/service-monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand All @@ -11,3 +12,4 @@ spec:
selector:
matchLabels:
cluster.x-k8s.io/provider: infrastructure-aws
{{- end }}
2 changes: 2 additions & 0 deletions helm/cluster-api-provider-aws/templates/service-monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
Expand All @@ -11,3 +12,4 @@ spec:
selector:
matchLabels:
cluster.x-k8s.io/provider: infrastructure-aws
{{- end }}
9 changes: 9 additions & 0 deletions helm/cluster-api-provider-aws/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,15 @@
}
}
},
"serviceMonitor": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
},
"default": true
},
"verticalPodAutoscaler": {
"type": "object",
"properties": {
Expand Down
3 changes: 3 additions & 0 deletions helm/cluster-api-provider-aws/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ provider:
accessKeyID: defaultID
secretAccessKey: defaultKey

serviceMonitor:
enabled: true

verticalPodAutoscaler:
enabled: true

Expand Down

0 comments on commit 29cad8a

Please sign in to comment.