Skip to content

Commit fab6928

Browse files
authored
feat(k8s): add validations on Create/Update cluster (#1436)
1 parent 773f36c commit fab6928

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

packages/clients/src/api/k8s/v1/validation-rules.gen.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,26 @@
22
// If you have any remark or suggestion do not hesitate to open an issue.
33

44
export const CreateClusterRequest = {
5+
description: {
6+
maxLength: 4096,
7+
minLength: 1,
8+
},
59
name: {
10+
maxLength: 100,
611
minLength: 1,
712
},
13+
type: {
14+
maxLength: 100,
15+
},
16+
version: {
17+
maxLength: 10,
18+
},
819
}
920

1021
export const CreateClusterRequestAutoscalerConfig = {
22+
scaleDownDelayAfterAdd: {
23+
maxLength: 100,
24+
},
1125
scaleDownUtilizationThreshold: {
1226
greaterThan: 0,
1327
lessThan: 1,
@@ -16,27 +30,36 @@ export const CreateClusterRequestAutoscalerConfig = {
1630

1731
export const CreateClusterRequestOpenIDConnectConfig = {
1832
clientId: {
33+
maxLength: 255,
1934
minLength: 1,
2035
},
2136
groupsPrefix: {
37+
maxLength: 100,
2238
minLength: 1,
2339
},
40+
issuerUrl: {
41+
maxLength: 255,
42+
},
2443
usernameClaim: {
44+
maxLength: 100,
2545
minLength: 1,
2646
},
2747
usernamePrefix: {
48+
maxLength: 100,
2849
minLength: 1,
2950
},
3051
}
3152

3253
export const CreateClusterRequestPoolConfig = {
3354
name: {
55+
maxLength: 100,
3456
minLength: 1,
3557
},
3658
}
3759

3860
export const CreatePoolRequest = {
3961
name: {
62+
maxLength: 100,
4063
minLength: 1,
4164
},
4265
}
@@ -96,15 +119,57 @@ export const MaintenanceWindow = {
96119
},
97120
}
98121

122+
export const SetClusterTypeRequest = {
123+
type: {
124+
maxLength: 100,
125+
},
126+
}
127+
99128
export const UpdateClusterRequest = {
129+
description: {
130+
maxLength: 4096,
131+
minLength: 1,
132+
},
100133
name: {
134+
maxLength: 100,
101135
minLength: 1,
102136
},
103137
}
104138

105139
export const UpdateClusterRequestAutoscalerConfig = {
140+
scaleDownDelayAfterAdd: {
141+
maxLength: 100,
142+
},
106143
scaleDownUtilizationThreshold: {
107144
greaterThan: 0,
108145
lessThan: 1,
109146
},
110147
}
148+
149+
export const UpdateClusterRequestOpenIDConnectConfig = {
150+
clientId: {
151+
maxLength: 255,
152+
minLength: 1,
153+
},
154+
groupsPrefix: {
155+
maxLength: 100,
156+
minLength: 1,
157+
},
158+
issuerUrl: {
159+
maxLength: 255,
160+
},
161+
usernameClaim: {
162+
maxLength: 100,
163+
minLength: 1,
164+
},
165+
usernamePrefix: {
166+
maxLength: 100,
167+
minLength: 1,
168+
},
169+
}
170+
171+
export const UpgradeClusterRequest = {
172+
version: {
173+
maxLength: 10,
174+
},
175+
}

0 commit comments

Comments
 (0)