Skip to content

Commit

Permalink
Merge pull request #9 from epics-containers/RTEMS
Browse files Browse the repository at this point in the history
add iocEnv for configuring RTEMS environment variables per IOC instance
  • Loading branch information
gilesknap authored Mar 19, 2024
2 parents 4c07aaf + e15494b commit 7db9e02
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 85 deletions.
2 changes: 1 addition & 1 deletion Charts/ioc-instance/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
apiVersion: v2
name: ioc-instance

version: 2.0.0+b3
version: 3.0.3

type: application
16 changes: 8 additions & 8 deletions Charts/ioc-instance/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
ioc_group: {{ .Values.ioc_group }}
is_ioc: "true"
spec:
{{ if .Values.serviceAccountName }}
{{- if .Values.serviceAccountName }}
serviceAccountName: {{ .Values.serviceAccountName | quote }}
{{- end }}
hostNetwork: {{ .Values.hostNetwork }}
Expand Down Expand Up @@ -126,15 +126,15 @@ spec:
value: {{ .Values.beamline | quote }}
- name: IOC_GROUP
value: {{ .Values.ioc_group | quote }}
{{- range $envVar := .Values.env }}
- name: {{ $envVar.name }}
value: {{ $envVar.value | quote }}
{{- if .Values.globalEnv }}
{{ toYaml .Values.globalEnv | indent 8}}
{{- end }}
{{- range $envVar := .Values.globalenv }}
- name: {{ $envVar.name }}
value: {{ $envVar.value | quote }}
{{- if .Values.iocEnv }}
{{ toYaml .Values.iocEnv | indent 8}}
{{- end }}
{{- if .Values.useAffinity }}
{{- if .Values.nodeName }}
nodeName: {{ .Values.nodeName }}
{{- else if .Values.useAffinity }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
160 changes: 84 additions & 76 deletions Charts/ioc-instance/values.yaml
Original file line number Diff line number Diff line change
@@ -1,88 +1,96 @@
# default values for all IOCs on bl38p
# see end of file for values that may be overridden per individual IOC
# default values for all IOCs
ioc-instance:
# see end of file for values that may be overridden per individual IOC

# the beamline name - only set for beamlines
beamline:
# the location where the IOCs will run - same as beamline for beamlines
location:
# the name of the repository in which the IOC is grouped
# same as beamline for beamlines
ioc_group:
# the beamline name - only set for beamlines
beamline:
# the location where the IOCs will run - same as beamline for beamlines
location:
# the name of the repository in which the IOC is grouped
# same as beamline for beamlines
ioc_group:

# we use the default service account in the namespace so leave this out
# if you need to specify an alternative then uncomment below
# serviceAccountName: k8s-p38-iocs
# we use the default service account in the namespace so leave this out
# if you need to specify an alternative then uncomment below
# serviceAccountName: k8s-p38-iocs

# useHostNetwork - use host network for IOC - required for Channel Access
# to work outside of the cluster
hostNetwork:
# useHostNetwork - use host network for IOC - required for Channel Access
# to work outside of the cluster
hostNetwork:

# useAffinity - only run on nodes with label beamline:<beamline-name>
# or location:<location-name>
# Set to false for dedicated cluster per beamline and accelerator
useAffinity:
# useAffinity - only run on nodes with label beamline:<beamline-name>
# or location:<location-name>
# Set to false for dedicated cluster per beamline and accelerator
useAffinity:

# root folder for ioc source/binaries inside generic IOC container
iocFolder: /epics/ioc
iocConfig: /epics/ioc/config
# scripts for controlling the IOC
start: /epics/ioc/start.sh
stop: /epics/ioc/stop.sh
liveness: /epics/ioc/liveness.sh
# nodeName is used to run on a specific node. Overrides affinity above.
nodeName:

# the following are added to the pod's environment
globalenv:
- name:
value:
# root folder for ioc source/binaries inside generic IOC container
iocFolder: /epics/ioc
iocConfig: /epics/ioc/config
# scripts for controlling the IOC
start: /epics/ioc/start.sh
stop: /epics/ioc/stop.sh
liveness: /epics/ioc/liveness.sh

# defaults for securityContext
# Usually override runAsXXX in the individual IOC values.yaml.
# At DLS the IOCs that write to the shared data directory must use
# iXXdetector user/group IDs
securityContext:
allowPrivilegeEscalation: false
# IMPORTANT if you want access to /dls/p38/data then the following should
# be set to p38detector account ID and group ID
# runAsUser: 37143
# runAsGroup: 37143
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# the following are added to the pod's environment
# globalEnv:
# - name:
# value:
# iocEnv:
# - name:
# value:

########################################################################################
# The following values are expected to be overridden in individual IOC values.yaml
########################################################################################
# defaults for securityContext
# Usually override runAsXXX in the individual IOC values.yaml.
# At DLS the IOCs that write to the shared data directory must use
# iXXdetector user/group IDs
securityContext:
allowPrivilegeEscalation: false
# # e.g. if you want access to /dls/p38/data then the following should
# # be set to p38detector account ID and group ID
# runAsUser: 37143
# runAsGroup: 37143
# capabilities:
# drop:
# - ...
# readOnlyRootFilesystem: true
# runAsNonRoot: true

# This value is the only mandatory override. You must declare the image for the
# Generic IOC in the values.yaml for each IOC instance.
image:
########################################################################################
# The following values are expected to be overridden in individual IOC values.yaml
########################################################################################

# a volume to mount for writing data to. This can be a PVC or a hostPath
# the PVC
dataVolume:
# Create a PVC called {{ .Release.Name }}-data when true
pvc: true
# A path on the host machine to write data into. Also used as the path that the
# pvc or hostPath will be mounted at so that users need not be confused about
# inside/outside container paths.
hostPath: /data
# This value is the only mandatory override. You must declare the image for the
# Generic IOC in the values.yaml for each IOC instance.
image:

# use the shared PVC for publishing opi files over http (see services/opis)
opisClaim:
# use the shared PVC for holding runtime files for each IOC
runtimeClaim:
# use the shared PVC autosave files (comment out for no autosave)
autosaveClaim:
# a volume to mount for writing data to. This can be a PVC or a hostPath
# the PVC
dataVolume:
# Create a PVC called {{ .Release.Name }}-data when true
pvc: true
# A path on the host machine to write data into. Also used as the path that the
# pvc or hostPath will be mounted at so that users need not be confused about
# inside/outside container paths.
hostPath: /data

# default resource limits
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi
# extra tolerations if needed
# tolerations:
# use the shared PVC for publishing opi files over http (see services/opis)
opisClaim:
# use the shared PVC for holding runtime files for each IOC
runtimeClaim:
# use the shared PVC autosave files (comment out for no autosave)
autosaveClaim:

# default resource limits
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi

# extra tolerations if needed
tolerations:

0 comments on commit 7db9e02

Please sign in to comment.