commentstart lint fixes for apiserverinternal API group

This commit is contained in:
Ludo van Orden 2026-02-10 21:02:02 +01:00
parent 54241eea4d
commit 9e29a74c6f
No known key found for this signature in database
GPG key ID: 328A65F3CCF50E83
4 changed files with 21 additions and 18 deletions

View file

@ -147,7 +147,7 @@ linters:
# Commentstart - Ignore commentstart issues for existing API group
# TODO: For each existing API group, we aim to remove it over time.
- text: "godoc for field .* should start with '.* ...'"
path: "staging/src/k8s.io/api/(apiserverinternal|apps|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|imagepolicy|networking|node|policy|rbac|resource|scheduling|storage|storagemigration)"
path: "staging/src/k8s.io/api/(apps|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|imagepolicy|networking|node|policy|rbac|resource|scheduling|storage|storagemigration)"
- text: "field .* is missing godoc comment"
path: "staging/src/k8s.io/api/autoscaling/"

View file

@ -162,7 +162,7 @@ linters:
# Commentstart - Ignore commentstart issues for existing API group
# TODO: For each existing API group, we aim to remove it over time.
- text: "godoc for field .* should start with '.* ...'"
path: "staging/src/k8s.io/api/(apiserverinternal|apps|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|imagepolicy|networking|node|policy|rbac|resource|scheduling|storage|storagemigration)"
path: "staging/src/k8s.io/api/(apps|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|imagepolicy|networking|node|policy|rbac|resource|scheduling|storage|storagemigration)"
- text: "field .* is missing godoc comment"
path: "staging/src/k8s.io/api/autoscaling/"

View file

@ -23,7 +23,7 @@
# Commentstart - Ignore commentstart issues for existing API group
# TODO: For each existing API group, we aim to remove it over time.
- text: "godoc for field .* should start with '.* ...'"
path: "staging/src/k8s.io/api/(apiserverinternal|apps|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|imagepolicy|networking|node|policy|rbac|resource|scheduling|storage|storagemigration)"
path: "staging/src/k8s.io/api/(apps|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|imagepolicy|networking|node|policy|rbac|resource|scheduling|storage|storagemigration)"
- text: "field .* is missing godoc comment"
path: "staging/src/k8s.io/api/autoscaling/"

View file

@ -27,15 +27,16 @@ import (
// Storage version of a specific resource.
type StorageVersion struct {
metav1.TypeMeta `json:",inline"`
// metadata is the standard object metadata.
// The name is <group>.<resource>.
// +required
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec is an empty spec. It is here to comply with Kubernetes API style.
// spec is an empty spec. It is here to comply with Kubernetes API style.
// +optional
Spec StorageVersionSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
// API server instances report the version they can decode and the version they
// status on the version the API server instance can decode from and
// encode objects to when persisting objects in the backend.
// +optional
Status StorageVersionStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
@ -47,19 +48,20 @@ type StorageVersionSpec struct{}
// API server instances report the versions they can decode and the version they
// encode objects to when persisting objects in the backend.
type StorageVersionStatus struct {
// The reported versions per API server instance.
// storageVersions lists the reported versions per API server instance.
// +optional
// +listType=map
// +listMapKey=apiServerID
StorageVersions []ServerStorageVersion `json:"storageVersions,omitempty" protobuf:"bytes,1,opt,name=storageVersions"`
// If all API server instances agree on the same encoding storage version,
// then this field is set to that version. Otherwise this field is left empty.
// commonEncodingVersion is set to an encoding storage version if all API server
// instances share that same version. If they don't share one storage version, this
// field is left empty.
// API servers should finish updating its storageVersionStatus entry before
// serving write operations, so that this field will be in sync with the reality.
// +optional
CommonEncodingVersion *string `json:"commonEncodingVersion,omitempty" protobuf:"bytes,2,opt,name=commonEncodingVersion"`
// The latest available observations of the storageVersion's state.
// conditions lists the latest available observations of the storageVersion's state.
// +optional
// +listType=map
// +listMapKey=type
@ -69,22 +71,23 @@ type StorageVersionStatus struct {
// An API server instance reports the version it can decode and the version it
// encodes objects to when persisting objects in the backend.
type ServerStorageVersion struct {
// The ID of the reporting API server.
// apiServerID is the ID of the reporting API server.
// +required
APIServerID string `json:"apiServerID,omitempty" protobuf:"bytes,1,opt,name=apiServerID"`
// The API server encodes the object to this version when persisting it in
// encodingVersion the API server encodes the object to when persisting it in
// the backend (e.g., etcd).
// +required
EncodingVersion string `json:"encodingVersion,omitempty" protobuf:"bytes,2,opt,name=encodingVersion"`
// decodableVersions are the encoding versions the API server can handle to decode.
// The API server can decode objects encoded in these versions.
// The encodingVersion must be included in the decodableVersions.
// +listType=set
// +required
DecodableVersions []string `json:"decodableVersions,omitempty" protobuf:"bytes,3,opt,name=decodableVersions"`
// The API server can serve these versions.
// servedVersions lists all versions the API server can serve.
// DecodableVersions must include all ServedVersions.
// +listType=set
// +optional
@ -108,22 +111,22 @@ const (
// Describes the state of the storageVersion at a certain point.
type StorageVersionCondition struct {
// Type of the condition.
// type of the condition.
// +required
Type StorageVersionConditionType `json:"type" protobuf:"bytes,1,opt,name=type"`
// Status of the condition, one of True, False, Unknown.
// status of the condition, one of True, False, Unknown.
// +required
Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"`
// If set, this represents the .metadata.generation that the condition was set based upon.
// observedGeneration represents the .metadata.generation that the condition was set based upon, if field is set.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
// Last time the condition transitioned from one status to another.
// lastTransitionTime is the last time the condition transitioned from one status to another.
// +optional
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
// The reason for the condition's last transition.
// reason for the condition's last transition.
// +required
Reason string `json:"reason" protobuf:"bytes,5,opt,name=reason"`
// A human readable message indicating details about the transition.
// message is a human readable string indicating details about the transition.
// +required
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}