Use ptr.To to retrieve intstr addresses

This uses the generic ptr.To in k8s.io/utils to replace functions and
code constructs which only serve to return pointers to intstr
values. Other uses of the deprecated pointer package are updated in
modified files.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
This commit is contained in:
Stephen Kitt
2023-08-17 12:12:12 +02:00
parent 9068bec08e
commit aa89e6dc97
85 changed files with 499 additions and 641 deletions

View File

@@ -59,11 +59,11 @@ func currentDeployment(pds *int32, replicas, statusReplicas, updatedReplicas, av
}
// helper to create RS with given availableReplicas
func newRSWithAvailable(name string, specReplicas, statusReplicas, availableReplicas int) *apps.ReplicaSet {
func newRSWithAvailable(name string, specReplicas, statusReplicas, availableReplicas int32) *apps.ReplicaSet {
rs := rs(name, specReplicas, nil, metav1.Time{})
rs.Status = apps.ReplicaSetStatus{
Replicas: int32(statusReplicas),
AvailableReplicas: int32(availableReplicas),
Replicas: statusReplicas,
AvailableReplicas: availableReplicas,
}
return rs
}