mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 17:07:04 +02:00
- 🛑 BREAKING - Removed support for the openvpn and wireguard VPN types.
- Update container versions
- Added support for adding serviceMonitors to services.
- ConfigMap checksum logic now only looks at ConfigMap data
- Explicitly convert defaultMode to decimal notation in code-server addon.
109 lines
2.8 KiB
YAML
109 lines
2.8 KiB
YAML
suite: service values
|
|
templates:
|
|
- common.yaml
|
|
tests:
|
|
- it: a serviceMonitor is not created by default
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 2
|
|
- documentIndex: &ServiceDocument 0
|
|
isKind:
|
|
of: Deployment
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
|
|
- it: a serviceMonitor is not created when disabled
|
|
set:
|
|
service:
|
|
main:
|
|
monitor:
|
|
enabled: false
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 2
|
|
- documentIndex: &ServiceDocument 0
|
|
isKind:
|
|
of: Deployment
|
|
- documentIndex: &ServiceDocument 1
|
|
isKind:
|
|
of: Service
|
|
|
|
- it: a serviceMonitor is created
|
|
set:
|
|
service:
|
|
main:
|
|
monitor:
|
|
enabled: true
|
|
endpoints:
|
|
- port: http
|
|
scheme: http
|
|
path: /metrics
|
|
interval: 1m
|
|
scrapeTimeout: 10s
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 3
|
|
- documentIndex: &ServiceMonitorDocument 2
|
|
isKind:
|
|
of: ServiceMonitor
|
|
- documentIndex: *ServiceMonitorDocument
|
|
equal:
|
|
path: metadata.name
|
|
value: RELEASE-NAME
|
|
- documentIndex: *ServiceMonitorDocument
|
|
equal:
|
|
path: spec.selector.matchLabels
|
|
value:
|
|
app.kubernetes.io/instance: RELEASE-NAME
|
|
app.kubernetes.io/name: RELEASE-NAME
|
|
app.kubernetes.io/service: RELEASE-NAME
|
|
- documentIndex: *ServiceMonitorDocument
|
|
equal:
|
|
path: spec.endpoints
|
|
value:
|
|
- port: http
|
|
scheme: http
|
|
path: /metrics
|
|
interval: 1m
|
|
scrapeTimeout: 10s
|
|
|
|
- it: a serviceMonitor is created with nameOverride
|
|
set:
|
|
service:
|
|
main:
|
|
nameOverride: test
|
|
monitor:
|
|
enabled: true
|
|
endpoints:
|
|
- port: http
|
|
scheme: http
|
|
path: /metrics
|
|
interval: 1m
|
|
scrapeTimeout: 10s
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 3
|
|
- documentIndex: &ServiceMonitorDocument 2
|
|
isKind:
|
|
of: ServiceMonitor
|
|
- documentIndex: *ServiceMonitorDocument
|
|
equal:
|
|
path: metadata.name
|
|
value: RELEASE-NAME-test
|
|
- documentIndex: *ServiceMonitorDocument
|
|
equal:
|
|
path: spec.selector.matchLabels
|
|
value:
|
|
app.kubernetes.io/instance: RELEASE-NAME
|
|
app.kubernetes.io/name: RELEASE-NAME
|
|
app.kubernetes.io/service: RELEASE-NAME-test
|
|
- documentIndex: *ServiceMonitorDocument
|
|
equal:
|
|
path: spec.endpoints
|
|
value:
|
|
- port: http
|
|
scheme: http
|
|
path: /metrics
|
|
interval: 1m
|
|
scrapeTimeout: 10s
|