Skip to content

Commit 75fbfc3

Browse files
committed
publish chart values schemas
1 parent d702263 commit 75fbfc3

File tree

10 files changed

+388
-55
lines changed

10 files changed

+388
-55
lines changed

.github/workflows/_helm.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,21 @@ jobs:
4444
4545
mkdir -p charts
4646
for i in Charts/*; do
47-
cd $(realpath "${i}")
48-
helm package -u --app-version ${VERSION} --version ${VERSION} .
49-
mv *.tgz ../../charts
47+
if [[ ${i} =~ ^.*-ioc$ ]]; then
48+
echo "Skipping IOC schema chart: ${i}"
49+
continue
50+
fi
51+
echo "Packaging chart: ${i}"
52+
helm package -u --app-version ${VERSION} --version ${VERSION} ${i}
53+
mv $(basename ${i})-*.tgz charts/
5054
done
5155
56+
- name: Upload helm chart values schemas
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: helm-chart-schemas
60+
path: schemas/
61+
5262
- name: Push tagged helm chart to registry
5363
if: ${{ github.ref_type == 'tag' }}
5464
run: |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v2
2+
name: fastcs-instance-ioc
3+
version: 0.1.0
4+
# This chart allows generating a schema for the fastcs-instance-ioc values file.
5+
# fastcs-instance-ioc schema is used by IOC instances which have fastcs-instance
6+
# as a dependency.
7+
#
8+
# This chart is never used except by helm-schema.
Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"additionalProperties": false,
4+
"properties": {
5+
"fastcs-instance": {
6+
"$schema": "http://json-schema.org/draft-07/schema#",
7+
"additionalProperties": false,
8+
"properties": {
9+
"affinity": {
10+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Affinity",
11+
"description": "Affinity for the pod",
12+
"required": [],
13+
"title": "affinity",
14+
"type": "object"
15+
},
16+
"args": {
17+
"description": "arguments to pass to the above command",
18+
"items": {
19+
"required": [],
20+
"type": "string"
21+
},
22+
"required": [],
23+
"title": "args",
24+
"type": "array"
25+
},
26+
"baseIp": {
27+
"default": "10.96.0.0/12",
28+
"description": "Used by allocateIpFromName to allocate a fixed cluster IP for the service.\nThe default is the same for all DLS clusters.\n",
29+
"pattern": "^(\\d{1,3}\\.){3}\\d{1,3}\\/\\d{1,2}$",
30+
"required": [],
31+
"title": "CIDR for services addresses.",
32+
"type": "string"
33+
},
34+
"ca_server_port": {
35+
"default": 5064,
36+
"description": "service port for Channel Access",
37+
"required": [],
38+
"title": "ca_server_port",
39+
"type": "integer"
40+
},
41+
"clusterIP": {
42+
"default": "",
43+
"format": "ipv4",
44+
"required": [],
45+
"title": "Override for the cluster IP - only needed if allocateIpFromName clashes",
46+
"type": [
47+
"string",
48+
"null"
49+
]
50+
},
51+
"command": {
52+
"description": "Command to run in the container (as array of arguments)",
53+
"items": {
54+
"required": [],
55+
"type": "string"
56+
},
57+
"required": [],
58+
"title": "command",
59+
"type": "array"
60+
},
61+
"extra_containers": {
62+
"description": "adds addtional containers specified by image and command",
63+
"items": {
64+
"additionalProperties": false,
65+
"properties": {
66+
"command": {
67+
"description": "Command to run in the container (as array of arguments)",
68+
"required": [],
69+
"type": "array"
70+
},
71+
"image": {
72+
"description": "Container image URI",
73+
"format": "image",
74+
"required": [],
75+
"type": "string"
76+
},
77+
"name": {
78+
"description": "A name for the additional container",
79+
"required": [],
80+
"type": "string"
81+
}
82+
},
83+
"required": [
84+
"name",
85+
"image",
86+
"command"
87+
],
88+
"type": "object"
89+
},
90+
"required": [],
91+
"title": "extra_containers",
92+
"type": "array"
93+
},
94+
"global": {
95+
"description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.",
96+
"required": [],
97+
"title": "global",
98+
"type": "object"
99+
},
100+
"image": {
101+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/image",
102+
"required": [],
103+
"title": "image",
104+
"type": "string"
105+
},
106+
"iocConfig": {
107+
"default": "/epics/ioc/config",
108+
"description": "location of config folder (defaults to be the same as C++ IOCs)",
109+
"required": [],
110+
"title": "iocConfig",
111+
"type": "string"
112+
},
113+
"livenessProbe": {
114+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Probe",
115+
"required": [],
116+
"title": "livenessProbe",
117+
"type": "object"
118+
},
119+
"nodeSelector": {
120+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.NodeSelector",
121+
"description": "Node selector for the pod",
122+
"required": [],
123+
"title": "nodeSelector",
124+
"type": "object"
125+
},
126+
"podAnnotations": {
127+
"additionalProperties": false,
128+
"required": [],
129+
"title": "Pod Annotations",
130+
"type": "object"
131+
},
132+
"podLabels": {
133+
"additionalProperties": false,
134+
"required": [],
135+
"title": "Pod Labels",
136+
"type": "object"
137+
},
138+
"podSecurityContext": {
139+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.SecurityContext",
140+
"required": [],
141+
"title": "Pod Security Context",
142+
"type": "object"
143+
},
144+
"pva_server_port": {
145+
"default": 5075,
146+
"description": "service port for PV Access",
147+
"required": [],
148+
"title": "pva_server_port",
149+
"type": "integer"
150+
},
151+
"readinessProbe": {
152+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Probe",
153+
"required": [],
154+
"title": "readinessProbe",
155+
"type": "object"
156+
},
157+
"resources": {
158+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.ResourceRequirements",
159+
"required": [],
160+
"title": "Resource limits and requests",
161+
"type": "object"
162+
},
163+
"securityContext": {
164+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.SecurityContext",
165+
"required": [],
166+
"title": "Container Security Context",
167+
"type": "object"
168+
},
169+
"service": {
170+
"additionalProperties": false,
171+
"description": "The service will be configured for Channel Access and PVA. Here you can override\nthe ports and also make this a LoadBalancer service if required.\n",
172+
"properties": {
173+
"ca_port": {
174+
"default": 5064,
175+
"required": [],
176+
"title": "ca_port",
177+
"type": "integer"
178+
},
179+
"pva_port": {
180+
"default": 5075,
181+
"required": [],
182+
"title": "pva_port",
183+
"type": "integer"
184+
},
185+
"type": {
186+
"default": "ClusterIP",
187+
"required": [],
188+
"title": "type",
189+
"type": "string"
190+
}
191+
},
192+
"required": [
193+
"type",
194+
"ca_port",
195+
"pva_port"
196+
],
197+
"title": "service",
198+
"type": "object"
199+
},
200+
"tolerations": {
201+
"description": "Tolerations for the pod",
202+
"items": {
203+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Toleration",
204+
"required": [],
205+
"type": "object"
206+
},
207+
"required": [],
208+
"title": "tolerations",
209+
"type": "array"
210+
},
211+
"volumeMounts": {
212+
"items": {
213+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.VolumeMount",
214+
"required": [],
215+
"type": "object"
216+
},
217+
"required": [],
218+
"title": "volumeMounts",
219+
"type": "array"
220+
},
221+
"volumes": {
222+
"description": "Additional volumes to mount in the output Deployment definition.",
223+
"items": {
224+
"$ref": "https://kubernetesjsonschema.dev/v1.18.1/_definitions.json#/definitions/io.k8s.api.core.v1.Volume",
225+
"required": [],
226+
"type": "object"
227+
},
228+
"required": [],
229+
"title": "volumes",
230+
"type": "array"
231+
}
232+
},
233+
"required": [],
234+
"title": "fastcs-instance",
235+
"type": "object"
236+
},
237+
"global": {
238+
"description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.",
239+
"required": [],
240+
"title": "global",
241+
"type": "object"
242+
}
243+
},
244+
"required": [],
245+
"type": "object"
246+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# yaml-language-server: $schema=values.schema.json
2+
3+
# @schema
4+
# title: FastCS IOC Values
5+
# description: Values for the FastCS IOC instance
6+
# type: object
7+
# $ref: ../fastcs-instance/values.schema.json
8+
# @schema
9+
fastcs-instance: {}

Charts/fastcs-instance/templates/deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ spec:
5959
{{- toYaml . | nindent 12 }}
6060
{{- end }}
6161
image: {{ .image }}
62-
{{- with .startCommand }}
62+
{{- with .command }}
6363
command:
6464
{{- if (kindIs "string" .) }}
6565
- {{ . }}
@@ -84,15 +84,15 @@ spec:
8484
{{- end }}
8585
image: "{{ .Values.image }}"
8686
imagePullPolicy: IfNotPresent
87-
{{- with .Values.startCommand }}
87+
{{- with .Values.command }}
8888
command:
8989
{{- if (kindIs "string" .) }}
9090
- {{ . }}
9191
{{- else if (kindIs "slice" .) }}
9292
{{- . | toYaml | nindent 10 }}
9393
{{- end }}
9494
{{- end }}
95-
{{- with .Values.startArgs }}
95+
{{- with .Values.args }}
9696
args:
9797
{{- if (kindIs "string" .) }}
9898
- {{ . }}

0 commit comments

Comments
 (0)