Skip to content

Commit

Permalink
align more names matching same conventions
Browse files Browse the repository at this point in the history
quick rg for Csi, Api and Cidr revelaed these

Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Oct 14, 2024
1 parent b006bda commit 757a4e6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 23 deletions.
7 changes: 6 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,18 @@ names:
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 'ApiVersions' k8s-pb -l | xargs sd 'ApiVersions' 'APIVersions'
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
8 changes: 4 additions & 4 deletions k8s-pb/src/api/apidiscovery/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ 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
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
8 changes: 4 additions & 4 deletions k8s-pb/src/api/apidiscovery/v2beta1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ 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
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
6 changes: 3 additions & 3 deletions k8s-pb/src/apimachinery/pkg/apis/meta/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ 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.
Expand Down Expand Up @@ -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

0 comments on commit 757a4e6

Please sign in to comment.