Skip to content

Commit

Permalink
Add ingress and external DNS
Browse files Browse the repository at this point in the history
  • Loading branch information
rtuck99 committed Aug 30, 2024
1 parent 9085771 commit 2cbe11d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
23 changes: 23 additions & 0 deletions helmchart/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if not .Values.hyperion.dev }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hyperion-ingress
spec:
ingressClassName: nginx
tls:
- hosts:
- {{ .Values.hyperion.externalHostname }}
rules:
- host: {{ .Values.hyperion.externalHostname }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hyperion-svc # this must match the name of the service you want to target
port:
number: 5005
{{- end }}

4 changes: 4 additions & 0 deletions helmchart/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ kind: Service
metadata:
name: hyperion-svc
spec:
{{- if .Values.hyperion.dev }}
type: LoadBalancer
{{- else }}
type: ClusterIP
{{- end }}
ports:
- name: hyperion-api
port: 5005
Expand Down
1 change: 1 addition & 0 deletions helmchart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ hyperion:
# These should be overridden at install time
projectDir: SET_ON_INSTALL
appVersion: SET_ON_INSTALL
externalHostname: i03-hyperion.diamond.ac.uk
dodal:
projectDir: SET_ON_INSTALL
service:
Expand Down
3 changes: 2 additions & 1 deletion utility_scripts/deploy/deploy_hyperion_to_k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ hyperion.dev=true,\
hyperion.runAsUser=$EUID,\
hyperion.runAsGroup=$GID,\
hyperion.supplementalGroups=[$SUPPLEMENTAL_GIDS],\
hyperion.logDir=/app/hyperion/tmp "
hyperion.logDir=/app/hyperion/tmp,\
hyperion.externalHostname=test-hyperion.diamond.ac.uk "
mkdir -p $PROJECTDIR/tmp
DEPLOYMENT_DIR=$PROJECTDIR
else
Expand Down

0 comments on commit 2cbe11d

Please sign in to comment.