Skip to content

Commit

Permalink
fix: ksvc annotation templating (#24)
Browse files Browse the repository at this point in the history
* fix: chart  template

* test: validate service monitor template
  • Loading branch information
j-zimnowoda authored Jan 31, 2025
1 parent 5534863 commit 92ac07e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion quickstart-knative-service/templates/knative-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
template:
metadata:
{{- with .Values.annotations }}
annotations: {{- toYaml | nindent 8 }}
annotations: {{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podLabels }}
labels:
Expand Down
2 changes: 2 additions & 0 deletions quickstart-knative-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,5 @@ serviceMonitor:
## The service monitor is configured to use the private team Prometheus instance
## See: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#podmetricsendpoint
endpoints: []
# - port: metrics
# path: /metrics
14 changes: 13 additions & 1 deletion tests/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,16 @@ versionOne:
repository: https://test/local

serviceMonitor:
create: true
create: true
endpoints:
- port: metrics
path: /metrics

annotations:
a1: 'a1-test'
a2: 'a2-test'


podLabels:
l1: 'l1-test'
l2: 'l2-test'

0 comments on commit 92ac07e

Please sign in to comment.