diff --git a/Charts/dev-c7/templates/statefulset.yaml b/Charts/dev-c7/templates/statefulset.yaml index 2b375d7..4f93e0a 100644 --- a/Charts/dev-c7/templates/statefulset.yaml +++ b/Charts/dev-c7/templates/statefulset.yaml @@ -88,10 +88,32 @@ spec: volumeMounts: {{- toYaml . | nindent 12 }} {{- end }} + {{- with .Values.autosavePath }} + - name: autosave + mountPath: {{ . }} + readOnly: false + {{- else }} + {{- with .Values.autosaveRootPath }} + - name: autosave + mountPath: {{ . }}/{{ $ioc_name }} + readOnly: false + {{- end }} + {{- end }} {{- with .Values.volumes }} volumes: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.autosavePath }} + - name: autosave + hostPath: + path: {{ . }} + {{- else }} + {{- with .Values.autosaveRootPath }} + - name: autosave + hostPath: + path: {{ . }}/{{ $ioc_name }} + {{- end }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/Charts/dev-c7/values.schema.json b/Charts/dev-c7/values.schema.json index 1b4561e..affe1a6 100644 --- a/Charts/dev-c7/values.schema.json +++ b/Charts/dev-c7/values.schema.json @@ -8,6 +8,13 @@ "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.33.3/affinity.json", "type": "object" }, + "autosavePath": { + "description": "Full path to an IOC instance's autosave folder. Overrides autosaveRootPath when not blank", + "type": "string" + }, + "autosaveRootPath": { + "type": "string" + }, "command": { "description": "container entry point command", "type": "array", diff --git a/Charts/dev-c7/values.yaml b/Charts/dev-c7/values.yaml index 45cff6f..e8c1433 100644 --- a/Charts/dev-c7/values.yaml +++ b/Charts/dev-c7/values.yaml @@ -56,12 +56,18 @@ podLabels: {} # @schema $ref: $k8s/podspec.json#/properties/securityContext podSecurityContext: {} -# @schema $ref:$k8s/container.json#/properties/securityContext +# @schema $ref:$k8s/container.json#/properties/securityContext securityContext: {} -# @schema $ref: $k8s/container.json#/properties/resources +# @schema $ref: $k8s/container.json#/properties/resources resources: {} +# @cschema description: Path to the folder above the IOC's autosave folder. Used to generate the autosavePath as autosaveRootPath/iocName +autosaveRootPath: "" + +# @schema description: Full path to an IOC instance's autosave folder. Overrides autosaveRootPath when not blank +autosavePath: "" + # volumes for the Deployment. # @schema $ref: $k8s/podspec.json#/properties/volumes volumes: @@ -74,9 +80,6 @@ volumes: - name: epics hostPath: path: /dls_sw/epics - - name: apps - hostPath: - path: /dls_sw/apps - name: targetos hostPath: path: /dls_sw/targetOS @@ -96,9 +99,6 @@ volumeMounts: - name: epics mountPath: /dls_sw/epics readOnly: true - - name: apps - mountPath: /dls_sw/apps - readOnly: true - name: targetos mountPath: /dls_sw/targetOS readOnly: true diff --git a/Dockerfile b/Dockerfile index 6576e39..78b1eb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -91,3 +91,6 @@ RUN uv venv --managed-python --python 3.12 && \ # Make a psuedo home directory for running in cluster COPY epics_home /epics_home RUN chmod a+rws /epics_home + +# Add in netcat for network diagnosis +RUN yum install -y netcat