Skip to content
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
30 changes: 20 additions & 10 deletions Charts/dev-c7/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,29 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
command:
{{- .Values.command | toYaml | nindent 12 }}
args:
{{- .Values.args | toYaml | nindent 12 }}
stdin: true
tty: true
{{- $iocLocation := (.Values.iocLocation | default $location) | upper }}
{{- $epicsDomain := (.Values.epicsDomain | default $location) | upper }}
{{- $iocName := (.Values.iocName | default .Release.Name) | upper }}
{{ $workingDir := "" }} {{- /* create the variable in global scope before setting in if/else!!! */ -}}
{{- if .Values.iocPath }}
{{- $workingDir = printf "%s/%s" .Values.iocPath $iocName }}
{{- else }}
{{- $workingDir = printf "/dls_sw/prod/%s/ioc/%s/%s/%s" .Values.epicsVersion $iocLocation $iocName .Values.iocVersion }}
{{- $workingDir := .Values.workingDir }}
{{- if eq $workingDir "" }}
{{- if .Values.iocPath }}
{{- $workingDir = printf "%s/%s" .Values.iocPath $iocName }}
{{- else }}
{{- $workingDir = printf "/dls_sw/prod/%s/ioc/%s/%s/%s" .Values.epicsVersion $epicsDomain $iocName .Values.iocVersion }}
{{- end }}
{{- end }}
workingDir: {{ $workingDir }}
workingDir: {{ .Values.workingDir | default $workingDir }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
env:
# psuedo home sets up epics module etc.
- name: HOME
value: /epicsHome
# psuedo home sets up epics module etc.
- name: HOME
value: /epicsHome
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.livenessProbe }}
livenessProbe:
Expand All @@ -87,6 +91,9 @@ spec:
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- with $.Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- with .Values.autosavePath }}
- name: autosave
Expand All @@ -102,6 +109,9 @@ spec:
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- with $.Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.autosavePath }}
- name: autosave
Expand Down
28 changes: 24 additions & 4 deletions Charts/dev-c7/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.33.3/affinity.json",
"type": "object"
},
"args": {
"type": "array",
"items": {
"type": "string"
}
},
"autosavePath": {
"description": "Full path to an IOC instance's autosave folder. Overrides autosaveRootPath when not blank",
"type": "string"
Expand All @@ -22,10 +28,24 @@
"type": "string"
}
},
"epicsDomain": {
"description": "IOCs DLS EPICS Domain (e.g. BL16I FE02J SR03C)",
"type": "string"
},
"epicsVersion": {
"description": "the EPICS version, used to generate the /dls_sw/prod path to iocName",
"type": "string"
},
"extraVolumeMounts": {
"description": "add extra mounts without overriding the default ones",
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.33.3/container.json#/properties/volumeMounts",
"type": "array"
},
"extraVolumes": {
"description": "add extra volumes without overriding the default ones",
"$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.33.3/podspec.json#/properties/volumes",
"type": "array"
},
"fullnameOverride": {
"type": "string"
},
Expand Down Expand Up @@ -56,10 +76,6 @@
"imagePullSecrets": {
"type": "array"
},
"iocLocation": {
"description": "the IOC location (e.g. BL16I FE02J SR03C)",
"type": "string"
},
"iocName": {
"description": "the folder name for the compiled IOC, defaults to ucase of the services folder name",
"type": "string"
Expand Down Expand Up @@ -140,6 +156,10 @@
}
}
}
},
"workingDir": {
"description": "override the cwd for launching the IOC, defaults to /dls_sw/prod/$epicsVersion/ioc/$epicsDomain/$iocName/$iocVersion",
"type": "string"
}
},
"additionalProperties": false
Expand Down
19 changes: 16 additions & 3 deletions Charts/dev-c7/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
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: IOCs DLS EPICS Domain (e.g. BL16I FE02J SR03C)
epicsDomain: ""
# @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: override the cwd for launching the IOC, defaults to /dls_sw/prod/$epicsVersion/ioc/$epicsDomain/$iocName/$iocVersion
workingDir: ""

# @schema description: shared values for all services
# @schema additionalProperties: true
Expand All @@ -36,6 +37,8 @@ image:
command:
- bash
- -lc

args:
- stdio-expose ./bin/linux-x86_64/st*.sh

# @schema description: enable host networking for the pod
Expand Down Expand Up @@ -87,6 +90,11 @@ volumes:
hostPath:
path: /dls_sw/etc

# extraVolumes for the Deployment.
# @schema description: add extra volumes without overriding the default ones
# @schema $ref: $k8s/podspec.json#/properties/volumes
extraVolumes: []

# volumeMounts for the Deployment.
# @schema $ref: $k8s/container.json#/properties/volumeMounts
volumeMounts:
Expand All @@ -106,6 +114,11 @@ volumeMounts:
mountPath: /dls_sw/etc
readOnly: true

# extraVolumeMounts for the Deployment.
# @schema description: add extra mounts without overriding the default ones
# @schema $ref: $k8s/container.json#/properties/volumeMounts
extraVolumeMounts: []

# @schema $ref: $k8s/podspec.json#/properties/tolerations
tolerations: []

Expand Down
Loading