Skip to content

Commit

Permalink
Fix issue #1620
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Barcaroli <[email protected]>
  • Loading branch information
torrefatto committed Aug 28, 2024
1 parent 44f6a8f commit d0d2cd7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions templates/ingress/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@
{{- $ingress := .Values.expose.ingress -}}
{{- $tls := .Values.expose.tls -}}
{{- if eq .Values.expose.ingress.controller "gce" }}
{{- $_ := set . "path_type" "ImplementationSpecific" -}}
{{- $_ := set . "portal_path" "/*" -}}
{{- $_ := set . "api_path" "/api/*" -}}
{{- $_ := set . "service_path" "/service/*" -}}
{{- $_ := set . "v2_path" "/v2/*" -}}
{{- $_ := set . "chartrepo_path" "/chartrepo/*" -}}
{{- $_ := set . "controller_path" "/c/*" -}}
{{- else if eq .Values.expose.ingress.controller "ncp" }}
{{- $_ := set . "path_type" "Prefix" -}}
{{- $_ := set . "portal_path" "/.*" -}}
{{- $_ := set . "api_path" "/api/.*" -}}
{{- $_ := set . "service_path" "/service/.*" -}}
{{- $_ := set . "v2_path" "/v2/.*" -}}
{{- $_ := set . "chartrepo_path" "/chartrepo/.*" -}}
{{- $_ := set . "controller_path" "/c/.*" -}}
{{- else }}
{{- $_ := set . "path_type" "Prefix" -}}
{{- $_ := set . "portal_path" "/" -}}
{{- $_ := set . "api_path" "/api/" -}}
{{- $_ := set . "service_path" "/service/" -}}
Expand Down Expand Up @@ -94,42 +97,42 @@ spec:
servicePort: {{ template "harbor.portal.servicePort" . }}
{{- else }}
- path: {{ .api_path }}
pathType: Prefix
pathType: {{ .path_type }}
backend:
service:
name: {{ template "harbor.core" . }}
port:
number: {{ template "harbor.core.servicePort" . }}
- path: {{ .service_path }}
pathType: Prefix
pathType: {{ .path_type }}
backend:
service:
name: {{ template "harbor.core" . }}
port:
number: {{ template "harbor.core.servicePort" . }}
- path: {{ .v2_path }}
pathType: Prefix
pathType: {{ .path_type }}
backend:
service:
name: {{ template "harbor.core" . }}
port:
number: {{ template "harbor.core.servicePort" . }}
- path: {{ .chartrepo_path }}
pathType: Prefix
pathType: {{ .path_type }}
backend:
service:
name: {{ template "harbor.core" . }}
port:
number: {{ template "harbor.core.servicePort" . }}
- path: {{ .controller_path }}
pathType: Prefix
pathType: {{ .path_type }}
backend:
service:
name: {{ template "harbor.core" . }}
port:
number: {{ template "harbor.core.servicePort" . }}
- path: {{ .portal_path }}
pathType: Prefix
pathType: {{ .path_type }}
backend:
service:
name: {{ template "harbor.portal" . }}
Expand Down

0 comments on commit d0d2cd7

Please sign in to comment.