Merge pull request #95502 from suramrit/lintCorrection

Fix golint errors by adding definition comments for pkg/apis/apiserverinternal
This commit is contained in:
Kubernetes Prow Robot 2020-10-20 12:56:33 -07:00 committed by GitHub
commit a8a779133a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View File

@ -7,7 +7,6 @@ pkg/apis/abac/v1beta1
pkg/apis/admission pkg/apis/admission
pkg/apis/admissionregistration/v1 pkg/apis/admissionregistration/v1
pkg/apis/admissionregistration/v1beta1 pkg/apis/admissionregistration/v1beta1
pkg/apis/apiserverinternal
pkg/apis/apps/v1 pkg/apis/apps/v1
pkg/apis/apps/v1beta1 pkg/apis/apps/v1beta1
pkg/apis/apps/v1beta2 pkg/apis/apps/v1beta2

View File

@ -22,7 +22,7 @@ import (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// Storage version of a specific resource. // StorageVersion of a specific resource.
type StorageVersion struct { type StorageVersion struct {
metav1.TypeMeta metav1.TypeMeta
// The name is <group>.<resource>. // The name is <group>.<resource>.
@ -39,7 +39,7 @@ type StorageVersion struct {
// StorageVersionSpec is an empty spec. // StorageVersionSpec is an empty spec.
type StorageVersionSpec struct{} type StorageVersionSpec struct{}
// API server instances report the versions they can decode and the version they // StorageVersionStatus API server instances report the versions they can decode and the version they
// encode objects to when persisting objects in the backend. // encode objects to when persisting objects in the backend.
type StorageVersionStatus struct { type StorageVersionStatus struct {
// The reported versions per API server instance. // The reported versions per API server instance.
@ -57,7 +57,7 @@ type StorageVersionStatus struct {
Conditions []StorageVersionCondition Conditions []StorageVersionCondition
} }
// An API server instance reports the version it can decode and the version it // ServerStorageVersion An API server instance reports the version it can decode and the version it
// encodes objects to when persisting objects in the backend. // encodes objects to when persisting objects in the backend.
type ServerStorageVersion struct { type ServerStorageVersion struct {
// The ID of the reporting API server. // The ID of the reporting API server.
@ -72,22 +72,27 @@ type ServerStorageVersion struct {
DecodableVersions []string DecodableVersions []string
} }
// StorageVersionConditionType Indicates the storage version condition type
type StorageVersionConditionType string type StorageVersionConditionType string
const ( const (
// Indicates that encoding storage versions reported by all servers are equal. //AllEncodingVersionsEqual Indicates that encoding storage versions reported by all servers are equal.
AllEncodingVersionsEqual StorageVersionConditionType = "AllEncodingVersionsEqual" AllEncodingVersionsEqual StorageVersionConditionType = "AllEncodingVersionsEqual"
) )
// ConditionStatus indicates status of condition from "True", "False", or "Unknown"
type ConditionStatus string type ConditionStatus string
const ( const (
// ConditionTrue indicates condition as "True"
ConditionTrue ConditionStatus = "True" ConditionTrue ConditionStatus = "True"
// ConditionFalse indicates condition as "False"
ConditionFalse ConditionStatus = "False" ConditionFalse ConditionStatus = "False"
// ConditionUnknown indicates condition as "Unknown"
ConditionUnknown ConditionStatus = "Unknown" ConditionUnknown ConditionStatus = "Unknown"
) )
// Describes the state of the storageVersion at a certain point. // StorageVersionCondition Describes the state of the storageVersion at a certain point.
type StorageVersionCondition struct { type StorageVersionCondition struct {
// Type of the condition. // Type of the condition.
// +optional // +optional
@ -111,7 +116,7 @@ type StorageVersionCondition struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// A list of StorageVersions. // StorageVersionList A list of StorageVersions.
type StorageVersionList struct { type StorageVersionList struct {
metav1.TypeMeta metav1.TypeMeta
// +optional // +optional