Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix names for APIGroup, APIVersion, CSI*, *CIDR #54

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,19 @@ names:
# Retain original names (prost doesn't let you bypass its renaming)
rg 'ApiService' k8s-pb -l | xargs sd 'ApiService' 'APIService'
rg 'ApiResource' k8s-pb -l | xargs sd 'ApiResource' 'APIResource'
rg 'ApiGroup' k8s-pb -l | xargs sd 'ApiGroup' 'APIGroup'
rg 'ApiVersion' k8s-pb -l | xargs sd 'ApiVersion' 'APIVersion'
rg 'ApiSubresource' k8s-pb -l | xargs sd 'ApiSubresource' 'APISubresource'
rg 'DownwardApi' k8s-pb -l | xargs sd 'DownwardApi' 'DownwardAPI'
rg 'CsiDriver' k8s-pb -l | xargs sd 'CsiDriver' 'CSIDriver'
rg 'CsiPersistent' k8s-pb -l | xargs sd 'CsiPersistent' 'CSIPersistent'
rg 'CsiVolume' k8s-pb -l | xargs sd 'CsiVolume' 'CSIVolume'
rg 'CsiStorage' k8s-pb -l | xargs sd 'CsiStorage' 'CSIStorage'
rg 'CsiNode' k8s-pb -l | xargs sd 'CsiNode' 'CSINode'
rg 'IpAddress' k8s-pb -l | xargs sd 'IpAddress' 'IPAddress'
rg 'ServiceCidr' k8s-pb -l | xargs sd 'ServiceCidr' 'ServiceCIDR'
rg 'ClusterCidr' k8s-pb -l | xargs sd 'ClusterCidr' 'ClusterCIDR'
rg 'ClientCidr' k8s-pb -l | xargs sd 'ClientCidr' 'ClientCIDR'
rg 'cluster_i_ps' k8s-pb -l | xargs sd 'cluster_i_ps' 'cluster_ips'
rg 'external_i_ps' k8s-pb -l | xargs sd 'external_i_ps' 'external_ips'
rg 'pod_i_ps' k8s-pb -l | xargs sd 'pod_i_ps' 'pod_ips'
Expand Down
14 changes: 7 additions & 7 deletions k8s-pb/src/api/apidiscovery/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version.
/// Versions are in descending order of preference, with the first version being the preferred entry.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiGroupDiscovery {
pub struct APIGroupDiscovery {
/// Standard object's metadata.
/// The only field completed will be name. For instance, resourceVersion will be empty.
/// name is the name of the API group whose discovery information is presented here.
Expand All @@ -17,22 +17,22 @@ pub struct ApiGroupDiscovery {
/// +listType=map
/// +listMapKey=version
#[prost(message, repeated, tag = "2")]
pub versions: ::prost::alloc::vec::Vec<ApiVersionDiscovery>,
pub versions: ::prost::alloc::vec::Vec<APIVersionDiscovery>,
}
/// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery.
/// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated
/// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers)
/// that a cluster supports.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiGroupDiscoveryList {
pub struct APIGroupDiscoveryList {
/// ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers.
/// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
/// +optional
#[prost(message, optional, tag = "1")]
pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
/// items is the list of groups for discovery. The groups are listed in priority order.
#[prost(message, repeated, tag = "2")]
pub items: ::prost::alloc::vec::Vec<ApiGroupDiscovery>,
pub items: ::prost::alloc::vec::Vec<APIGroupDiscovery>,
}
/// APIResourceDiscovery provides information about an API resource for discovery.
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -77,11 +77,11 @@ pub struct APIResourceDiscovery {
/// +listType=map
/// +listMapKey=subresource
#[prost(message, repeated, tag = "8")]
pub subresources: ::prost::alloc::vec::Vec<ApiSubresourceDiscovery>,
pub subresources: ::prost::alloc::vec::Vec<APISubresourceDiscovery>,
}
/// APISubresourceDiscovery provides information about an API subresource for discovery.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiSubresourceDiscovery {
pub struct APISubresourceDiscovery {
/// subresource is the name of the subresource. This is used in the URL path and is the unique identifier
/// for this resource across all versions.
#[prost(string, optional, tag = "1")]
Expand Down Expand Up @@ -114,7 +114,7 @@ pub struct ApiSubresourceDiscovery {
}
/// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiVersionDiscovery {
pub struct APIVersionDiscovery {
/// version is the name of the version within a group version.
#[prost(string, optional, tag = "1")]
pub version: ::core::option::Option<::prost::alloc::string::String>,
Expand Down
14 changes: 7 additions & 7 deletions k8s-pb/src/api/apidiscovery/v2beta1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// It contains a list of APIVersionDiscovery that holds a list of APIResourceDiscovery types served for a version.
/// Versions are in descending order of preference, with the first version being the preferred entry.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiGroupDiscovery {
pub struct APIGroupDiscovery {
/// Standard object's metadata.
/// The only field completed will be name. For instance, resourceVersion will be empty.
/// name is the name of the API group whose discovery information is presented here.
Expand All @@ -17,22 +17,22 @@ pub struct ApiGroupDiscovery {
/// +listType=map
/// +listMapKey=version
#[prost(message, repeated, tag = "2")]
pub versions: ::prost::alloc::vec::Vec<ApiVersionDiscovery>,
pub versions: ::prost::alloc::vec::Vec<APIVersionDiscovery>,
}
/// APIGroupDiscoveryList is a resource containing a list of APIGroupDiscovery.
/// This is one of the types able to be returned from the /api and /apis endpoint and contains an aggregated
/// list of API resources (built-ins, Custom Resource Definitions, resources from aggregated servers)
/// that a cluster supports.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiGroupDiscoveryList {
pub struct APIGroupDiscoveryList {
/// ResourceVersion will not be set, because this does not have a replayable ordering among multiple apiservers.
/// More info: <https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata>
/// +optional
#[prost(message, optional, tag = "1")]
pub metadata: ::core::option::Option<super::super::super::apimachinery::pkg::apis::meta::v1::ListMeta>,
/// items is the list of groups for discovery. The groups are listed in priority order.
#[prost(message, repeated, tag = "2")]
pub items: ::prost::alloc::vec::Vec<ApiGroupDiscovery>,
pub items: ::prost::alloc::vec::Vec<APIGroupDiscovery>,
}
/// APIResourceDiscovery provides information about an API resource for discovery.
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -77,11 +77,11 @@ pub struct APIResourceDiscovery {
/// +listType=map
/// +listMapKey=subresource
#[prost(message, repeated, tag = "8")]
pub subresources: ::prost::alloc::vec::Vec<ApiSubresourceDiscovery>,
pub subresources: ::prost::alloc::vec::Vec<APISubresourceDiscovery>,
}
/// APISubresourceDiscovery provides information about an API subresource for discovery.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiSubresourceDiscovery {
pub struct APISubresourceDiscovery {
/// subresource is the name of the subresource. This is used in the URL path and is the unique identifier
/// for this resource across all versions.
#[prost(string, optional, tag = "1")]
Expand Down Expand Up @@ -114,7 +114,7 @@ pub struct ApiSubresourceDiscovery {
}
/// APIVersionDiscovery holds a list of APIResourceDiscovery types that are served for a particular version within an API Group.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiVersionDiscovery {
pub struct APIVersionDiscovery {
/// version is the name of the version within a group version.
#[prost(string, optional, tag = "1")]
pub version: ::core::option::Option<::prost::alloc::string::String>,
Expand Down
22 changes: 11 additions & 11 deletions k8s-pb/src/api/core/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub struct Binding {
}
/// Represents storage that is managed by an external CSI volume driver (Beta feature)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CsiPersistentVolumeSource {
pub struct CSIPersistentVolumeSource {
/// driver is the name of the driver to use for this volume.
/// Required.
#[prost(string, optional, tag = "1")]
Expand Down Expand Up @@ -240,7 +240,7 @@ pub struct CsiPersistentVolumeSource {
}
/// Represents a source location of a volume to mount, managed by an external CSI driver
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CsiVolumeSource {
pub struct CSIVolumeSource {
/// driver is the name of the CSI driver that handles this volume.
/// Consult with your admin for the correct name as registered in the cluster.
#[prost(string, optional, tag = "1")]
Expand Down Expand Up @@ -1140,16 +1140,16 @@ pub struct DaemonEndpoint {
/// Note that this is identical to a downwardAPI volume source without the default
/// mode.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownwardApiProjection {
pub struct DownwardAPIProjection {
/// Items is a list of DownwardAPIVolume file
/// +optional
/// +listType=atomic
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<DownwardApiVolumeFile>,
pub items: ::prost::alloc::vec::Vec<DownwardAPIVolumeFile>,
}
/// DownwardAPIVolumeFile represents information to create the file containing the pod field
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownwardApiVolumeFile {
pub struct DownwardAPIVolumeFile {
/// Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
#[prost(string, optional, tag = "1")]
pub path: ::core::option::Option<::prost::alloc::string::String>,
Expand All @@ -1175,12 +1175,12 @@ pub struct DownwardApiVolumeFile {
/// DownwardAPIVolumeSource represents a volume containing downward API info.
/// Downward API volumes support ownership management and SELinux relabeling.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DownwardApiVolumeSource {
pub struct DownwardAPIVolumeSource {
/// Items is a list of downward API volume file
/// +optional
/// +listType=atomic
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<DownwardApiVolumeFile>,
pub items: ::prost::alloc::vec::Vec<DownwardAPIVolumeFile>,
/// Optional: mode bits to use on created files by default. Must be a
/// Optional: mode bits used to set permissions on created files by default.
/// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
Expand Down Expand Up @@ -3520,7 +3520,7 @@ pub struct PersistentVolumeSource {
/// csi represents storage that is handled by an external CSI driver (Beta feature).
/// +optional
#[prost(message, optional, tag = "22")]
pub csi: ::core::option::Option<CsiPersistentVolumeSource>,
pub csi: ::core::option::Option<CSIPersistentVolumeSource>,
}
/// PersistentVolumeSpec is the specification of a persistent volume.
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -6750,7 +6750,7 @@ pub struct VolumeProjection {
/// downwardAPI information about the downwardAPI data to project
/// +optional
#[prost(message, optional, tag = "2")]
pub downward_api: ::core::option::Option<DownwardApiProjection>,
pub downward_api: ::core::option::Option<DownwardAPIProjection>,
/// configMap information about the configMap data to project
/// +optional
#[prost(message, optional, tag = "3")]
Expand Down Expand Up @@ -6892,7 +6892,7 @@ pub struct VolumeSource {
/// downwardAPI represents downward API about the pod that should populate this volume
/// +optional
#[prost(message, optional, tag = "16")]
pub downward_api: ::core::option::Option<DownwardApiVolumeSource>,
pub downward_api: ::core::option::Option<DownwardAPIVolumeSource>,
/// fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
/// +optional
#[prost(message, optional, tag = "17")]
Expand Down Expand Up @@ -6938,7 +6938,7 @@ pub struct VolumeSource {
/// csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
/// +optional
#[prost(message, optional, tag = "28")]
pub csi: ::core::option::Option<CsiVolumeSource>,
pub csi: ::core::option::Option<CSIVolumeSource>,
/// ephemeral represents a volume that is handled by a cluster storage driver.
/// The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,
/// and deleted when the pod is removed.
Expand Down
14 changes: 7 additions & 7 deletions k8s-pb/src/apimachinery/pkg/apis/meta/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// APIGroup contains the name, the supported versions, and the preferred version
/// of a group.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiGroup {
pub struct APIGroup {
/// name is the name of the group.
#[prost(string, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
Expand All @@ -25,16 +25,16 @@ pub struct ApiGroup {
/// +optional
/// +listType=atomic
#[prost(message, repeated, tag = "4")]
pub server_address_by_client_cid_rs: ::prost::alloc::vec::Vec<ServerAddressByClientCidr>,
pub server_address_by_client_cid_rs: ::prost::alloc::vec::Vec<ServerAddressByClientCIDR>,
}
/// APIGroupList is a list of APIGroup, to allow clients to discover the API at
/// /apis.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiGroupList {
pub struct APIGroupList {
/// groups is a list of APIGroup.
/// +listType=atomic
#[prost(message, repeated, tag = "1")]
pub groups: ::prost::alloc::vec::Vec<ApiGroup>,
pub groups: ::prost::alloc::vec::Vec<APIGroup>,
}
/// APIResource specifies the name of a resource and whether it is namespaced.
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -103,7 +103,7 @@ pub struct APIResourceList {
/// +protobuf.options.(gogoproto.goproto_stringer)=false
/// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiVersions {
pub struct APIVersions {
/// versions are the api versions that are available.
/// +listType=atomic
#[prost(string, repeated, tag = "1")]
Expand All @@ -117,7 +117,7 @@ pub struct ApiVersions {
/// Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
/// +listType=atomic
#[prost(message, repeated, tag = "2")]
pub server_address_by_client_cid_rs: ::prost::alloc::vec::Vec<ServerAddressByClientCidr>,
pub server_address_by_client_cid_rs: ::prost::alloc::vec::Vec<ServerAddressByClientCIDR>,
}
/// ApplyOptions may be provided when applying an API object.
/// FieldManager is required for apply requests.
Expand Down Expand Up @@ -993,7 +993,7 @@ pub struct RootPaths {
}
/// ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerAddressByClientCidr {
pub struct ServerAddressByClientCIDR {
/// The CIDR with which clients can match their IP to figure out the server address that they should use.
#[prost(string, optional, tag = "1")]
pub client_cidr: ::core::option::Option<::prost::alloc::string::String>,
Expand Down