mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 01:40:13 +00:00
generated: ./hack/update-codegen.sh && ./hack/update-openapi-spec.sh
This commit is contained in:
parent
d8be7aa9ca
commit
1fff4949bd
4
api/openapi-spec/swagger.json
generated
4
api/openapi-spec/swagger.json
generated
@ -675,6 +675,10 @@
|
||||
"description": "Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".",
|
||||
"type": "string"
|
||||
},
|
||||
"messageExpression": {
|
||||
"description": "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\"",
|
||||
"type": "string"
|
||||
},
|
||||
"reason": {
|
||||
"description": "Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.",
|
||||
"type": "string"
|
||||
|
@ -421,6 +421,10 @@
|
||||
"description": "Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".",
|
||||
"type": "string"
|
||||
},
|
||||
"messageExpression": {
|
||||
"description": "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\"",
|
||||
"type": "string"
|
||||
},
|
||||
"reason": {
|
||||
"description": "Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.",
|
||||
"type": "string"
|
||||
|
@ -548,6 +548,7 @@ func autoConvert_v1alpha1_Validation_To_admissionregistration_Validation(in *v1a
|
||||
out.Expression = in.Expression
|
||||
out.Message = in.Message
|
||||
out.Reason = (*v1.StatusReason)(unsafe.Pointer(in.Reason))
|
||||
out.MessageExpression = in.MessageExpression
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -560,6 +561,7 @@ func autoConvert_admissionregistration_Validation_To_v1alpha1_Validation(in *adm
|
||||
out.Expression = in.Expression
|
||||
out.Message = in.Message
|
||||
out.Reason = (*v1.StatusReason)(unsafe.Pointer(in.Reason))
|
||||
out.MessageExpression = in.MessageExpression
|
||||
return nil
|
||||
}
|
||||
|
||||
|
7
pkg/generated/openapi/zz_generated.openapi.go
generated
7
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -2498,6 +2498,13 @@ func schema_k8sio_api_admissionregistration_v1alpha1_Validation(ref common.Refer
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"messageExpression": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\"",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"expression"},
|
||||
},
|
||||
|
@ -401,80 +401,81 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_c3be8d256e3ae3cf = []byte{
|
||||
// 1159 bytes of a gzipped FileDescriptorProto
|
||||
// 1177 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x6f, 0x1b, 0x45,
|
||||
0x18, 0xce, 0xd6, 0x6e, 0x1b, 0x8f, 0x9b, 0xc4, 0x1e, 0x5a, 0xd5, 0x44, 0xd4, 0x8e, 0xac, 0x0a,
|
||||
0x25, 0x07, 0x76, 0x49, 0x5a, 0x28, 0x70, 0x41, 0x5e, 0x5a, 0x44, 0x95, 0xa4, 0x89, 0x26, 0x28,
|
||||
0x18, 0xce, 0xd6, 0x6e, 0x1b, 0x8f, 0x9b, 0xc4, 0x1e, 0x52, 0xd5, 0x8d, 0xa8, 0x1d, 0x59, 0x15,
|
||||
0x4a, 0x0e, 0xec, 0x92, 0xb4, 0x50, 0xe0, 0x82, 0xbc, 0xb4, 0x40, 0x95, 0xb8, 0x89, 0x26, 0x28,
|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0x03, 0x87, 0x72,
|
||||
0xf0, 0xf0, 0x7b, 0x30, 0xe7, 0x2b, 0xdd, 0x28, 0xe8, 0x13, 0x56, 0x2b, 0x2c, 0x15, 0x96, 0xcb,
|
||||
0x6b, 0xa6, 0x3e, 0x75, 0xe3, 0xea, 0x42, 0x58, 0x5b, 0x24, 0xef, 0x51, 0xde, 0xdd, 0xf2, 0x48,
|
||||
0xe4, 0x67, 0xe6, 0x1d, 0xb5, 0x05, 0x73, 0x28, 0x4d, 0x80, 0xb2, 0x7c, 0xf0, 0x67, 0x0d, 0xdc,
|
||||
0x26, 0x47, 0x56, 0x3f, 0x68, 0x93, 0x4c, 0x5c, 0xad, 0x78, 0x65, 0x0b, 0x79, 0x47, 0x2d, 0xe4,
|
||||
0xf6, 0x93, 0x31, 0x3c, 0x68, 0x2c, 0x3b, 0x7c, 0x0c, 0xca, 0xb6, 0x68, 0x8a, 0x6d, 0xb7, 0x4f,
|
||||
0xad, 0xe3, 0xda, 0x4d, 0xd9, 0x54, 0xcd, 0x70, 0xd0, 0x28, 0x6f, 0x26, 0xe6, 0xf3, 0x41, 0x63,
|
||||
0x21, 0xf5, 0xf9, 0xe5, 0xb1, 0x47, 0x50, 0x3a, 0xad, 0x79, 0xaa, 0x81, 0xbb, 0x13, 0x56, 0x05,
|
||||
0x1f, 0x25, 0x95, 0x97, 0xad, 0x51, 0xd3, 0x96, 0x0a, 0xcb, 0x25, 0xb3, 0x9a, 0xae, 0x98, 0x74,
|
||||
0xa0, 0x6c, 0x1c, 0xfc, 0x41, 0x03, 0xd0, 0x1f, 0xc1, 0x53, 0x8d, 0xf2, 0x68, 0x9a, 0x7a, 0xe9,
|
||||
0x63, 0x8a, 0xb4, 0xa8, 0x8a, 0x04, 0x47, 0x7d, 0x68, 0x0c, 0x5d, 0x13, 0x83, 0xd2, 0x36, 0xf6,
|
||||
0xb1, 0xbd, 0x4e, 0x9d, 0x36, 0x5c, 0x03, 0x00, 0x7b, 0x74, 0x97, 0xf8, 0x72, 0x02, 0xa3, 0x61,
|
||||
0x85, 0x0a, 0x10, 0xb4, 0xb6, 0x9f, 0x2a, 0x0f, 0x4a, 0x45, 0xc1, 0x25, 0x50, 0xec, 0x51, 0xa7,
|
||||
0xad, 0xe6, 0xf5, 0x96, 0x8a, 0x2e, 0x0a, 0x3c, 0x24, 0x3d, 0xcd, 0xe7, 0x60, 0x56, 0x52, 0x20,
|
||||
0x72, 0x20, 0xa2, 0xc5, 0xb4, 0x28, 0xec, 0x61, 0xb4, 0xa8, 0x08, 0x92, 0x1e, 0x68, 0x80, 0xd2,
|
||||
0x70, 0x9e, 0x14, 0x68, 0x55, 0x85, 0x95, 0x86, 0xb3, 0x87, 0x92, 0x98, 0xe6, 0x5f, 0x1a, 0x78,
|
||||
0x7b, 0x17, 0xf7, 0x69, 0x1b, 0x73, 0xea, 0x74, 0x5a, 0x71, 0xad, 0xa2, 0xad, 0x83, 0xdf, 0x80,
|
||||
0x59, 0x31, 0x55, 0x6d, 0xcc, 0xb1, 0x1a, 0xfd, 0xf7, 0xa7, 0x9b, 0xc1, 0x68, 0xe0, 0x36, 0x09,
|
||||
0xc7, 0x49, 0x09, 0x12, 0x1b, 0x1a, 0xa2, 0xc2, 0x17, 0xa0, 0xc8, 0x3c, 0x62, 0xa9, 0x8d, 0xfb,
|
||||
0xe2, 0x12, 0x8d, 0x3e, 0x71, 0xd5, 0x3b, 0x1e, 0xb1, 0x92, 0xe2, 0x88, 0x2f, 0x24, 0x39, 0x9a,
|
||||
0xff, 0x68, 0x60, 0x69, 0x62, 0x96, 0x49, 0x9d, 0x36, 0x75, 0x3a, 0x6f, 0x40, 0xf2, 0xb7, 0x19,
|
||||
0xc9, 0x5b, 0x57, 0x21, 0x59, 0x2d, 0x7e, 0xa2, 0xf2, 0xbf, 0x35, 0x70, 0xff, 0xa2, 0xe4, 0x0d,
|
||||
0xca, 0x38, 0xfc, 0x7a, 0x44, 0xbd, 0x3e, 0xe5, 0xa1, 0x4b, 0x59, 0xa4,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0x4f, 0x94, 0xa0, 0xc2, 0xef, 0x40, 0x45, 0x6e,
|
||||
0xed, 0x67, 0xae, 0x23, 0x00, 0xa8, 0xc3, 0xe3, 0xfb, 0xf1, 0x7f, 0x74, 0xd0, 0xed, 0x70, 0xd0,
|
||||
0xa8, 0x6c, 0xe6, 0x60, 0xd1, 0x08, 0x11, 0xec, 0x83, 0x72, 0xd2, 0x01, 0xf1, 0x83, 0xea, 0x83,
|
||||
0xd7, 0x28, 0xb9, 0xeb, 0x98, 0x6f, 0xa9, 0x1a, 0x97, 0x13, 0x1b, 0x43, 0x69, 0x78, 0xb8, 0x01,
|
||||
0xe6, 0x0e, 0x30, 0xed, 0x07, 0x3e, 0x51, 0x4f, 0x95, 0xa2, 0x1c, 0xe0, 0x77, 0xc5, 0x33, 0xe2,
|
||||
0xf3, 0xb4, 0xe3, 0x7c, 0xd0, 0xa8, 0x66, 0x0c, 0xf2, 0xb9, 0x92, 0x4d, 0x86, 0x2f, 0x35, 0x50,
|
||||
0xc1, 0xd9, 0x27, 0x38, 0xab, 0x5d, 0x97, 0x0a, 0x3e, 0xb9, 0x84, 0x82, 0xdc, 0x2b, 0xde, 0xac,
|
||||
0x29, 0x19, 0x95, 0x9c, 0x83, 0xa1, 0x11, 0xb6, 0xe6, 0x2f, 0x1a, 0x00, 0x89, 0x5a, 0x78, 0x1f,
|
||||
0x80, 0xd4, 0xe3, 0x3e, 0x3a, 0x9d, 0x8a, 0x02, 0x0e, 0xa5, 0xec, 0x70, 0x05, 0xdc, 0xb4, 0x09,
|
||||
0x63, 0xb8, 0x13, 0x5f, 0xfd, 0x0b, 0x8a, 0xf1, 0xe6, 0x66, 0x64, 0x46, 0xb1, 0x1f, 0xee, 0x81,
|
||||
0x1b, 0x3e, 0xc1, 0xcc, 0x75, 0xe4, 0x99, 0x52, 0x32, 0x3f, 0x0d, 0x07, 0x8d, 0x1b, 0x48, 0x5a,
|
||||
0xce, 0x07, 0x8d, 0xd5, 0x69, 0xfe, 0x21, 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, 0xb8, 0x38, 0xe2, 0x0b, 0x49, 0x8e, 0xfa, 0xdf,
|
||||
0x1a, 0x58, 0x9e, 0x98, 0x65, 0x52, 0xa7, 0x45, 0x9d, 0xf6, 0x1b, 0x90, 0xfc, 0x6d, 0x4a, 0xf2,
|
||||
0xd6, 0x55, 0x48, 0x56, 0x8b, 0x9f, 0xa8, 0xfc, 0x2f, 0x0d, 0xdc, 0xbf, 0x28, 0x79, 0x93, 0x32,
|
||||
0x0e, 0xbf, 0x1e, 0x51, 0xaf, 0x4f, 0x79, 0xe8, 0x52, 0x16, 0x6a, 0x2f, 0x29, 0xfa, 0xd9, 0xc8,
|
||||
0x92, 0x50, 0xee, 0x81, 0xeb, 0x94, 0x13, 0x5b, 0x8c, 0xa9, 0x38, 0xd6, 0x36, 0xae, 0x50, 0xba,
|
||||
0x39, 0xa7, 0x78, 0xaf, 0x3f, 0x15, 0x0c, 0x28, 0x24, 0xaa, 0xff, 0x98, 0xbb, 0x58, 0xb8, 0xa8,
|
||||
0x93, 0x18, 0x5e, 0x4f, 0x1a, 0x9f, 0xc5, 0x03, 0x36, 0xdc, 0xc6, 0xed, 0xa1, 0x07, 0x25, 0xa2,
|
||||
0xe0, 0x73, 0x30, 0xeb, 0xa9, 0xd1, 0x1c, 0x73, 0x43, 0x5d, 0xa4, 0x28, 0x9a, 0x6a, 0xf3, 0x96,
|
||||
0xa8, 0x56, 0xf4, 0x85, 0x86, 0x90, 0x30, 0x00, 0xf3, 0x76, 0xea, 0x4a, 0xae, 0xe4, 0x24, 0xc9,
|
||||
0x47, 0x97, 0x20, 0x49, 0xdf, 0xe9, 0xe1, 0x65, 0x98, 0xb6, 0xa1, 0x0c, 0x09, 0xdc, 0x03, 0xe5,
|
||||
0x43, 0x55, 0x31, 0xd7, 0x69, 0x58, 0xe1, 0xb9, 0x9a, 0x97, 0xc7, 0xf2, 0xaa, 0xb8, 0xc2, 0x77,
|
||||
0xb3, 0xce, 0xf3, 0x7e, 0xad, 0x94, 0x35, 0xa2, 0x51, 0x8c, 0xfa, 0x1f, 0x1a, 0xb8, 0x37, 0x71,
|
||||
0x2f, 0xde, 0x40, 0xf7, 0xd1, 0x74, 0xf7, 0x3d, 0xbe, 0x92, 0xee, 0x1b, 0xdf, 0x76, 0xbf, 0xe4,
|
||||
0xff, 0x43, 0xaa, 0xec, 0x37, 0x0c, 0x0a, 0x5e, 0x74, 0x73, 0x28, 0xad, 0x0f, 0x2f, 0xdb, 0x3c,
|
||||
0x22, 0xd7, 0x9c, 0x13, 0x47, 0xfb, 0xf0, 0x13, 0xc5, 0xa8, 0xf0, 0x3b, 0x50, 0x92, 0x5b, 0xfb,
|
||||
0xa9, 0xeb, 0x08, 0x00, 0xea, 0xf0, 0xe8, 0x7e, 0xfc, 0x1f, 0x1d, 0xb4, 0x38, 0xe8, 0xd7, 0x4a,
|
||||
0xcd, 0x0c, 0x2c, 0x1a, 0x21, 0x82, 0x3d, 0x50, 0x8c, 0x3b, 0x20, 0x7a, 0x50, 0xbd, 0xff, 0x1a,
|
||||
0x25, 0x77, 0x1d, 0xf3, 0x2d, 0x55, 0xe3, 0x62, 0x6c, 0x63, 0x28, 0x09, 0x0f, 0x37, 0xc1, 0xdc,
|
||||
0x01, 0xa6, 0xbd, 0xc0, 0x27, 0xea, 0xa9, 0x92, 0x97, 0x03, 0xfc, 0x8e, 0x78, 0x46, 0x7c, 0x96,
|
||||
0x74, 0x9c, 0xf7, 0x6b, 0xe5, 0x94, 0x41, 0x3e, 0x57, 0xd2, 0xc9, 0xf0, 0xa5, 0x06, 0x4a, 0x38,
|
||||
0xfd, 0x04, 0x67, 0x95, 0xeb, 0x52, 0xc1, 0xc7, 0x97, 0x50, 0x90, 0x79, 0xc5, 0x9b, 0x15, 0x25,
|
||||
0xa3, 0x94, 0x71, 0x30, 0x34, 0xc2, 0x56, 0xff, 0x47, 0x03, 0x20, 0x56, 0x0b, 0xef, 0x03, 0x90,
|
||||
0x78, 0xdc, 0x87, 0xa7, 0x53, 0x5e, 0xc0, 0xa1, 0x84, 0x1d, 0xae, 0x82, 0x9b, 0x36, 0x61, 0x0c,
|
||||
0xb7, 0xa3, 0xab, 0x7f, 0x41, 0x31, 0xde, 0x6c, 0x86, 0x66, 0x14, 0xf9, 0xe1, 0x1e, 0xb8, 0xe1,
|
||||
0x13, 0xcc, 0x5c, 0x47, 0x9e, 0x29, 0x05, 0xf3, 0x93, 0x41, 0xbf, 0x76, 0x03, 0x49, 0xcb, 0x79,
|
||||
0xbf, 0xb6, 0x36, 0xcd, 0x3f, 0x24, 0x7d, 0x87, 0x63, 0x1e, 0xb0, 0x30, 0x09, 0x29, 0x38, 0xf8,
|
||||
0x39, 0x28, 0x2b, 0x8e, 0xc4, 0x82, 0xc3, 0xdd, 0xb8, 0xab, 0x56, 0x53, 0x6e, 0x66, 0x03, 0xd0,
|
||||
0x68, 0x8e, 0xb9, 0x75, 0x72, 0x56, 0x9d, 0x79, 0x75, 0x56, 0x9d, 0x39, 0x3d, 0xab, 0xce, 0xbc,
|
||||
0x1c, 0x54, 0xb5, 0x93, 0x41, 0x55, 0x7b, 0x35, 0xa8, 0x6a, 0xa7, 0x83, 0xaa, 0xf6, 0xdb, 0xa0,
|
||||
0xaa, 0xfd, 0xf4, 0x7b, 0x75, 0xe6, 0xab, 0xd5, 0xa9, 0xff, 0x95, 0xfe, 0x1b, 0x00, 0x00, 0xff,
|
||||
0xff, 0x47, 0xed, 0x82, 0x0e, 0xda, 0x0e, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *AuditAnnotation) Marshal() (dAtA []byte, err error) {
|
||||
@ -1043,6 +1044,11 @@ func (m *Validation) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
i -= len(m.MessageExpression)
|
||||
copy(dAtA[i:], m.MessageExpression)
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(len(m.MessageExpression)))
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
if m.Reason != nil {
|
||||
i -= len(*m.Reason)
|
||||
copy(dAtA[i:], *m.Reason)
|
||||
@ -1295,6 +1301,8 @@ func (m *Validation) Size() (n int) {
|
||||
l = len(*m.Reason)
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
}
|
||||
l = len(m.MessageExpression)
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
return n
|
||||
}
|
||||
|
||||
@ -1471,6 +1479,7 @@ func (this *Validation) String() string {
|
||||
`Expression:` + fmt.Sprintf("%v", this.Expression) + `,`,
|
||||
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
|
||||
`Reason:` + valueToStringGenerated(this.Reason) + `,`,
|
||||
`MessageExpression:` + fmt.Sprintf("%v", this.MessageExpression) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
@ -3164,6 +3173,38 @@ func (m *Validation) Unmarshal(dAtA []byte) error {
|
||||
s := k8s_io_apimachinery_pkg_apis_meta_v1.StatusReason(dAtA[iNdEx:postIndex])
|
||||
m.Reason = &s
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field MessageExpression", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.MessageExpression = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
|
@ -413,5 +413,18 @@ message Validation {
|
||||
// If not set, StatusReasonInvalid is used in the response to the client.
|
||||
// +optional
|
||||
optional string reason = 3;
|
||||
|
||||
// messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.
|
||||
// Since messageExpression is used as a failure message, it must evaluate to a string.
|
||||
// If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails.
|
||||
// If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced
|
||||
// as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string
|
||||
// that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and
|
||||
// the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.
|
||||
// messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'.
|
||||
// Example:
|
||||
// "object.x must be less than max ("+string(params.max)+")"
|
||||
// +optional
|
||||
optional string messageExpression = 4;
|
||||
}
|
||||
|
||||
|
@ -145,10 +145,11 @@ func (ValidatingAdmissionPolicySpec) SwaggerDoc() map[string]string {
|
||||
}
|
||||
|
||||
var map_Validation = map[string]string{
|
||||
"": "Validation specifies the CEL expression which is used to apply the validation.",
|
||||
"expression": "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired.",
|
||||
"message": "Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".",
|
||||
"reason": "Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.",
|
||||
"": "Validation specifies the CEL expression which is used to apply the validation.",
|
||||
"expression": "Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are:\n\t \"true\", \"false\", \"null\", \"in\", \"as\", \"break\", \"const\", \"continue\", \"else\", \"for\", \"function\", \"if\",\n\t \"import\", \"let\", \"loop\", \"package\", \"namespace\", \"return\".\nExamples:\n - Expression accessing a property named \"namespace\": {\"Expression\": \"object.__namespace__ > 0\"}\n - Expression accessing a property named \"x-prop\": {\"Expression\": \"object.x__dash__prop > 0\"}\n - Expression accessing a property named \"redact__d\": {\"Expression\": \"object.redact__underscores__d > 0\"}\n\nEquality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:\n - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and\n non-intersecting elements in `Y` are appended, retaining their partial order.\n - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values\n are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with\n non-intersecting keys are appended, retaining their partial order.\nRequired.",
|
||||
"message": "Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is \"failed rule: {Rule}\". e.g. \"must be a URL with the host matching spec.host\" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is \"failed Expression: {Expression}\".",
|
||||
"reason": "Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: \"Unauthorized\", \"Forbidden\", \"Invalid\", \"RequestEntityTooLarge\". If not set, StatusReasonInvalid is used in the response to the client.",
|
||||
"messageExpression": "messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: \"object.x must be less than max (\"+string(params.max)+\")\"",
|
||||
}
|
||||
|
||||
func (Validation) SwaggerDoc() map[string]string {
|
||||
|
@ -25,9 +25,10 @@ import (
|
||||
// ValidationApplyConfiguration represents an declarative configuration of the Validation type for use
|
||||
// with apply.
|
||||
type ValidationApplyConfiguration struct {
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Reason *v1.StatusReason `json:"reason,omitempty"`
|
||||
Expression *string `json:"expression,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Reason *v1.StatusReason `json:"reason,omitempty"`
|
||||
MessageExpression *string `json:"messageExpression,omitempty"`
|
||||
}
|
||||
|
||||
// ValidationApplyConfiguration constructs an declarative configuration of the Validation type for use with
|
||||
@ -59,3 +60,11 @@ func (b *ValidationApplyConfiguration) WithReason(value v1.StatusReason) *Valida
|
||||
b.Reason = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithMessageExpression sets the MessageExpression field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the MessageExpression field is set to the value of the last call.
|
||||
func (b *ValidationApplyConfiguration) WithMessageExpression(value string) *ValidationApplyConfiguration {
|
||||
b.MessageExpression = &value
|
||||
return b
|
||||
}
|
||||
|
@ -404,6 +404,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: message
|
||||
type:
|
||||
scalar: string
|
||||
- name: messageExpression
|
||||
type:
|
||||
scalar: string
|
||||
- name: reason
|
||||
type:
|
||||
scalar: string
|
||||
|
Loading…
Reference in New Issue
Block a user