blob: 305e23b6607ccf5862eb3b24cff990738ea15309 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
{{- if eq .Values.whisk.ingress.type "OpenShift" }}
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ .Release.Name }}-route-c1
spec:
host: {{ .Values.whisk.ingress.domain }}
path: /api/v1/web
port:
targetPort: http
tls:
termination: edge
to:
kind: Service
name: {{ .Release.Name }}-controller
weight: 100
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ .Release.Name }}-route-c2
spec:
host: {{ .Values.whisk.ingress.domain }}
path: /api/v1
port:
targetPort: http
tls:
termination: edge
to:
kind: Service
name: {{ .Release.Name }}-controller
weight: 100
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ .Release.Name }}-route-a1
spec:
host: {{ .Values.whisk.ingress.domain }}
path: /api
port:
targetPort: http
tls:
termination: edge
to:
kind: Service
name: {{ .Release.Name }}-apigateway
weight: 100
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ .Release.Name }}-route-a2
spec:
host: {{ .Values.whisk.ingress.domain }}
path: /v1/health-check
port:
targetPort: http
tls:
termination: edge
to:
kind: Service
name: {{ .Release.Name }}-apigateway
weight: 100
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ .Release.Name }}-route-a3
spec:
host: {{ .Values.whisk.ingress.domain }}
path: /v2
port:
targetPort: http
tls:
termination: edge
to:
kind: Service
name: {{ .Release.Name }}-apigateway
weight: 100
---
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ .Release.Name }}-route-r
spec:
host: {{ .Values.whisk.ingress.domain }}
path: /
port:
targetPort: http
tls:
termination: edge
to:
kind: Service
name: {{ .Release.Name }}-controller
weight: 100
{{- end }}