From b35f0542daffd5cc799286e49f53ee0d620de953 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Mon, 6 Oct 2025 15:51:13 +0100 Subject: [PATCH] remove snake_case from dev-c7 --- Charts/dev-c7/templates/statefulset.yaml | 16 ++++++++-------- Charts/dev-c7/values.schema.json | 18 +++++++++--------- Charts/dev-c7/values.yaml | 20 ++++++++++---------- Dockerfile | 4 ++-- {epics_home => epicsHome}/.bashrc | 0 {epics_home => epicsHome}/README.md | 2 +- 6 files changed, 30 insertions(+), 30 deletions(-) rename {epics_home => epicsHome}/.bashrc (100%) rename {epics_home => epicsHome}/README.md (95%) diff --git a/Charts/dev-c7/templates/statefulset.yaml b/Charts/dev-c7/templates/statefulset.yaml index 4f93e0a..8b7f551 100644 --- a/Charts/dev-c7/templates/statefulset.yaml +++ b/Charts/dev-c7/templates/statefulset.yaml @@ -54,13 +54,13 @@ spec: {{- .Values.command | toYaml | nindent 12 }} stdin: true tty: true - {{- $domain := (.Values.ioc_domain | default $location) | upper }} - {{- $ioc_name := (.Values.ioc_name | default .Release.Name) | upper }} + {{- $iocLocation := (.Values.iocLocation | default $location) | upper }} + {{- $iocName := (.Values.iocName | default .Release.Name) | upper }} {{ $workingDir := "" }} {{- /* create the variable in global scope before setting in if/else!!! */ -}} - {{- if .Values.ioc_path }} - {{- $workingDir = printf "%s/%s" .Values.ioc_path $ioc_name }} + {{- if .Values.iocPath }} + {{- $workingDir = printf "%s/%s" .Values.iocPath $iocName }} {{- else }} - {{- $workingDir = printf "/dls_sw/prod/%s/ioc/%s/%s/%s" .Values.epics_version $domain $ioc_name .Values.ioc_version }} + {{- $workingDir = printf "/dls_sw/prod/%s/ioc/%s/%s/%s" .Values.epicsVersion $iocLocation $iocName .Values.iocVersion }} {{- end }} workingDir: {{ $workingDir }} {{- with .Values.securityContext }} @@ -70,7 +70,7 @@ spec: env: # psuedo home sets up epics module etc. - name: HOME - value: /epics_home + value: /epicsHome imagePullPolicy: {{ .Values.image.pullPolicy }} {{- with .Values.livenessProbe }} livenessProbe: @@ -95,7 +95,7 @@ spec: {{- else }} {{- with .Values.autosaveRootPath }} - name: autosave - mountPath: {{ . }}/{{ $ioc_name }} + mountPath: {{ . }}/{{ $iocName }} readOnly: false {{- end }} {{- end }} @@ -111,7 +111,7 @@ spec: {{- with .Values.autosaveRootPath }} - name: autosave hostPath: - path: {{ . }}/{{ $ioc_name }} + path: {{ . }}/{{ $iocName }} {{- end }} {{- end }} {{- with .Values.nodeSelector }} diff --git a/Charts/dev-c7/values.schema.json b/Charts/dev-c7/values.schema.json index affe1a6..37c6e2a 100644 --- a/Charts/dev-c7/values.schema.json +++ b/Charts/dev-c7/values.schema.json @@ -22,8 +22,8 @@ "type": "string" } }, - "epics_version": { - "description": "the EPICS version, used to generate the /dls_sw/prod path to ioc_name", + "epicsVersion": { + "description": "the EPICS version, used to generate the /dls_sw/prod path to iocName", "type": "string" }, "fullnameOverride": { @@ -56,20 +56,20 @@ "imagePullSecrets": { "type": "array" }, - "ioc_domain": { - "description": "the IOC domain (e.g. BL16I FE02J SR03C)", + "iocLocation": { + "description": "the IOC location (e.g. BL16I FE02J SR03C)", "type": "string" }, - "ioc_name": { + "iocName": { "description": "the folder name for the compiled IOC, defaults to ucase of the services folder name", "type": "string" }, - "ioc_path": { - "description": "overrides the parent folder for ioc_name to any path in /dls_sw/work or /dls_sw/prod", + "iocPath": { + "description": "overrides the parent folder for iocName to any path in /dls_sw/work or /dls_sw/prod", "type": "string" }, - "ioc_version": { - "description": "the IOC release, used to generate the /dls_sw/prod path to ioc_name", + "iocVersion": { + "description": "the IOC release, used to generate the /dls_sw/prod path to iocName", "type": "string" }, "nameOverride": { diff --git a/Charts/dev-c7/values.yaml b/Charts/dev-c7/values.yaml index e8c1433..0493d9d 100644 --- a/Charts/dev-c7/values.yaml +++ b/Charts/dev-c7/values.yaml @@ -9,16 +9,16 @@ # https://github.com/losisin/helm-values-schema-json.git # @schema description: the folder name for the compiled IOC, defaults to ucase of the services folder name -ioc_name: "" -# @schema description: the IOC release, used to generate the /dls_sw/prod path to ioc_name -ioc_version: "" -# @schema description: the IOC domain (e.g. BL16I FE02J SR03C) -ioc_domain: "" -# @schema description: the EPICS version, used to generate the /dls_sw/prod path to ioc_name -epics_version: R3.14.12.7 - -# @schema description: overrides the parent folder for ioc_name to any path in /dls_sw/work or /dls_sw/prod -ioc_path: "" +iocName: "" +# @schema description: the IOC release, used to generate the /dls_sw/prod path to iocName +iocVersion: "" +# @schema description: the IOC location (e.g. BL16I FE02J SR03C) +iocLocation: "" +# @schema description: the EPICS version, used to generate the /dls_sw/prod path to iocName +epicsVersion: R3.14.12.7 + +# @schema description: overrides the parent folder for iocName to any path in /dls_sw/work or /dls_sw/prod +iocPath: "" # @schema description: shared values for all services # @schema additionalProperties: true diff --git a/Dockerfile b/Dockerfile index 78b1eb9..5fda011 100644 --- a/Dockerfile +++ b/Dockerfile @@ -89,8 +89,8 @@ RUN uv venv --managed-python --python 3.12 && \ chmod -R a+rwX /opt/.venv # Make a psuedo home directory for running in cluster -COPY epics_home /epics_home -RUN chmod a+rws /epics_home +COPY epicsHome /epicsHome +RUN chmod a+rws /epicsHome # Add in netcat for network diagnosis RUN yum install -y netcat diff --git a/epics_home/.bashrc b/epicsHome/.bashrc similarity index 100% rename from epics_home/.bashrc rename to epicsHome/.bashrc diff --git a/epics_home/README.md b/epicsHome/README.md similarity index 95% rename from epics_home/README.md rename to epicsHome/README.md index a84a263..327051c 100644 --- a/epics_home/README.md +++ b/epicsHome/README.md @@ -1,4 +1,4 @@ -# epics_home +# epicsHome This is a psuedo home directory for launching EPICS IOCs in-cluster using dev-c7.