From 8939cfa9ec586a4acc8d6771f14de41098b58cc3 Mon Sep 17 00:00:00 2001 From: Stanislav B Date: Sat, 13 Jan 2018 16:05:22 +0100 Subject: [PATCH] [incubator/gogs] Customize service annotations (#3091) Purpose is for users to attach annotation metadata to gogs service for custom kubernetes components to act on. By allowing free configuration of annotations in values.yaml we allow maximum flexibility in configuration. --- incubator/gogs/Chart.yaml | 2 +- incubator/gogs/templates/service.yaml | 4 ++++ incubator/gogs/values.yaml | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/incubator/gogs/Chart.yaml b/incubator/gogs/Chart.yaml index 1806a358fe..f69c47f06c 100644 --- a/incubator/gogs/Chart.yaml +++ b/incubator/gogs/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: 'Gogs: Go Git Service' name: gogs -version: 0.5.0 +version: 0.5.1 appVersion: 0.11.29 home: https://gogs.io/ icon: https://gogs.io/img/favicon.ico diff --git a/incubator/gogs/templates/service.yaml b/incubator/gogs/templates/service.yaml index f492c934a1..415079a797 100644 --- a/incubator/gogs/templates/service.yaml +++ b/incubator/gogs/templates/service.yaml @@ -4,6 +4,10 @@ metadata: name: {{ template "gogs.fullname" . }} labels: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} spec: type: {{ .Values.serviceType }} ports: diff --git a/incubator/gogs/values.yaml b/incubator/gogs/values.yaml index 0479039b83..f44054df2c 100644 --- a/incubator/gogs/values.yaml +++ b/incubator/gogs/values.yaml @@ -222,6 +222,12 @@ service: # hosts: # - gogs.domain.com + ## Service annotations. + ## Allows attaching metadata to services for kubernetes components to act on. + ## + # annotations: + # service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http + ## Persistent Volume Storage configuration. ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes