Skip to content

Commit

Permalink
add resources to ioc-instance schema
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Nov 7, 2024
1 parent ae2bc99 commit 069bd6f
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci_verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ mkdir -p ${ROOT}/.ci_work
# use docker if available else use podman
if ! docker version &>/dev/null; then docker=podman; else docker=docker; fi

# copy the services to a temporary location to avoid dirtying the repo
cp -r ${ROOT}/services/* ${ROOT}/.ci_work/

for service in ${ROOT}/services/*/ # */ to skip files
do

### Lint each service chart and validate if schema given ###
service_name=$(basename $service)
cp -r $service ${ROOT}/.ci_work/$service_name
schema=$(cat ${service}/values.yaml | sed -rn 's/^# yaml-language-server: \$schema=(.*)/\1/p')
if [ -n "${schema}" ]; then
echo "{\"\$ref\": \"$schema\"}" > ${ROOT}/.ci_work/$service_name/values.schema.json
fi
$docker run --rm --entrypoint bash \
-v ${ROOT}/.ci_work/$service_name:/services/$service_name \
-v ${ROOT}/.ci_work:/services \
alpine/helm:3.14.3 \
-c "helm dependency update /services/$service_name"
$docker run --rm --entrypoint bash \
-v ${ROOT}/.ci_work/$service_name:/services/$service_name \
-v ${ROOT}/services/values.yaml:/services/values.yaml \
-v ${ROOT}/.ci_work:/services \
alpine/helm:3.14.3 \
-c "helm lint /services/$service_name --values /services/values.yaml"

Expand Down
4 changes: 1 addition & 3 deletions services/bl45p-ea-dcam-01/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Arguments to the shared ioc instance template dls-aravis
# This will make an IOC instance for an aravis camera with a standard set
# of Areadetector plugins.
# yaml-language-server: $schema=https://github.com/epics-containers/ec-helm-charts/releases/download/4.1.2/ioc-instance.schema.json

dls-aravis:
P: BL45P-EA-MAP-01
Expand Down
3 changes: 3 additions & 0 deletions services/bl45p-ea-dcam-02/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# yaml-language-server: $schema=https://github.com/epics-containers/ec-helm-charts/releases/download/4.1.2/ioc-instance.schema.json

# Arguments to the shared ioc instance template dls-aravis
# This will make an IOC instance for an aravis camera with a standard set
# of Areadetector plugins.
Expand All @@ -8,3 +10,4 @@ dls-aravis:

ioc-instance:
image: ghcr.io/epics-containers/ioc-adaravis-runtime:2024.11.1
location: bl45p # TODO remove me when schema is fixed
7 changes: 5 additions & 2 deletions services/bl45p-mo-brick-01/config/ioc.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-pmac/releases/download/2024.3.1/ibek.ioc.schema.json

# todo update ioc-pmac to latest ibek (__utils__ is old)
ioc_name: "{{ __utils__.get_env('IOC_NAME') }}"
ioc_name: "{{ _global.get_env('IOC_NAME') }}"

description: auto-generated by https://github.com/epics-containers/builder2ibek

entities:
- type: epics.EpicsEnvSet
name: EPICS_TZ
value: "GMT0BST"

- type: epics.EpicsCaMaxArrayBytes
max_bytes: 6000000

Expand Down
3 changes: 2 additions & 1 deletion services/bl45p-mo-brick-01/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# yaml-language-server: $schema=https://github.com/marcelldls/ec-helm-charts/releases/download/3.4.4/ioc-instance.schema.json#/$defs/service
# yaml-language-server: $schema=https://github.com/epics-containers/ec-helm-charts/releases/download/4.1.2/ioc-instance.schema.json/#/$defs/service

# latest container image for the pmac motion controller
ioc-instance:
image: ghcr.io/epics-containers/ioc-pmac-runtime:2024.9.1
location: bl45p # TODO remove me when schema is fixed
3 changes: 2 additions & 1 deletion services/bl45p-mo-panda-01/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://github.com/marcelldls/ec-helm-charts/releases/download/3.4.4/ioc-instance.schema.json#/$defs/service
# yaml-language-server: $schema=https://github.com/epics-containers/ec-helm-charts/releases/download/4.1.2/ioc-instance.schema.json/#/$defs/service

# latest container image for GigE cameras from the GitHub Container Registry
ioc-instance:
Expand All @@ -8,3 +8,4 @@ ioc-instance:
# /epics/ioc/start.sh - thus making the pandaBlocks container image have
# the same entrypoint as ioc-template based images
iocConfig: /epics/ioc
location: bl45p # TODO remove me when schema is fixed
3 changes: 2 additions & 1 deletion services/bl45p-mo-panda-02/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://github.com/marcelldls/ec-helm-charts/releases/download/3.4.4/ioc-instance.schema.json#/$defs/service
# yaml-language-server: $schema=https://github.com/epics-containers/ec-helm-charts/releases/download/4.1.2/ioc-instance.schema.json/#/$defs/service

# latest container image for GigE cameras from the GitHub Container Registry
ioc-instance:
Expand All @@ -8,3 +8,4 @@ ioc-instance:
# /epics/ioc/start.sh - thus making the pandaBlocks container image have
# the same entrypoint as ioc-template based images
iocConfig: /epics/ioc
location: bl45p # TODO remove me when schema is fixed
6 changes: 5 additions & 1 deletion services/dls-aravis/config/ioc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ ioc_name: "[[ _global.get_env('IOC_NAME') ]]"
description: shared template for all Aravis cameras on p45

entities:
- type: epics.EpicsEnvSet
name: EPICS_TZ
value: "GMT0BST"

- type: epics.EpicsCaMaxArrayBytes
max_bytes: 6000000

Expand All @@ -16,7 +20,7 @@ entities:
IOC: "[[ ioc_name | upper ]]"

- type: ADAravis.aravisCamera
CLASS: {{ .Values.CLASS}}
CLASS: {{ .Values.CLASS }}
ID: {{ .Values.ID }}
P: {{ .Values.P }}
PORT: DET.DET
Expand Down
12 changes: 11 additions & 1 deletion services/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://github.com/epics-containers/ec-helm-charts/releases/download/4.1.2/ioc-instance.schema.json/#/$defs/service
# shared values for all services

global:
Expand All @@ -9,6 +10,7 @@ ioc-instance:
# useHostNetwork - use host network for IOC - required for Channel Access
# to work outside of the cluster
hostNetwork: true
location: bl45p # TODO remove me when schema is fixed

# affinity and tolerations to get the right nodes on pollux
securityContext:
Expand All @@ -19,7 +21,15 @@ ioc-instance:
pvc: false
hostPath: /dls/p45/data

useAffinity: true
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: beamline
operator: In
values:
- bl45p

tolerations:
- key: beamline
Expand Down

0 comments on commit 069bd6f

Please sign in to comment.