Skip to content

Commit 97692a1

Browse files
authored
MINOR: haproxy: Add ability to set labels on Service resource (#295)
Signed-off-by: Sam Morrison <[email protected]>
1 parent e86b7bd commit 97692a1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

haproxy/templates/service.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ metadata:
2121
namespace: {{ include "haproxy.namespace" . }}
2222
labels:
2323
{{- include "haproxy.labels" . | nindent 4 }}
24+
{{- range $key, $value := .Values.service.labels }}
25+
{{ $key }}: {{ $value | quote }}
26+
{{- end }}
2427
annotations:
2528
{{- range $key, $value := .Values.service.annotations }}
2629
{{ $key }}: {{ $value | quote }}

haproxy/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,10 @@ service:
483483
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
484484
annotations: {}
485485

486+
## Service labels
487+
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
488+
labels: {}
489+
486490
## Service externalTrafficPolicy
487491
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#external-traffic-policy
488492
# externalTrafficPolicy: Cluster

0 commit comments

Comments
 (0)