Skip to content

Commit

Permalink
feat(k8s): add validations on Create/Update cluster (#1436)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Sep 18, 2024
1 parent 773f36c commit fab6928
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions packages/clients/src/api/k8s/v1/validation-rules.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,26 @@
// If you have any remark or suggestion do not hesitate to open an issue.

export const CreateClusterRequest = {
description: {
maxLength: 4096,
minLength: 1,
},
name: {
maxLength: 100,
minLength: 1,
},
type: {
maxLength: 100,
},
version: {
maxLength: 10,
},
}

export const CreateClusterRequestAutoscalerConfig = {
scaleDownDelayAfterAdd: {
maxLength: 100,
},
scaleDownUtilizationThreshold: {
greaterThan: 0,
lessThan: 1,
Expand All @@ -16,27 +30,36 @@ export const CreateClusterRequestAutoscalerConfig = {

export const CreateClusterRequestOpenIDConnectConfig = {
clientId: {
maxLength: 255,
minLength: 1,
},
groupsPrefix: {
maxLength: 100,
minLength: 1,
},
issuerUrl: {
maxLength: 255,
},
usernameClaim: {
maxLength: 100,
minLength: 1,
},
usernamePrefix: {
maxLength: 100,
minLength: 1,
},
}

export const CreateClusterRequestPoolConfig = {
name: {
maxLength: 100,
minLength: 1,
},
}

export const CreatePoolRequest = {
name: {
maxLength: 100,
minLength: 1,
},
}
Expand Down Expand Up @@ -96,15 +119,57 @@ export const MaintenanceWindow = {
},
}

export const SetClusterTypeRequest = {
type: {
maxLength: 100,
},
}

export const UpdateClusterRequest = {
description: {
maxLength: 4096,
minLength: 1,
},
name: {
maxLength: 100,
minLength: 1,
},
}

export const UpdateClusterRequestAutoscalerConfig = {
scaleDownDelayAfterAdd: {
maxLength: 100,
},
scaleDownUtilizationThreshold: {
greaterThan: 0,
lessThan: 1,
},
}

export const UpdateClusterRequestOpenIDConnectConfig = {
clientId: {
maxLength: 255,
minLength: 1,
},
groupsPrefix: {
maxLength: 100,
minLength: 1,
},
issuerUrl: {
maxLength: 255,
},
usernameClaim: {
maxLength: 100,
minLength: 1,
},
usernamePrefix: {
maxLength: 100,
minLength: 1,
},
}

export const UpgradeClusterRequest = {
version: {
maxLength: 10,
},
}

0 comments on commit fab6928

Please sign in to comment.