Skip to content

Commit 52d2b0d

Browse files
committed
fix: sync crd chart templates
1 parent 491ea54 commit 52d2b0d

2 files changed

Lines changed: 38 additions & 10 deletions

File tree

charts/substrate-crds/templates/ate.dev_actortemplates.yaml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ spec:
6363
description: Entrypoint array. Not executed within a shell.
6464
items:
6565
type: string
66+
maxItems: 64
6667
type: array
6768
x-kubernetes-list-type: atomic
6869
env:
@@ -75,12 +76,19 @@ spec:
7576
envFrom is not supported, and valueFrom currently supports only secretKeyRef.
7677
properties:
7778
name:
78-
description: Name of the environment variable. Must be
79-
a C_IDENTIFIER.
79+
description: |-
80+
Name is the name of the environment variable. May be any printable ASCII
81+
character except '='.
82+
minLength: 1
83+
pattern: ^[ -<>-~]+$
8084
type: string
8185
value:
82-
description: Variable value. Defaults to "". Mutually
83-
exclusive with ValueFrom.
86+
description: |-
87+
Variable value. Mutually exclusive with ValueFrom.
88+
Value is the literal value of the environment variable. Unlike in
89+
Kubernetes pods, this value is not interpolated, and $(VAR)
90+
references are not expanded.
91+
minLength: 0
8492
type: string
8593
valueFrom:
8694
description: |-
@@ -96,11 +104,15 @@ spec:
96104
key:
97105
description: Key to select within the Secret.
98106
minLength: 1
107+
pattern: ^[-._a-zA-Z0-9]+$
99108
type: string
100109
name:
101110
description: Name of the referent Secret.
102-
minLength: 1
111+
maxLength: 253
103112
type: string
113+
x-kubernetes-validations:
114+
- message: Name must be a valid DNS subdomain
115+
rule: '!format.dns1123Subdomain().validate(self).hasValue()'
104116
optional:
105117
description: Specify whether the Secret or its
106118
key must be defined.
@@ -114,8 +126,11 @@ spec:
114126
- name
115127
type: object
116128
x-kubernetes-validations:
117-
- message: value and valueFrom are mutually exclusive
118-
rule: '!(has(self.value) && has(self.valueFrom))'
129+
- message: exactly one of the fields in [value valueFrom]
130+
must be set
131+
rule: '[has(self.value),has(self.valueFrom)].filter(x,x==true).size()
132+
== 1'
133+
maxItems: 32
119134
type: array
120135
image:
121136
description: Image to use for the worker replicas.
@@ -126,8 +141,13 @@ spec:
126141
rule: self.contains('@')
127142
name:
128143
description: Name of the container.
144+
maxLength: 63
129145
type: string
146+
x-kubernetes-validations:
147+
- message: Name must be a valid DNS label
148+
rule: '!format.dns1123Label().validate(self).hasValue()'
130149
required:
150+
- image
131151
- name
132152
type: object
133153
maxItems: 10
@@ -156,11 +176,13 @@ spec:
156176
The SHA256 hash of the binary to download. Used both to name the
157177
downloaded file (for preventing conflicts), and to check the integrity of
158178
the downloaded file.
179+
pattern: ^[a-z0-9]+$
159180
type: string
160181
url:
161-
description: |-
182+
description: |
162183
A gs:// URL pointing to a runsc binary that can be downloaded (possibly
163184
with atelet's credentials).
185+
minLength: 1
164186
type: string
165187
required:
166188
- sha256Hash
@@ -174,11 +196,13 @@ spec:
174196
The SHA256 hash of the binary to download. Used both to name the
175197
downloaded file (for preventing conflicts), and to check the integrity of
176198
the downloaded file.
199+
pattern: ^[a-z0-9]+$
177200
type: string
178201
url:
179-
description: |-
202+
description: |
180203
A gs:// URL pointing to a runsc binary that can be downloaded (possibly
181204
with atelet's credentials).
205+
minLength: 1
182206
type: string
183207
required:
184208
- sha256Hash
@@ -198,12 +222,14 @@ spec:
198222
properties:
199223
location:
200224
description: Location to store snapshots in.
225+
minLength: 1
201226
type: string
202227
required:
203228
- location
204229
type: object
205230
workerPoolRef:
206-
description: Name of the worker pool to use for the actor.
231+
description: |
232+
Name of the worker pool to use for the actor.
207233
properties:
208234
apiVersion:
209235
description: API version of the referent.

charts/substrate-crds/templates/ate.dev_workerpools.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ spec:
6767
ateomImage:
6868
description: AteomImage is the ateom container image to deploy as
6969
workers.
70+
minLength: 1
7071
type: string
7172
replicas:
7273
description: Replicas is the number of worker pods to run.
@@ -83,6 +84,7 @@ spec:
8384
replicas:
8485
description: Replicas is the total number of worker pods.
8586
format: int32
87+
minimum: 0
8688
type: integer
8789
type: object
8890
required:

0 commit comments

Comments
 (0)