Skip to content

Commit bbffebc

Browse files
committed
add workingDir override
1 parent e7814a7 commit bbffebc

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

Charts/dev-c7/templates/statefulset.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@ spec:
5656
tty: true
5757
{{- $epicsDomain := (.Values.epicsDomain | default $location) | upper }}
5858
{{- $iocName := (.Values.iocName | default .Release.Name) | upper }}
59-
{{ $workingDir := "" }} {{- /* create the variable in global scope before setting in if/else!!! */ -}}
60-
{{- if .Values.iocPath }}
61-
{{- $workingDir = printf "%s/%s" .Values.iocPath $iocName }}
62-
{{- else }}
63-
{{- $workingDir = printf "/dls_sw/prod/%s/ioc/%s/%s/%s" .Values.epicsVersion $epicsDomain $iocName .Values.iocVersion }}
64-
{{- end }}
65-
workingDir: {{ $workingDir }}
59+
{{ $workingDir := .Values.workingDir }}
60+
{{ if eq $workingDir "" }}
61+
{{- if .Values.iocPath }}
62+
{{- $workingDir = printf "%s/%s" .Values.iocPath $iocName }}
63+
{{- else }}
64+
{{- $workingDir = printf "/dls_sw/prod/%s/ioc/%s/%s/%s" .Values.epicsVersion $epicsDomain $iocName .Values.iocVersion }}
65+
{{- end }}
66+
{{ end }}
67+
workingDir: {{ .Values.workingDir | default $workingDir }}
6668
{{- with .Values.securityContext }}
6769
securityContext:
6870
{{- toYaml . | nindent 12 }}

Charts/dev-c7/values.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@
146146
}
147147
}
148148
}
149+
},
150+
"workingDir": {
151+
"description": "override the cwd for launching the IOC, defaults to /dls_sw/prod/$epicsVersion/ioc/$epicsDomain/$iocName/$iocVersion",
152+
"type": "string"
149153
}
150154
},
151155
"additionalProperties": false

Charts/dev-c7/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ iocVersion: ""
1616
epicsDomain: ""
1717
# @schema description: the EPICS version, used to generate the /dls_sw/prod path to iocName
1818
epicsVersion: R3.14.12.7
19+
# @schema description: override the cwd for launching the IOC, defaults to /dls_sw/prod/$epicsVersion/ioc/$epicsDomain/$iocName/$iocVersion
20+
workingDir: ""
1921

2022
# @schema description: overrides the parent folder for iocName to any path in /dls_sw/work or /dls_sw/prod
2123
iocPath: ""

0 commit comments

Comments
 (0)