-
Notifications
You must be signed in to change notification settings - Fork 26
/
route.yaml
57 lines (57 loc) · 1.71 KB
/
route.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{{- if eq (.Values.deploy.expose.type) "Route" }}
{{- if .Capabilities.APIVersions.Has "route.openshift.io/v1/Route" }}
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ include "infinispan-helm-charts.name" . }}
annotations:
{{- include "infinispan-helm-charts.annotations" . | nindent 4 }}
{{- range .Values.deploy.expose.annotations }}
{{ .key | quote }}: {{ .value | quote }}
{{- end }}
labels:
app: infinispan-route
{{- include "infinispan-helm-charts.labels" . | nindent 4 }}
{{- if .Values.deploy.expose.annotations }}
{{- end }}
spec:
{{- if .Values.deploy.expose.host }}
host: {{ .Values.deploy.expose.host | quote }} }
{{- end }}
port:
targetPort: 11222
to:
kind: Service
name: {{ include "infinispan-helm-charts.name" . }}
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "infinispan-helm-charts.name" . }}
annotations:
{{- include "infinispan-helm-charts.annotations" . | nindent 4 }}
{{- range .Values.deploy.expose.annotations }}
{{ .key | quote }}: {{ .value | quote }}
{{- end }}
labels:
app: infinispan-ingress
{{- include "infinispan-helm-charts.labels" . | nindent 4 }}
{{- if .Values.deploy.expose.annotations }}
{{- end }}
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "infinispan-helm-charts.name" . }}
port:
number: 11222
{{- if .Values.deploy.expose.host }}
host: {{ .Values.deploy.expose.host | quote }}
{{- else }}
{{- end }}
{{- end }}
{{- end }}