디렉토리 구조 및 각 서비스 추가
This commit is contained in:
40
helm/teleport-cluster/tests/podmonitor_test.yaml
Normal file
40
helm/teleport-cluster/tests/podmonitor_test.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
suite: PodMonitor
|
||||
templates:
|
||||
- podmonitor.yaml
|
||||
tests:
|
||||
- it: does not create a PodMonitor by default
|
||||
set:
|
||||
clusterName: test-kube-cluster-name
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
|
||||
- it: creates a PodMonitor when enabled
|
||||
set:
|
||||
clusterName: test-kube-cluster-name
|
||||
podMonitor:
|
||||
enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: PodMonitor
|
||||
|
||||
- it: configures scrape interval if provided
|
||||
set:
|
||||
clusterName: test-kube-cluster-name
|
||||
podMonitor:
|
||||
enabled: true
|
||||
interval: 2m
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.podMetricsEndpoints[0].interval
|
||||
value: 2m
|
||||
|
||||
- it: wears additional labels if provided
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.labels.prometheus
|
||||
value: default
|
||||
values:
|
||||
- ../.lint/podmonitor.yaml
|
||||
Reference in New Issue
Block a user