|
@ -1,7 +1,6 @@ |
|
|
{{- if .Values.ingress.enabled -}} |
|
|
{{- if .Values.ingress.enabled -}} |
|
|
{{- $fullName := include "edemocracia.fullname" . -}} |
|
|
{{- $fullName := include "edemocracia.fullname" . -}} |
|
|
{{- $svcPort := .Values.nginx.service.port -}} |
|
|
{{- $hostName := .Values.edemocracia.hostname -}} |
|
|
{{- $ingressPath := .Values.ingress.path -}} |
|
|
|
|
|
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} |
|
|
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} |
|
|
apiVersion: networking.k8s.io/v1beta1 |
|
|
apiVersion: networking.k8s.io/v1beta1 |
|
|
{{- else -}} |
|
|
{{- else -}} |
|
@ -12,29 +11,22 @@ metadata: |
|
|
name: {{ $fullName }} |
|
|
name: {{ $fullName }} |
|
|
labels: |
|
|
labels: |
|
|
{{- include "edemocracia.labels" . | nindent 4 }} |
|
|
{{- include "edemocracia.labels" . | nindent 4 }} |
|
|
{{- with .Values.ingress.annotations }} |
|
|
|
|
|
annotations: |
|
|
annotations: |
|
|
|
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod" |
|
|
|
|
|
{{- with .Values.ingress.annotations }} |
|
|
{{- toYaml . | nindent 4 }} |
|
|
{{- toYaml . | nindent 4 }} |
|
|
{{- end }} |
|
|
{{- end }} |
|
|
spec: |
|
|
spec: |
|
|
{{- if .Values.ingress.tls }} |
|
|
|
|
|
tls: |
|
|
tls: |
|
|
{{- range .Values.ingress.tls }} |
|
|
|
|
|
- hosts: |
|
|
- hosts: |
|
|
{{- range .hosts }} |
|
|
- "{{ $hostName }}" |
|
|
- {{ . | quote }} |
|
|
secretName: {{ $hostName | replace "." "-" }}-tls |
|
|
{{- end }} |
|
|
|
|
|
secretName: {{ .secretName }} |
|
|
|
|
|
{{- end }} |
|
|
|
|
|
{{- end }} |
|
|
|
|
|
rules: |
|
|
rules: |
|
|
{{- range .Values.ingress.hosts }} |
|
|
- host: "{{ $hostName }}" |
|
|
- host: {{ . | quote }} |
|
|
|
|
|
http: |
|
|
http: |
|
|
paths: |
|
|
paths: |
|
|
- path: {{ $ingressPath }} |
|
|
- path: / |
|
|
backend: |
|
|
backend: |
|
|
serviceName: nginx |
|
|
serviceName: nginx |
|
|
servicePort: http |
|
|
servicePort: http |
|
|
{{- end }} |
|
|
{{- end }} |
|
|
{{- end }} |
|
|
|
|
|