Skip to content

Commit

Permalink
Add additional volumes & volume mounts, fix schema
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelldls committed Oct 15, 2024
1 parent 083a775 commit 4ef20a2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 23 deletions.
6 changes: 6 additions & 0 deletions Charts/ioc-instance/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ spec:
- name: config-volume
configMap:
name: {{ .Release.Name }}-config
{{- if .Values.volumes }}
{{ toYaml .Values.volumes | indent 8}}
{{- end }}
containers:
- name: {{ .Release.Name }}
image: {{ .Values.image }}
Expand Down Expand Up @@ -114,6 +117,9 @@ spec:
- name: autosave-volume
mountPath: /autosave
subPath: "{{ .Release.Name }}"
{{- if .Values.volumeMounts }}
{{ toYaml .Values.volumeMounts | indent 8}}
{{- end }}
stdin: true
tty: true
securityContext:
Expand Down
16 changes: 15 additions & 1 deletion Charts/ioc-instance/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,25 @@ runtimeClaim: ""
# use the shared PVC autosave files (comment out for no autosave)
autosaveClaim: ""

# Additional volumes for the IOC pod
volumes: []
# - name:
# hostPath:
# path:
# - name:
# persistentVolumeClaim:
# claimName:

# Additional volume mounts for the IOC container
volumeMounts: []
# - name:
# mountPath:

# nodeName is used to run on a specific node. Overrides affinity
nodeName: ""

# Affinity is a group of affinity scheduling rules.
affinity:
affinity: {}
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
Expand Down
42 changes: 20 additions & 22 deletions Schemas/ioc-instance.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"base": {
"type": "object",
"properties": {
"image": {
"type": "string",
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/image",
"description": "The container image URI for the Generic IOC",
"default": ""
},
"location": {
"type": "string",
"description": "The location where the IOCs will run",
Expand All @@ -27,16 +33,6 @@
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/hostNetwork",
"description": "Use host network for IOC - required for Channel Access to work outside of the cluster unless a ca-gateway is in use"
},
"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"}
]
},
"nodeName": {
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/nodeName"
},
"iocFolder": {
"type": "string",
"description": "Root folder for ioc source/binaries inside generic IOC container",
Expand Down Expand Up @@ -78,12 +74,6 @@
"securityContext": {
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/securityContext"
},
"image": {
"type": "string",
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/image",
"description": "The container image URI for the Generic IOC",
"default": ""
},
"dataVolume": {
"type": "object",
"description": "A volume to mount for writing data to. This can be a PVC or a hostPath",
Expand Down Expand Up @@ -112,15 +102,23 @@
"type": "string",
"description": "Use the shared PVC autosave files (exclude for no autosave)"
},
"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"}
]
"volumes": {
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/volumes"
},
"volumeMounts": {
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/volumeMounts"
},
"nodeName": {
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/nodeName"
},
"affinity": {
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/affinity"
},
"tolerations": {
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/tolerations"
},
"resources": {
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/resources"
}
},
"additionalProperties": false
Expand Down

0 comments on commit 4ef20a2

Please sign in to comment.