mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
remove deplicate func
This commit is contained in:
parent
8504591def
commit
ff380d67f4
@ -124,18 +124,6 @@ func GetDeploymentCondition(status extensions.DeploymentStatus, condType extensi
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove the duplicate
|
|
||||||
// GetDeploymentConditionInternal returns the condition with the provided type.
|
|
||||||
func GetDeploymentConditionInternal(status internalextensions.DeploymentStatus, condType internalextensions.DeploymentConditionType) *internalextensions.DeploymentCondition {
|
|
||||||
for i := range status.Conditions {
|
|
||||||
c := status.Conditions[i]
|
|
||||||
if c.Type == condType {
|
|
||||||
return &c
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetDeploymentCondition updates the deployment to include the provided condition. If the condition that
|
// SetDeploymentCondition updates the deployment to include the provided condition. If the condition that
|
||||||
// we are about to add already exists and has the same status and reason then we are not going to update.
|
// we are about to add already exists and has the same status and reason then we are not going to update.
|
||||||
func SetDeploymentCondition(status *extensions.DeploymentStatus, condition extensions.DeploymentCondition) {
|
func SetDeploymentCondition(status *extensions.DeploymentStatus, condition extensions.DeploymentCondition) {
|
||||||
|
Loading…
Reference in New Issue
Block a user