Skip to content

Commit 4ee4a83

Browse files
committed
chore: run codegen and commit updated files
Signed-off-by: Seungweon Baek <goodbsw@gmail.com>
1 parent 71b9ac2 commit 4ee4a83

71 files changed

Lines changed: 2567 additions & 4102 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

k8s-pb-codegen/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ fn main() -> Result<()> {
8080
}
8181

8282
let mut parts = package_name.split('.').collect::<Vec<_>>();
83-
while let Some(module) = parts.pop() {
83+
while !parts.is_empty() {
84+
let module = parts.pop().with_context(|| "Failed to pop module from package parts")?;
8485
let parent = parts.join("/");
8586
module_tree
8687
.entry(parent)

k8s-pb/src/api/admission/v1/mod.rs

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ pub struct AdmissionRequest {
1212
/// kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
1313
/// +optional
1414
#[prost(message, optional, tag = "2")]
15-
pub kind:
16-
::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionKind>,
15+
pub kind: ::core::option::Option<
16+
super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionKind,
17+
>,
1718
/// resource is the fully-qualified resource being requested (for example, v1.pods)
1819
/// +optional
1920
#[prost(message, optional, tag = "3")]
20-
pub resource:
21-
::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionResource>,
21+
pub resource: ::core::option::Option<
22+
super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionResource,
23+
>,
2224
/// subResource is the subresource being requested, if any (for example, "status" or "scale")
2325
/// +optional
2426
#[prost(string, optional, tag = "4")]
@@ -35,8 +37,9 @@ pub struct AdmissionRequest {
3537
/// See documentation for the "matchPolicy" field in the webhook configuration type for more details.
3638
/// +optional
3739
#[prost(message, optional, tag = "13")]
38-
pub request_kind:
39-
::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionKind>,
40+
pub request_kind: ::core::option::Option<
41+
super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionKind,
42+
>,
4043
/// requestResource is the fully-qualified resource of the original API request (for example, v1.pods).
4144
/// If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.
4245
///
@@ -49,8 +52,9 @@ pub struct AdmissionRequest {
4952
/// See documentation for the "matchPolicy" field in the webhook configuration type.
5053
/// +optional
5154
#[prost(message, optional, tag = "14")]
52-
pub request_resource:
53-
::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionResource>,
55+
pub request_resource: ::core::option::Option<
56+
super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionResource,
57+
>,
5458
/// requestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale")
5559
/// If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed.
5660
/// See documentation for the "matchPolicy" field in the webhook configuration type.
@@ -78,11 +82,15 @@ pub struct AdmissionRequest {
7882
/// object is the object from the incoming request.
7983
/// +optional
8084
#[prost(message, optional, tag = "9")]
81-
pub object: ::core::option::Option<super::super::super::apimachinery::pkg::runtime::RawExtension>,
85+
pub object: ::core::option::Option<
86+
super::super::super::apimachinery::pkg::runtime::RawExtension,
87+
>,
8288
/// oldObject is the existing object. Only populated for DELETE and UPDATE requests.
8389
/// +optional
8490
#[prost(message, optional, tag = "10")]
85-
pub old_object: ::core::option::Option<super::super::super::apimachinery::pkg::runtime::RawExtension>,
91+
pub old_object: ::core::option::Option<
92+
super::super::super::apimachinery::pkg::runtime::RawExtension,
93+
>,
8694
/// dryRun indicates that modifications will definitely not be persisted for this request.
8795
/// Defaults to false.
8896
/// +optional
@@ -95,7 +103,9 @@ pub struct AdmissionRequest {
95103
/// `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
96104
/// +optional
97105
#[prost(message, optional, tag = "12")]
98-
pub options: ::core::option::Option<super::super::super::apimachinery::pkg::runtime::RawExtension>,
106+
pub options: ::core::option::Option<
107+
super::super::super::apimachinery::pkg::runtime::RawExtension,
108+
>,
99109
}
100110
/// AdmissionResponse describes an admission response.
101111
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -113,7 +123,9 @@ pub struct AdmissionResponse {
113123
/// This field IS NOT consulted in any way if "Allowed" is "true".
114124
/// +optional
115125
#[prost(message, optional, tag = "3")]
116-
pub status: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Status>,
126+
pub status: ::core::option::Option<
127+
super::super::super::apimachinery::pkg::apis::meta::v1::Status,
128+
>,
117129
/// patch is the patch body. Currently we only support "JSONPatch" which implements RFC 6902.
118130
/// +optional
119131
#[prost(bytes = "vec", optional, tag = "4")]
@@ -128,8 +140,10 @@ pub struct AdmissionResponse {
128140
/// the admission webhook to add additional context to the audit log for this request.
129141
/// +optional
130142
#[prost(btree_map = "string, string", tag = "6")]
131-
pub audit_annotations:
132-
::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
143+
pub audit_annotations: ::prost::alloc::collections::BTreeMap<
144+
::prost::alloc::string::String,
145+
::prost::alloc::string::String,
146+
>,
133147
/// warnings is a list of warning messages to return to the requesting API client.
134148
/// Warning messages describe a problem the client making the API request should correct or be aware of.
135149
/// Limit warnings to 120 characters if possible.

k8s-pb/src/api/admission/v1beta1/mod.rs

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ pub struct AdmissionRequest {
1212
/// kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)
1313
/// +optional
1414
#[prost(message, optional, tag = "2")]
15-
pub kind:
16-
::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionKind>,
15+
pub kind: ::core::option::Option<
16+
super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionKind,
17+
>,
1718
/// resource is the fully-qualified resource being requested (for example, v1.pods)
1819
/// +optional
1920
#[prost(message, optional, tag = "3")]
20-
pub resource:
21-
::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionResource>,
21+
pub resource: ::core::option::Option<
22+
super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionResource,
23+
>,
2224
/// subResource is the subresource being requested, if any (for example, "status" or "scale")
2325
/// +optional
2426
#[prost(string, optional, tag = "4")]
@@ -35,8 +37,9 @@ pub struct AdmissionRequest {
3537
/// See documentation for the "matchPolicy" field in the webhook configuration type for more details.
3638
/// +optional
3739
#[prost(message, optional, tag = "13")]
38-
pub request_kind:
39-
::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionKind>,
40+
pub request_kind: ::core::option::Option<
41+
super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionKind,
42+
>,
4043
/// requestResource is the fully-qualified resource of the original API request (for example, v1.pods).
4144
/// If this is specified and differs from the value in "resource", an equivalent match and conversion was performed.
4245
///
@@ -49,8 +52,9 @@ pub struct AdmissionRequest {
4952
/// See documentation for the "matchPolicy" field in the webhook configuration type.
5053
/// +optional
5154
#[prost(message, optional, tag = "14")]
52-
pub request_resource:
53-
::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionResource>,
55+
pub request_resource: ::core::option::Option<
56+
super::super::super::apimachinery::pkg::apis::meta::v1::GroupVersionResource,
57+
>,
5458
/// requestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale")
5559
/// If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed.
5660
/// See documentation for the "matchPolicy" field in the webhook configuration type.
@@ -78,11 +82,15 @@ pub struct AdmissionRequest {
7882
/// object is the object from the incoming request.
7983
/// +optional
8084
#[prost(message, optional, tag = "9")]
81-
pub object: ::core::option::Option<super::super::super::apimachinery::pkg::runtime::RawExtension>,
85+
pub object: ::core::option::Option<
86+
super::super::super::apimachinery::pkg::runtime::RawExtension,
87+
>,
8288
/// oldObject is the existing object. Only populated for DELETE and UPDATE requests.
8389
/// +optional
8490
#[prost(message, optional, tag = "10")]
85-
pub old_object: ::core::option::Option<super::super::super::apimachinery::pkg::runtime::RawExtension>,
91+
pub old_object: ::core::option::Option<
92+
super::super::super::apimachinery::pkg::runtime::RawExtension,
93+
>,
8694
/// dryRun indicates that modifications will definitely not be persisted for this request.
8795
/// Defaults to false.
8896
/// +optional
@@ -95,7 +103,9 @@ pub struct AdmissionRequest {
95103
/// `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.
96104
/// +optional
97105
#[prost(message, optional, tag = "12")]
98-
pub options: ::core::option::Option<super::super::super::apimachinery::pkg::runtime::RawExtension>,
106+
pub options: ::core::option::Option<
107+
super::super::super::apimachinery::pkg::runtime::RawExtension,
108+
>,
99109
}
100110
/// AdmissionResponse describes an admission response.
101111
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -113,7 +123,9 @@ pub struct AdmissionResponse {
113123
/// This field IS NOT consulted in any way if "Allowed" is "true".
114124
/// +optional
115125
#[prost(message, optional, tag = "3")]
116-
pub status: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::Status>,
126+
pub status: ::core::option::Option<
127+
super::super::super::apimachinery::pkg::apis::meta::v1::Status,
128+
>,
117129
/// patch is the patch body. Currently we only support "JSONPatch" which implements RFC 6902.
118130
/// +optional
119131
#[prost(bytes = "vec", optional, tag = "4")]
@@ -128,8 +140,10 @@ pub struct AdmissionResponse {
128140
/// the admission webhook to add additional context to the audit log for this request.
129141
/// +optional
130142
#[prost(btree_map = "string, string", tag = "6")]
131-
pub audit_annotations:
132-
::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
143+
pub audit_annotations: ::prost::alloc::collections::BTreeMap<
144+
::prost::alloc::string::String,
145+
::prost::alloc::string::String,
146+
>,
133147
/// warnings is a list of warning messages to return to the requesting API client.
134148
/// Warning messages describe a problem the client making the API request should correct or be aware of.
135149
/// Limit warnings to 120 characters if possible.

0 commit comments

Comments
 (0)