File tree Expand file tree Collapse file tree 4 files changed +21
-12
lines changed
deploy/charts/version-checker Expand file tree Collapse file tree 4 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ A Helm chart for version-checker
71
71
| service.labels | object | ` {} ` | Additional labels to add to the service |
72
72
| service.port | int | ` 8080 ` | Port to expose within the service |
73
73
| serviceMonitor.additionalLabels | object | ` {} ` | Additional labels to add to the ServiceMonitor |
74
- | serviceMonitor.enabled | bool | ` false ` | Disable/Enable ServiceMonitor Object |
74
+ | serviceMonitor.enabled | bool | ` true ` | Disable/Enable ServiceMonitor Object |
75
75
| tolerations | list | ` [] ` | Configure tolerations |
76
76
| topologySpreadConstraints | list | ` [] ` | Set topologySpreadConstraints |
77
77
| versionChecker.imageCacheTimeout | string | ` "30m" ` | How long to hold on to image tags and their versions |
Original file line number Diff line number Diff line change 1
- {{- if or .Values.serviceMonitor.enabled }}
1
+ {{- if and .Values.serviceMonitor.enabled (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}
2
2
apiVersion : monitoring.coreos.com/v1
3
3
kind : ServiceMonitor
4
4
metadata :
Original file line number Diff line number Diff line change 1
1
suite : test ServiceMonitor
2
2
templates :
3
3
- servicemonitor.yaml
4
+ capabilities :
5
+ apiVersions :
6
+ - " monitoring.coreos.com/v1"
7
+ - " monitoring.coreos.com/v1/ServiceMonitor"
4
8
tests :
5
- - it : should work (defaults)
6
- asserts :
7
- - hasDocuments :
8
- count : 0
9
-
10
- - it : works (when enabled)
11
- set :
12
- serviceMonitor.enabled : true
9
+ - it : Should deploy (defaults)
13
10
asserts :
14
11
- hasDocuments :
15
12
count : 1
@@ -18,7 +15,19 @@ tests:
18
15
apiVersion : monitoring.coreos.com/v1
19
16
name : version-checker
20
17
21
- - it : able to provide custom labels
18
+ - it : Not Deploy when disabled
19
+ capabilities :
20
+ apiVersions : []
21
+ set :
22
+ serviceMonitor.enabled : false
23
+ asserts :
24
+ - hasDocuments :
25
+ count : 0
26
+
27
+ - it : Able to provide custom labels
28
+ capabilities :
29
+ apiVersions :
30
+ - " monitoring.coreos.com/v1/ServiceMonitor"
22
31
set :
23
32
serviceMonitor.enabled : true
24
33
serviceMonitor.additionalLabels :
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ prometheus:
215
215
# Configure a Prometheus-Operator ServiceMonitor object
216
216
serviceMonitor :
217
217
# -- Disable/Enable ServiceMonitor Object
218
- enabled : false
218
+ enabled : true
219
219
# -- Additional labels to add to the ServiceMonitor
220
220
additionalLabels : {}
221
221
You can’t perform that action at this time.
0 commit comments