Skip to content

Commit

Permalink
Simplify helmchart conditionals into values.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
rtuck99 committed Sep 11, 2024
1 parent 95606aa commit 08dae3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
15 changes: 2 additions & 13 deletions helmchart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,14 @@ spec:
hostPath:
path: "{{ .Values.dodal.projectDir | clean }}"
type: Directory
{{- if .Values.hyperion.dev }}
- name: logs
hostPath:
type: Directory
path: "{{ .Values.hyperion.projectDir }}/tmp"
path: "{{ .Values.hyperion.logDir }}"
- name: data
hostPath:
type: Directory
path: "{{ .Values.hyperion.projectDir }}/tmp/data"
{{- else }}
- name: logs
hostPath:
type: Directory
path: "/dls_sw/{{ .Values.hyperion.beamline }}/logs"
- name: data
hostPath:
type: Directory
path: "/dls/{{ .Values.hyperion.beamline }}/data"
{{- end }}
path: "{{ .Values.hyperion.dataDir }}"
containers:
- name: hyperion
image: {{ .Values.hyperion.imageRepository}}/hyperion:{{ .Values.hyperion.appVersion }}
Expand Down
1 change: 1 addition & 0 deletions helmchart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ hyperion:
beamline: i03
dev: false
logDir: "/dls_sw/i03/logs/bluesky"
dataDir: "/dls/i03/data"
# These should be overridden at install time
projectDir: SET_ON_INSTALL
appVersion: SET_ON_INSTALL
Expand Down
5 changes: 3 additions & 2 deletions utility_scripts/deploy/deploy_hyperion_to_k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@ hyperion.dev=true,\
hyperion.runAsUser=$EUID,\
hyperion.runAsGroup=$GID,\
hyperion.supplementalGroups=[$SUPPLEMENTAL_GIDS],\
hyperion.logDir=/app/hyperion/tmp,\
hyperion.logDir=$PROJECTDIR/tmp,\
hyperion.dataDir=$PROJECTDIR/tmp/data,\
hyperion.externalHostname=test-hyperion.diamond.ac.uk "
mkdir -p $PROJECTDIR/tmp
mkdir -p $PROJECTDIR/tmp/data
DEPLOYMENT_DIR=$PROJECTDIR
else
DEPLOYMENT_DIR=/dls_sw/i03/software/bluesky/mx_bluesky_${APP_VERSION}/hyperion
Expand Down

0 comments on commit 08dae3f

Please sign in to comment.