Skip to content

Commit

Permalink
FEATURE/MINOR: kubernetes-ingress: Add metrics service-specific metad…
Browse files Browse the repository at this point in the history
…ata (#229)

Adds `controller.service.metrics.labels` and
`controller.service.metrics.annotations` so that the metrics service can
have its metadata templated using metadata not shared by the main
service.
  • Loading branch information
mecampbellsoup authored Mar 18, 2024
1 parent 3b8bb38 commit 31776df
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kubernetes-ingress/templates/controller-service-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ metadata:
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- if .Values.controller.service.labels }}
{{ toYaml .Values.controller.service.labels | indent 4 }}
{{- if .Values.controller.service.metrics.labels }}
{{ toYaml .Values.controller.service.metrics.labels | indent 4 }}
{{- end }}
annotations:
{{- range $key, $value := .Values.controller.service.annotations }}
{{- range $key, $value := .Values.controller.service.metrics.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
Expand Down
11 changes: 11 additions & 0 deletions kubernetes-ingress/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,17 @@ controller:
## ref: https://kubernetes.io/docs/concepts/services-networking/service/
# sessionAffinity: ""

## Controller Metrics Service configuration
## ref: https://kubernetes.io/docs/concepts/services-networking/service/
metrics:
## Service annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
annotations: {}

## Service labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
labels: {}

## Controller DaemonSet configuration
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
daemonset:
Expand Down

0 comments on commit 31776df

Please sign in to comment.