From 9a09d89142ce4ed6f2b11a6dd3537ec4d172c133 Mon Sep 17 00:00:00 2001 From: Thomas Nowak Date: Tue, 17 Jan 2023 22:20:10 -0500 Subject: [PATCH] Add labels & annotations to service --- chart/templates/service.yaml | 8 ++++++++ chart/values.yaml | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/chart/templates/service.yaml b/chart/templates/service.yaml index 15f0a9f..31a7bec 100644 --- a/chart/templates/service.yaml +++ b/chart/templates/service.yaml @@ -3,6 +3,14 @@ kind: Service metadata: name: {{ .Release.Name }} namespace: {{ .Release.Namespace }} + {{- with .Values.networking.serviceLabels }} + labels: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.networking.serviceAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: ports: - name: gameport diff --git a/chart/values.yaml b/chart/values.yaml index 0dc880a..e9be257 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -23,6 +23,10 @@ serverStorage: size: 5Gi networking: + # Optional additional annotations to add to the service + # serviceAnnotations: {} + # Optional additional labels to add to the service + # serviceLabels: {} serviceType: LoadBalancer gamePort: 2456 publishQueryPort: "true"