Skip to content

Commit

Permalink
Merge pull request kubernetes#1556 from pkbhowmick/replace-func
Browse files Browse the repository at this point in the history
Replace deprecated functions
  • Loading branch information
k8s-ci-robot committed Aug 24, 2021
2 parents ac1cd47 + e233382 commit a465b97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/store/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) []
return &metric.Family{}
}

maxUnavailable, err := intstr.GetValueFromIntOrPercent(d.Spec.Strategy.RollingUpdate.MaxUnavailable, int(*d.Spec.Replicas), false)
maxUnavailable, err := intstr.GetScaledValueFromIntOrPercent(d.Spec.Strategy.RollingUpdate.MaxUnavailable, int(*d.Spec.Replicas), false)
if err != nil {
panic(err)
}
Expand All @@ -239,7 +239,7 @@ func deploymentMetricFamilies(allowAnnotationsList, allowLabelsList []string) []
return &metric.Family{}
}

maxSurge, err := intstr.GetValueFromIntOrPercent(d.Spec.Strategy.RollingUpdate.MaxSurge, int(*d.Spec.Replicas), true)
maxSurge, err := intstr.GetScaledValueFromIntOrPercent(d.Spec.Strategy.RollingUpdate.MaxSurge, int(*d.Spec.Replicas), true)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit a465b97

Please sign in to comment.