Browse Source

Merge 0a23d14ee0 into 53e28ff20c

pull/98/merge
Mikołaj Miotk 4 years ago
committed by GitHub
parent
commit
a175924161
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 36
      helm-guestbook/templates/ingress.yaml
  2. 2
      helm-guestbook/templates/service.yaml

36
helm-guestbook/templates/ingress.yaml

@ -0,0 +1,36 @@
{{- if .Values.ingress -}}
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
labels:
{{ toYaml .Values.ingress.labels | indent 4 }}
name: {{ template "helm-guestbook.fullname" .}}-socks-ingress
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $.Values.ingress.path }}
pathType: Prefix
backend:
service:
name: guestbook-svc
port:
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- end }}

2
helm-guestbook/templates/service.yaml

@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "helm-guestbook.fullname" . }}
name: guestbook-svc
labels:
app: {{ template "helm-guestbook.name" . }}
chart: {{ template "helm-guestbook.chart" . }}

Loading…
Cancel
Save