added repo
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- if .Values.createContourGateway -}}
|
||||
{{- if or ( eq "contour-internal" .Values.ingress.ingressClassName ) ( eq "contour-external" .Values.ingress.ingressClassName ) ( eq "contour-internal-0" .Values.ingress.ingressClassName ) ( eq "contour-internal-1" .Values.ingress.ingressClassName ) ( eq "contour-external-0" .Values.ingress.ingressClassName ) ( eq "contour-external-1" .Values.ingress.ingressClassName ) }}
|
||||
{{- $servicePortNumber := .Values.ingress.servicePortNumber -}}
|
||||
{{- $pathType := .Values.ingress.pathType -}}
|
||||
{{- $ingressClassName := .Values.ingress.ingressClassName -}}
|
||||
{{- $name := .Values.nameOverride -}}
|
||||
{{- $namespace := .Values.namespace -}}
|
||||
{{ $count := 0 | int }}
|
||||
{{- range .Values.ingress.hosts }}
|
||||
apiVersion: projectcontour.io/v1
|
||||
kind: HTTPProxy
|
||||
metadata:
|
||||
namespace: {{ $namespace }}
|
||||
name: {{ $name }}-{{ $count }}
|
||||
annotations:
|
||||
projectcontour.io/ingress.class: {{ $.Values.ingress.ingressClassName }}
|
||||
spec:
|
||||
ingressClassName: {{ $ingressClassName }}
|
||||
virtualhost:
|
||||
fqdn: "{{ .host }}"
|
||||
includes:
|
||||
{{- range .paths }}
|
||||
- conditions:
|
||||
{{- if or ( eq ( lower .pathType ) "prefix" ) ( eq ( lower .pathType ) "implementationspecific") }}
|
||||
- prefix: {{ .path }}
|
||||
{{- end }}
|
||||
{{- if ( eq ( lower .pathType ) "exact" ) }}
|
||||
- header:
|
||||
name: :path
|
||||
exact: {{ .path }}
|
||||
- prefix: {{ .path }}
|
||||
{{- end }}
|
||||
{{- if ( eq ( lower .pathType ) "header" ) }}
|
||||
- header:
|
||||
name: {{ (split "___" .path)._0 }}
|
||||
{{ (split "___" .path)._1 }}: {{ (split "___" .path)._2 }}
|
||||
{{- end }}
|
||||
{{- if ( eq ( lower .pathType ) "prefixheader" ) }}
|
||||
- prefix: {{ (split "___" .path)._0 }}
|
||||
- header:
|
||||
name: {{ (split "___" .path)._1 }}
|
||||
{{ (split "___" .path)._2 }}: {{ (split "___" .path)._3 }}
|
||||
{{- end }}
|
||||
{{- if .targetService }}
|
||||
name: {{ .targetService | replace "/" "-" }}
|
||||
namespace: {{ (split "/" .targetService)._0 }}
|
||||
{{- else }}
|
||||
name: {{ $name }}
|
||||
namespace: {{ $namespace }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ $count = add1 $count }}
|
||||
---
|
||||
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user