Skip to content

Commit 9e45f2e

Browse files
authored
Merge pull request #7 from DiamondLightSource/autosave
add autosave path to values
2 parents 42e37ca + ab3e296 commit 9e45f2e

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

Charts/dev-c7/templates/statefulset.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,32 @@ spec:
8888
volumeMounts:
8989
{{- toYaml . | nindent 12 }}
9090
{{- end }}
91+
{{- with .Values.autosavePath }}
92+
- name: autosave
93+
mountPath: {{ . }}
94+
readOnly: false
95+
{{- else }}
96+
{{- with .Values.autosaveRootPath }}
97+
- name: autosave
98+
mountPath: {{ . }}/{{ $ioc_name }}
99+
readOnly: false
100+
{{- end }}
101+
{{- end }}
91102
{{- with .Values.volumes }}
92103
volumes:
93104
{{- toYaml . | nindent 8 }}
94105
{{- end }}
106+
{{- with .Values.autosavePath }}
107+
- name: autosave
108+
hostPath:
109+
path: {{ . }}
110+
{{- else }}
111+
{{- with .Values.autosaveRootPath }}
112+
- name: autosave
113+
hostPath:
114+
path: {{ . }}/{{ $ioc_name }}
115+
{{- end }}
116+
{{- end }}
95117
{{- with .Values.nodeSelector }}
96118
nodeSelector:
97119
{{- toYaml . | nindent 8 }}

Charts/dev-c7/values.schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.33.3/affinity.json",
99
"type": "object"
1010
},
11+
"autosavePath": {
12+
"description": "Full path to an IOC instance's autosave folder. Overrides autosaveRootPath when not blank",
13+
"type": "string"
14+
},
15+
"autosaveRootPath": {
16+
"type": "string"
17+
},
1118
"command": {
1219
"description": "container entry point command",
1320
"type": "array",

Charts/dev-c7/values.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,18 @@ podLabels: {}
5656
# @schema $ref: $k8s/podspec.json#/properties/securityContext
5757
podSecurityContext: {}
5858

59-
# @schema $ref:$k8s/container.json#/properties/securityContext
59+
# @schema $ref:$k8s/container.json#/properties/securityContext
6060
securityContext: {}
6161

62-
# @schema $ref: $k8s/container.json#/properties/resources
62+
# @schema $ref: $k8s/container.json#/properties/resources
6363
resources: {}
6464

65+
# @cschema description: Path to the folder above the IOC's autosave folder. Used to generate the autosavePath as autosaveRootPath/iocName
66+
autosaveRootPath: ""
67+
68+
# @schema description: Full path to an IOC instance's autosave folder. Overrides autosaveRootPath when not blank
69+
autosavePath: ""
70+
6571
# volumes for the Deployment.
6672
# @schema $ref: $k8s/podspec.json#/properties/volumes
6773
volumes:
@@ -74,9 +80,6 @@ volumes:
7480
- name: epics
7581
hostPath:
7682
path: /dls_sw/epics
77-
- name: apps
78-
hostPath:
79-
path: /dls_sw/apps
8083
- name: targetos
8184
hostPath:
8285
path: /dls_sw/targetOS
@@ -96,9 +99,6 @@ volumeMounts:
9699
- name: epics
97100
mountPath: /dls_sw/epics
98101
readOnly: true
99-
- name: apps
100-
mountPath: /dls_sw/apps
101-
readOnly: true
102102
- name: targetos
103103
mountPath: /dls_sw/targetOS
104104
readOnly: true

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,6 @@ RUN uv venv --managed-python --python 3.12 && \
9191
# Make a psuedo home directory for running in cluster
9292
COPY epics_home /epics_home
9393
RUN chmod a+rws /epics_home
94+
95+
# Add in netcat for network diagnosis
96+
RUN yum install -y netcat

0 commit comments

Comments
 (0)