Skip to content

Commit

Permalink
refactor: remove route and use ingress.yaml (stolen from @mishraomp) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Mar 1, 2024
1 parent 1d3c753 commit 7ae589c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{- if .Values.frontend.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "frontend.fullname" . }}
labels:
{{- include "frontend.labels" . | nindent 4 }}
{{- if and .Values.frontend.ingress .Values.frontend.ingress.annotations }}
{{- with .Values.frontend.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
spec:
ingressClassName: openshift-default
rules:
- host: {{ include "frontend.fullname" . }}.{{ .Values.global.domain }}
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: {{ include "frontend.fullname" . }}
port:
number: 3000
{{- end }}

This file was deleted.

11 changes: 3 additions & 8 deletions charts/quickstart-openshift-helpers/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,9 @@ frontend:
targetPort: 3003
protocol: TCP
name: metrics
#-- the route for the component. it is optional and is an object. To make the application accessible from internet, use the route.
route:
#-- enable or disable the route.
enabled: true
#-- the hostname for the route. this will be the URL for the application, you can access by https://{{ .Release.Name }}-frontend.{{ .Values.global.domain }}
host: "{{ .Release.Name }}-frontend.{{ .Values.global.domain }}"
#-- 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.
targetPort: http
ingres:
annotations:
route.openshift.io/termination: "edge"

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

0 comments on commit 7ae589c

Please sign in to comment.