Skip to content

Commit bfb2ca6

Browse files
authored
chore(serverless_jobs): use pattern for image_uri validation (#1012)
1 parent 7fa822d commit bfb2ca6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/clients/src/api/jobs/v1alpha1/validation-rules.gen.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ export const CreateJobDefinitionRequest = {
55
cpuLimit: {
66
greaterThan: 0,
77
},
8+
imageUri: {
9+
pattern:
10+
/^((?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*)(?::([\w][\w.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$/,
11+
},
812
memoryLimit: {
913
greaterThan: 0,
1014
},
@@ -37,6 +41,10 @@ export const UpdateJobDefinitionRequest = {
3741
cpuLimit: {
3842
greaterThan: 0,
3943
},
44+
imageUri: {
45+
pattern:
46+
/^((?:(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\[(?:[a-fA-F0-9:]+)\])(?::[0-9]+)?\/)?[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:\/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*)(?::([\w][\w.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$/,
47+
},
4048
memoryLimit: {
4149
greaterThan: 0,
4250
},

0 commit comments

Comments
 (0)