@@ -30,7 +30,6 @@ import (
3030 "k8s.io/apimachinery/pkg/util/intstr"
3131 "k8s.io/apimachinery/pkg/util/wait"
3232 "k8s.io/kubectl/pkg/cmd/util/podcmd"
33- "k8s.io/utils/ptr"
3433)
3534
3635//nolint:gocognit,cyclop,funlen
@@ -273,9 +272,9 @@ func createJob(ctx context.Context, conf *conftypes.Global, actionName string) e
273272 Labels : standardLabels ,
274273 },
275274 Spec : batchv1.JobSpec {
276- ActiveDeadlineSeconds : ptr . To (int64 (24 * time .Hour .Seconds ())),
277- TTLSecondsAfterFinished : ptr . To (int32 (time .Hour .Seconds ())),
278- BackoffLimit : ptr . To (int32 (0 )),
275+ ActiveDeadlineSeconds : new (int64 (24 * time .Hour .Seconds ())),
276+ TTLSecondsAfterFinished : new (int32 (time .Hour .Seconds ())),
277+ BackoffLimit : new (int32 (0 )),
279278 Template : corev1.PodTemplateSpec {
280279 ObjectMeta : metav1.ObjectMeta {
281280 Annotations : map [string ]string {
@@ -285,7 +284,7 @@ func createJob(ctx context.Context, conf *conftypes.Global, actionName string) e
285284 },
286285 Spec : corev1.PodSpec {
287286 RestartPolicy : corev1 .RestartPolicyNever ,
288- TerminationGracePeriodSeconds : ptr . To (int64 (0 )),
287+ TerminationGracePeriodSeconds : new (int64 (0 )),
289288 Affinity : & corev1.Affinity {
290289 PodAffinity : & corev1.PodAffinity {
291290 PreferredDuringSchedulingIgnoredDuringExecution : []corev1.WeightedPodAffinityTerm {
@@ -361,12 +360,12 @@ func createJob(ctx context.Context, conf *conftypes.Global, actionName string) e
361360 Egress : []networkingv1.NetworkPolicyEgressRule {
362361 {
363362 To : []networkingv1.NetworkPolicyPeer {{
364- NamespaceSelector : ptr . To (metav1.LabelSelector {MatchLabels : map [string ]string {
363+ NamespaceSelector : new (metav1.LabelSelector {MatchLabels : map [string ]string {
365364 "kubernetes.io/metadata.name" : conf .Client .Namespace ,
366365 }}),
367366 }},
368367 Ports : []networkingv1.NetworkPolicyPort {{
369- Port : ptr . To (intstr .FromInt32 (int32 (conf .Port ))),
368+ Port : new (intstr.FromInt32 (int32 (conf .Port ))),
370369 }},
371370 },
372371 },
0 commit comments