-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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 golint issues in pkg/apis/apps and pkg/apis/apps/validation #81569
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,6 +198,7 @@ type StatefulSetStatus struct { | |
Conditions []StatefulSetCondition | ||
} | ||
|
||
// StatefulSetConditionType describes the condition types of StatefulSets. | ||
type StatefulSetConditionType string | ||
|
||
// TODO: Add valid condition types for Statefulsets. | ||
|
@@ -262,6 +263,7 @@ type ControllerRevisionList struct { | |
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// Deployment provides declarative updates for Pods and ReplicaSets. | ||
type Deployment struct { | ||
metav1.TypeMeta | ||
// +optional | ||
|
@@ -276,6 +278,7 @@ type Deployment struct { | |
Status DeploymentStatus | ||
} | ||
|
||
// DeploymentSpec specifies the state of a Deployment. | ||
type DeploymentSpec struct { | ||
// Number of desired pods. This is a pointer to distinguish between explicit | ||
// zero and not specified. Defaults to 1. | ||
|
@@ -342,6 +345,7 @@ type DeploymentRollback struct { | |
RollbackTo RollbackConfig | ||
} | ||
|
||
// RollbackConfig specifies the state of a revision to roll back to. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move this above the DEPRECATED line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
// DEPRECATED. | ||
type RollbackConfig struct { | ||
// The revision to rollback to. If set to 0, rollback to the last revision. | ||
|
@@ -356,6 +360,8 @@ const ( | |
DefaultDeploymentUniqueLabelKey string = "pod-template-hash" | ||
) | ||
|
||
// DeploymentStrategy stores information about the strategy and rolling-update | ||
// behavior of a deployment. | ||
type DeploymentStrategy struct { | ||
// Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. | ||
// +optional | ||
|
@@ -370,6 +376,7 @@ type DeploymentStrategy struct { | |
RollingUpdate *RollingUpdateDeployment | ||
} | ||
|
||
// DeploymentStrategyType defines strategies with a deployment. | ||
type DeploymentStrategyType string | ||
|
||
const ( | ||
|
@@ -409,6 +416,7 @@ type RollingUpdateDeployment struct { | |
MaxSurge intstr.IntOrString | ||
} | ||
|
||
// DeploymentStatus holds information about the observed status of a deployment. | ||
type DeploymentStatus struct { | ||
// The generation observed by the deployment controller. | ||
// +optional | ||
|
@@ -446,6 +454,7 @@ type DeploymentStatus struct { | |
CollisionCount *int32 | ||
} | ||
|
||
// DeploymentConditionType defines conditions of a deployment. | ||
type DeploymentConditionType string | ||
|
||
// These are valid conditions of a deployment. | ||
|
@@ -481,6 +490,7 @@ type DeploymentCondition struct { | |
|
||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. keep the extra blank space There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
// DeploymentList defines multiple deployments. | ||
type DeploymentList struct { | ||
metav1.TypeMeta | ||
// +optional | ||
|
@@ -490,6 +500,7 @@ type DeploymentList struct { | |
Items []Deployment | ||
} | ||
|
||
// DaemonSetUpdateStrategy defines a strategy to update a daemon set. | ||
type DaemonSetUpdateStrategy struct { | ||
// Type of daemon set update. Can be "RollingUpdate" or "OnDelete". | ||
// Default is OnDelete. | ||
|
@@ -505,6 +516,8 @@ type DaemonSetUpdateStrategy struct { | |
RollingUpdate *RollingUpdateDaemonSet | ||
} | ||
|
||
// DaemonSetUpdateStrategyType is a strategy according to which a daemon set | ||
// gets updated. | ||
type DaemonSetUpdateStrategyType string | ||
|
||
const ( | ||
|
@@ -623,6 +636,7 @@ type DaemonSetStatus struct { | |
Conditions []DaemonSetCondition | ||
} | ||
|
||
// DaemonSetConditionType defines a daemon set condition. | ||
type DaemonSetConditionType string | ||
|
||
// TODO: Add valid condition types of a DaemonSet. | ||
|
@@ -768,6 +782,7 @@ type ReplicaSetStatus struct { | |
Conditions []ReplicaSetCondition | ||
} | ||
|
||
// ReplicaSetConditionType is a condition of a replica set. | ||
type ReplicaSetConditionType string | ||
|
||
// These are valid conditions of a replica set. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep this comment separated by a space so it doesn't show up in godoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed