From d10f1eaae394837f8f5efccd657b89a72ca10348 Mon Sep 17 00:00:00 2001 From: Ryan Hartje Date: Fri, 28 Jul 2017 02:11:06 -0500 Subject: [PATCH] Add ingress to gitlab-ce chart (#1251) * added ingress to gitlab-ce chart * added standard labels to ingress * updated label for gitlab ingress --- stable/gitlab-ce/templates/ingress.yaml | 38 +++++++++++++++++++++++++ stable/gitlab-ce/values.yaml | 13 +++++++++ 2 files changed, 51 insertions(+) create mode 100644 stable/gitlab-ce/templates/ingress.yaml diff --git a/stable/gitlab-ce/templates/ingress.yaml b/stable/gitlab-ce/templates/ingress.yaml new file mode 100644 index 0000000000..a9ce050efd --- /dev/null +++ b/stable/gitlab-ce/templates/ingress.yaml @@ -0,0 +1,38 @@ +{{- if .Values.ingress.enabled }} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: +{{- if .Values.ingress.annotations }} + annotations: +{{ toYaml .Values.ingress.annotations | indent 4 }} +{{- end }} + name: {{ template "fullname" . }} + labels: + app: {{ template "fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +spec: + rules: + - host: {{ .Values.ingress.url | quote }} + {{- if (not (empty .Values.ingress.tls)) }} + https: + paths: + - path: / + backend: + serviceName: {{ template "fullname" . }} + servicePort: {{ .Values.httpsPort }} + {{- else }} + http: + paths: + - path: / + backend: + serviceName: {{ template "fullname" . }} + servicePort: {{ .Values.httpPort }} + {{- end }} + +{{- if .Values.ingress.tls }} + tls: +{{ toYaml .Values.ingress.tls | indent 4 }} +{{- end -}} +{{- end }} diff --git a/stable/gitlab-ce/values.yaml b/stable/gitlab-ce/values.yaml index 33deda8633..1a0413eded 100644 --- a/stable/gitlab-ce/values.yaml +++ b/stable/gitlab-ce/values.yaml @@ -24,6 +24,19 @@ image: gitlab/gitlab-ce:9.1.0-ce.0 ## serviceType: LoadBalancer +## Ingress configuration options +## +ingress: + annotations: + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + enabled: false + tls: + # - secretName: gitlab.cluster.local + # hosts: + # - gitlab.cluster.local + url: gitlab.cluster.local + ## Configure external service ports ## ref: http://kubernetes.io/docs/user-guide/services/ sshPort: 22