|
@ -12,20 +12,45 @@ metadata: |
|
|
labels: |
|
|
labels: |
|
|
{{- include "sapl.labels" . | nindent 4 }} |
|
|
{{- include "sapl.labels" . | nindent 4 }} |
|
|
annotations: |
|
|
annotations: |
|
|
|
|
|
{{- if .Values.ingress.tls.enabled }} |
|
|
|
|
|
# USE TLS |
|
|
|
|
|
{{- if contains "letsencrypt" .Values.ingress.tls.provider }} |
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod" |
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod" |
|
|
|
|
|
{{- end }} |
|
|
|
|
|
{{- if contains "alb" .Values.ingress.class }} |
|
|
|
|
|
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS": 443}]' |
|
|
|
|
|
{{- end }} |
|
|
|
|
|
{{- else }} |
|
|
|
|
|
# DO NOT USE TLS |
|
|
|
|
|
{{- if contains "alb" .Values.ingress.class }} |
|
|
|
|
|
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]' |
|
|
|
|
|
{{- end }} |
|
|
|
|
|
{{- end }} |
|
|
|
|
|
{{- if contains "alb" .Values.ingress.class }} |
|
|
|
|
|
alb.ingress.kubernetes.io/group.name: sapl |
|
|
|
|
|
alb.ingress.kubernetes.io/scheme: internet-facing |
|
|
|
|
|
alb.ingress.kubernetes.io/target-type: ip |
|
|
|
|
|
kubernetes.io/ingress.class: alb |
|
|
|
|
|
{{- end }} |
|
|
{{- with .Values.ingress.annotations }} |
|
|
{{- with .Values.ingress.annotations }} |
|
|
{{- toYaml . | nindent 4 }} |
|
|
{{- toYaml . | nindent 4 }} |
|
|
{{- end }} |
|
|
{{- end }} |
|
|
spec: |
|
|
spec: |
|
|
|
|
|
{{- if .Values.ingress.tls.enabled }} |
|
|
tls: |
|
|
tls: |
|
|
- hosts: |
|
|
- hosts: |
|
|
- "{{ $hostName }}" |
|
|
- "{{ $hostName }}" |
|
|
secretName: {{ $hostName | replace "." "-" }}-tls |
|
|
secretName: {{ $hostName | replace "." "-" }}-tls |
|
|
|
|
|
{{- end }} |
|
|
rules: |
|
|
rules: |
|
|
- host: "{{ $hostName }}" |
|
|
- host: "{{ $hostName }}" |
|
|
http: |
|
|
http: |
|
|
paths: |
|
|
paths: |
|
|
- path: / |
|
|
{{- if contains "nginx" .Values.ingress.class }} |
|
|
|
|
|
- path: /(.*) |
|
|
|
|
|
{{- else }} |
|
|
|
|
|
- path: /* |
|
|
|
|
|
{{- end }} |
|
|
backend: |
|
|
backend: |
|
|
serviceName: {{ $fullName }} |
|
|
serviceName: {{ $fullName }} |
|
|
servicePort: http |
|
|
servicePort: http |
|
|