-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make a demo with handcrafted schemas
Nest schema Merge into single schema Detail out schema Fix some parameters Add schema release action
- Loading branch information
1 parent
e41ab8f
commit a66f745
Showing
3 changed files
with
217 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Publish schemas | ||
|
||
on: | ||
push | ||
|
||
jobs: | ||
release: | ||
# Release on tag push - publish schema | ||
if: ${{ github.ref_type == 'tag' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Github Release | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 | ||
with: | ||
files: | | ||
Schemas/*.schema.json | ||
generate_release_notes: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
{ | ||
"$defs":{ | ||
"base": { | ||
"type": "object", | ||
"properties": { | ||
"beamline": { | ||
"type": "string", | ||
"description": "The beamline name." | ||
}, | ||
"location": { | ||
"type": "string", | ||
"description": "The location where the IOCs will run - same as beamline for beamlines" | ||
}, | ||
"ioc_group": { | ||
"type": "string", | ||
"description": "The name of the repository in which the IOC is grouped - same as beamline for beamlines" | ||
}, | ||
"hostNetwork": { | ||
"type": "boolean", | ||
"description": "Use host network for IOC - required for Channel Access to work outside of the cluster" | ||
}, | ||
"useAffinity": { | ||
"type": "boolean", | ||
"description": "Run only on nodes with label beamline:<beamline-name> or location:<location-name>" | ||
}, | ||
"iocFolder": { | ||
"type": "string", | ||
"description": "Root folder for ioc source/binaries inside generic IOC container", | ||
"default": "/epics/ioc" | ||
}, | ||
"iocConfig": { | ||
"type": "string", | ||
"description": "Root folder for ioc source/binaries inside generic IOC container", | ||
"default": "/epics/ioc/config" | ||
}, | ||
"startCommand": { | ||
"type": "string", | ||
"description": "The command run as the entry point of the container.", | ||
"default": "bash" | ||
}, | ||
"startArgs": { | ||
"type": "string", | ||
"description": "The arguments for the entry point of the container.", | ||
"default": "/epics/ioc/start.sh" | ||
}, | ||
"stop": { | ||
"type": "string", | ||
"description": "Script run before stopping the IOC", | ||
"default": "/epics/ioc/stop.sh" | ||
}, | ||
"liveness": { | ||
"type": "string", | ||
"description": "Script for determining the liveness of the IOC", | ||
"default": "/epics/ioc/liveness.sh" | ||
}, | ||
"globalEnv": { | ||
"type": "string", | ||
"description": "" | ||
}, | ||
"securityContext": { | ||
"type": "object", | ||
"description": "Override runAsXXX in the individual IOC values.yaml", | ||
"properties": { | ||
"allowPrivilegeEscalation": { | ||
"type": "boolean", | ||
"description": "", | ||
"default": "false" | ||
}, | ||
"runAsUser": { | ||
"type": "integer" | ||
}, | ||
"runAsGroup": { | ||
"type": "integer" | ||
}, | ||
"capabilities": { | ||
"type": "object" | ||
}, | ||
"readOnlyRootFilesystem": { | ||
"type": "string" | ||
}, | ||
"runAsNonRoot": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"image": { | ||
"type": "string", | ||
"description": "" | ||
}, | ||
"dataVolume": { | ||
"type": "object", | ||
"description": "A volume to mount for writing data to. This can be a PVC or a hostPath", | ||
"properties": { | ||
"pvc": { | ||
"type": "boolean", | ||
"description": "Create a PVC called {{ .Release.Name }}-data when true", | ||
"default": "true" | ||
}, | ||
"hostPath": { | ||
"type": "string", | ||
"description": "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", | ||
"default": "/data" | ||
} | ||
} | ||
}, | ||
"opisClaim": { | ||
"type": "string", | ||
"description": "Use the shared PVC for publishing opi files over http (see services/opis)" | ||
}, | ||
"runtimeClaim": { | ||
"type": "string", | ||
"description": "Use the shared PVC for holding runtime files for each IOC" | ||
}, | ||
"autosaveClaim": { | ||
"type": "string", | ||
"description": "Use the shared PVC autosave files (exclude for no autosave)" | ||
}, | ||
"resources": { | ||
"type": "object", | ||
"description": "Set resource limits", | ||
"properties": { | ||
"limits": { | ||
"type": "object", | ||
"properties":{ | ||
"cpu": { | ||
"type": "string", | ||
"default": "500m" | ||
}, | ||
"memory": { | ||
"type": "string", | ||
"default": "256Mi" | ||
} | ||
} | ||
}, | ||
"requests": { | ||
"type": "object", | ||
"properties":{ | ||
"cpu": { | ||
"type": "string", | ||
"default": "100m" | ||
}, | ||
"memory": { | ||
"type": "string", | ||
"default": "64Mi" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"tolerations": { | ||
"type": "object", | ||
"description": "Extra tolerations if needed" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"repo":{ | ||
"type": "object", | ||
"properties": { | ||
"ioc-instance": { | ||
"$ref": "#/$defs/base", | ||
"required": [ | ||
"autosaveClaim", | ||
"beamline", | ||
"dataVolume", | ||
"globalEnv", | ||
"hostNetwork", | ||
"useAffinity", | ||
"ioc_group", | ||
"location", | ||
"opisClaim", | ||
"runtimeClaim", | ||
"securityContext" | ||
] | ||
} | ||
} | ||
}, | ||
"service":{ | ||
"type": "object", | ||
"properties": { | ||
"shared": { | ||
"type": "object", | ||
"properties": { | ||
"ioc-instance": { | ||
"$ref": "#/$defs/base", | ||
"required": [ | ||
"image" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |