Skip to content

Commit

Permalink
Add service annotations to the helm chart
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Surdej <jakub.sudej@shift4.com>
  • Loading branch information
Jakub Surdej committed Jun 28, 2024
1 parent fcbbb29 commit d934789
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
21 changes: 21 additions & 0 deletions configs/helm/tests/service_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
---
suite: service tests
templates:
- service.yaml
tests:
- it: render default service
asserts:
- isKind:
of: Service
- equal:
path: metadata.name
value: RELEASE-NAME-prometheus-rds-exporter-chart
- it: render service with annotations
values:
- ./values/with_service.yaml
asserts:
- equal:
path: metadata.annotations
value:
"prometheus.io/scrape": "true"
4 changes: 4 additions & 0 deletions configs/helm/tests/values/with_service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
service:
annotations:
"prometheus.io/scrape": "true"
2 changes: 2 additions & 0 deletions configs/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ securityContext:
service:
type: ClusterIP
port: 9043
# Additional annotations for the service
annotations: {}

ingress:
enabled: false
Expand Down

0 comments on commit d934789

Please sign in to comment.