diff --git a/chart/templates/network/ing.yaml b/chart/templates/network/ing.yaml index d09773a..900f8a2 100644 --- a/chart/templates/network/ing.yaml +++ b/chart/templates/network/ing.yaml @@ -1,3 +1,4 @@ +{{- if .Values.ingress }} apiVersion: extensions/v1beta1 kind: Ingress metadata: @@ -11,7 +12,7 @@ spec: tls: - hosts: - {{ .Values.ingress.host | quote }} - secretName: {{ .Values.ingress.tls.secretName }} + secretName: {{ .Values.tls.secretName }} rules: - host: {{ .Values.ingress.host | quote }} http: @@ -21,3 +22,4 @@ spec: backend: serviceName: {{ include "storage.fullname" . }}-cluster servicePort: {{ .Values.clusterService.ports.http }} +{{- end }} diff --git a/chart/templates/network/legacy-ing.yaml b/chart/templates/network/legacy-ing.yaml new file mode 100644 index 0000000..9c395aa --- /dev/null +++ b/chart/templates/network/legacy-ing.yaml @@ -0,0 +1,23 @@ +{{- if .Values.legacyIngress }} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ include "storage.fullname" . }}-legacy + annotations: + kubernetes.io/ingress.class: nginx + labels: + {{- include "storage.labels" . | nindent 4 }} +spec: + tls: + - hosts: + - {{ .Values.legacyIngress.host | quote }} + secretName: {{ .Values.tls.secretName }} + rules: + - host: {{ .Values.legacyIngress.host | quote }} + http: + paths: + - path: / + backend: + serviceName: {{ include "storage.fullname" . }}-cluster + servicePort: {{ .Values.clusterService.ports.http }} +{{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index ccee816..fae4dc3 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -63,7 +63,11 @@ clusterService: ports: http: 8080 -ingress: - host: example.org - tls: - secretName: tls-certificates +tls: + secretName: tls-certificates + +# ingress: +# host: example.org + +# legacyIngress: +# host: example.org