Skip to content

Commit

Permalink
Replace deprecated pointer with ptr package
Browse files Browse the repository at this point in the history
Signed-off-by: Shelly Kagan <[email protected]>
  • Loading branch information
ShellyKa13 committed May 1, 2024
1 parent 8d869da commit b0303ec
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 236 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
k8s.io/apimachinery v0.27.1
k8s.io/client-go v12.0.0+incompatible
k8s.io/klog/v2 v2.90.1
k8s.io/utils v0.0.0-20230505201702-9f6742963106
k8s.io/utils v0.0.0-20240423183400-0849a56e8f22
kubevirt.io/api v1.0.0
kubevirt.io/client-go v1.0.0
kubevirt.io/containerized-data-importer-api v1.57.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1600,8 +1600,8 @@ k8s.io/utils v0.0.0-20200414100711-2df71ebbae66/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU=
k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20240423183400-0849a56e8f22 h1:ao5hUqGhsqdm+bYbjH/pRkCs0unBGe9UyDahzs9zQzQ=
k8s.io/utils v0.0.0-20240423183400-0849a56e8f22/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
kubevirt.io/api v1.0.0 h1:RBdXP5CDhE0v5qL2OUQdrYyRrHe/F68Z91GWqBDF6nw=
kubevirt.io/api v1.0.0/go.mod h1:CJ4vZsaWhVN3jNbyc9y3lIZhw8nUHbWjap0xHABQiqc=
kubevirt.io/client-go v1.0.0 h1:MMn41j/lFd+lJ7gWn7yuIZYW/aT9fI3bUimAuxAQ+Xk=
Expand Down
12 changes: 6 additions & 6 deletions tests/framework/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
. "github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"

apierrs "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
Expand All @@ -35,7 +35,7 @@ func PodWithPvcSpec(podName, pvcName string, cmd, args []string) *v1.Pod {
},
Spec: v1.PodSpec{
SecurityContext: &v1.PodSecurityContext{
FSGroup: pointer.Int64(uid),
FSGroup: ptr.To[int64](uid),
},
RestartPolicy: v1.RestartPolicyNever,
Containers: []v1.Container{
Expand All @@ -59,9 +59,9 @@ func PodWithPvcSpec(podName, pvcName string, cmd, args []string) *v1.Pod {
},
},
SecurityContext: &v1.SecurityContext{
RunAsNonRoot: pointer.Bool(true),
RunAsUser: pointer.Int64(uid),
RunAsGroup: pointer.Int64(uid),
RunAsNonRoot: ptr.To(true),
RunAsUser: ptr.To[int64](uid),
RunAsGroup: ptr.To[int64](uid),
Capabilities: &v1.Capabilities{
Drop: []v1.Capability{
"ALL",
Expand All @@ -70,7 +70,7 @@ func PodWithPvcSpec(podName, pvcName string, cmd, args []string) *v1.Pod {
SeccompProfile: &v1.SeccompProfile{
Type: v1.SeccompProfileTypeRuntimeDefault,
},
AllowPrivilegeEscalation: pointer.Bool(false),
AllowPrivilegeEscalation: ptr.To(false),
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions vendor/k8s.io/utils/integer/integer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b0303ec

Please sign in to comment.