Skip to content

Commit

Permalink
add arbitrary host mount list
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Oct 11, 2024
1 parent 083a775 commit fd52f73
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 7 deletions.
10 changes: 10 additions & 0 deletions Charts/ioc-instance/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ spec:
path: {{ .Values.dataVolume.hostPath }}
type: Directory
{{- end }}
{{- range .Values.hostMounts }}
- name: {{ .name }}
hostPath:
path: {{ .hostPath }}
type: Directory
{{- end }}
- name: config-volume
configMap:
name: {{ .Release.Name }}-config
Expand Down Expand Up @@ -114,6 +120,10 @@ spec:
- name: autosave-volume
mountPath: /autosave
subPath: "{{ .Release.Name }}"
{{- range .Values.hostMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
stdin: true
tty: true
securityContext:
Expand Down
12 changes: 10 additions & 2 deletions Charts/ioc-instance/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ dataVolume:
# inside/outside container paths.
hostPath: /data

# additional host mounts if required
hostMounts: []
# e.g.
# - name: andorusb
# hostPath: /dev/andorusb
# mountPath: /dev/andorusb

# 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
Expand All @@ -98,7 +105,8 @@ affinity:
# - bl01t

# If specified, the pod's tolerations.
tolerations: []
tolerations:
[]
# - key: location
# operator: Equal
# value: bl01t
Expand All @@ -111,4 +119,4 @@ resources:
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi
memory: 64Mi
39 changes: 34 additions & 5 deletions Schemas/ioc-instance.schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ "title": "Values",
{
"title": "Values",
"type": "object",
"$schema": "http://json-schema.org/schema#",
"$ref": "#/$defs/base",
Expand Down Expand Up @@ -30,8 +31,12 @@
"affinity": {
"description": "Affinity is a group of affinity scheduling rules.",
"oneOf": [
{"type": "null"},
{"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/affinity"}
{
"type": "null"
},
{
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/affinity"
}
]
},
"nodeName": {
Expand Down Expand Up @@ -100,6 +105,26 @@
}
}
},
"hostMounts": {
"type": "array",
"properties": {
"description": "Additional host volumes to mount into the container",
"items": {
"name": {
"type": "string",
"description": "volume name"
},
"hostPath": {
"type": "string",
"description": "Path to mount on the host"
},
"mountPath": {
"type": "string",
"description": "Path to mount in the container"
}
}
}
},
"opisClaim": {
"type": "string",
"description": "Use the shared PVC for publishing opi files over http (see services/opis)"
Expand All @@ -115,8 +140,12 @@
"resources": {
"description": "ResourceRequirements describes the compute resource requirements.",
"oneOf": [
{"type": "null"},
{"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/resources"}
{
"type": "null"
},
{
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/resources"
}
]
},
"tolerations": {
Expand Down

0 comments on commit fd52f73

Please sign in to comment.