Skip to content

Commit df70ce3

Browse files
authored
refactor: remove route and use ingress.yaml (#1845)
Signed-off-by: OMPRAKASH MISHRA <omprakashmishra3978@gmail.com>
1 parent a9594e5 commit df70ce3

3 files changed

Lines changed: 30 additions & 28 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{{- if .Values.frontend.enabled }}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
name: {{ include "frontend.fullname" . }}
6+
labels:
7+
{{- include "frontend.labels" . | nindent 4 }}
8+
{{- if and .Values.frontend.ingress .Values.frontend.ingress.annotations }}
9+
{{- with .Values.frontend.ingress.annotations }}
10+
annotations:
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
13+
{{- end }}
14+
spec:
15+
ingressClassName: openshift-default
16+
rules:
17+
- host: {{ include "frontend.fullname" . }}.{{ .Values.global.domain }}
18+
http:
19+
paths:
20+
- path: /
21+
pathType: ImplementationSpecific
22+
backend:
23+
service:
24+
name: {{ include "frontend.fullname" . }}
25+
port:
26+
number: 3000
27+
{{- end }}

charts/quickstart-openshift/templates/frontend/templates/route.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

charts/quickstart-openshift/values.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,9 @@ frontend:
105105
targetPort: 3003
106106
protocol: TCP
107107
name: metrics
108-
#-- the route for the component. it is optional and is an object. To make the application accessible from internet, use the route.
109-
route:
110-
#-- enable or disable the route.
111-
enabled: true
112-
#-- the hostname for the route. this will be the URL for the application, you can access by https://{{ .Release.Name }}-frontend.{{ .Values.global.domain }}
113-
host: "{{ .Release.Name }}-frontend.{{ .Values.global.domain }}"
114-
#-- the target port of the service. this is the port where the service is listening on. The name is mapped to the port name in the service.
115-
targetPort: http
108+
ingres:
109+
annotations:
110+
route.openshift.io/termination: "edge"
116111

117112
crunchy: # enable it for TEST and PROD, for PR based pipelines simply use single postgres
118113
enabled: false

0 commit comments

Comments
 (0)