Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate the init config in helm #631

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions helm/blueapi/templates/init-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "blueapi.fullname" . }}-initconfig
data:
initconfig.yaml: |-
{{- toYaml .Values.initContainer.scratch | nindent 4 }}
9 changes: 7 additions & 2 deletions helm/blueapi/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ spec:
sources:
- configMap:
name: {{ include "blueapi.fullname" . }}-config
- name: init-config
projected:
sources:
- configMap:
name: {{ include "blueapi.fullname" . }}-initconfig
{{- if .Values.scratchHostPath }}
- name: scratch-host
hostPath:
Expand All @@ -55,12 +60,12 @@ spec:
args:
- |
echo "Setting up scratch area"
blueapi -c /config/config.yaml setup-scratch
blueapi -c /config/initconfig.yaml setup-scratch
if [ $? -ne 0 ]; then echo 'Blueapi failed'; exit 1; fi;
echo "Exporting venv as artefact"
cp -r /venv/* /artefacts
volumeMounts:
- name: worker-config
- name: init-config
mountPath: "/config"
readOnly: true
- name: scratch-host
Expand Down
20 changes: 11 additions & 9 deletions helm/blueapi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ listener:
resources: {}

# Additional envVars to mount to the pod as a String
extraEnvVars: []
extraEnvVars:
[]
Comment on lines +83 to +84
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
extraEnvVars:
[]
extraEnvVars: []

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my yaml parser corrects to the way it was,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just don't like unrelated changes :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm literally editing the same file and this is just a one line difference

# - name: RABBITMQ_PASSWORD
# valueFrom:
# secretKeyRef:
Expand Down Expand Up @@ -108,13 +109,14 @@ worker:
passcode: guest
host: rabbitmq
port: 61613
# Uncomment this to enable the scratch directory
# scratch:
# root: /blueapi-plugins/scratch
# repositories: []
# - name: "dodal"
# remote_url: https://github.com/DiamondLightSource/dodal.git

# Mount path for scratch area from host machine, setting

initContainer:
scratch:
root: /blueapi-plugins/scratch
repositories: []
# - name: "dodal"
# remote_url: https://github.com/DiamondLightSource/dodal.git

# Mount path for scratch area from host machine, setting
# this effectively enables scratch area management
scratchHostPath: "" # example: /usr/local/blueapi-software-scratch
Loading