Skip to content

Commit

Permalink
Merge pull request #115837 from wedaly/kubectl-netadmin-pointer-bool
Browse files Browse the repository at this point in the history
kubectl: use pointer.Bool instead of deprecated pointer.BoolPtr
  • Loading branch information
k8s-ci-robot committed Feb 16, 2023
2 parents 5c09c9d + 4101b79 commit 4c4f0c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions staging/src/k8s.io/kubectl/pkg/cmd/debug/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func useHostNamespaces(p *corev1.Pod) {
// shareProcessNamespace configures all containers in the pod to share the
// process namespace.
func shareProcessNamespace(p *corev1.Pod) {
p.Spec.ShareProcessNamespace = pointer.BoolPtr(true)
p.Spec.ShareProcessNamespace = pointer.Bool(true)
}

// clearSecurityContext clears the security context for the container.
Expand All @@ -275,7 +275,7 @@ func setPrivileged(p *corev1.Pod, containerName string) {
if c.SecurityContext == nil {
c.SecurityContext = &corev1.SecurityContext{}
}
c.SecurityContext.Privileged = pointer.BoolPtr(true)
c.SecurityContext.Privileged = pointer.Bool(true)
return false
})
}
Expand All @@ -287,7 +287,7 @@ func disallowRoot(p *corev1.Pod, containerName string) {
return true
}
c.SecurityContext = &corev1.SecurityContext{
RunAsNonRoot: pointer.BoolPtr(true),
RunAsNonRoot: pointer.Bool(true),
}
return false
})
Expand Down

0 comments on commit 4c4f0c3

Please sign in to comment.