Skip to content

Instantly share code, notes, and snippets.

@esseti
Created October 11, 2018 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esseti/52a0c059a3ac31e85dc71e66eff4eaa3 to your computer and use it in GitHub Desktop.
Save esseti/52a0c059a3ac31e85dc71e66eff4eaa3 to your computer and use it in GitHub Desktop.
{{- if .Values.ingress.enabled -}}
{{- $serviceName := include "fullname" . -}}
{{- $servicePort := .Values.service.targetPort -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value }}
{{- end }}
spec:
rules:
- host: "{{ .Values.ingress.dnsNames }}"
http:
paths:
- path: /
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment