• Kubernetes Submit Queue's avatar
    Merge pull request #60073 from justaugustus/int-to-int32ptr · c46738a3
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Use `pkg/util/pointer` functions instead of self-written versions
    
    **What this PR does / why we need it**:
    Replaces instances of module-written `int(32|64)? --> *int(32|64)?` functions with functions from k8s.io/kubernetes/pkg/util/pointer
    
    **Special notes for your reviewer**:
    
    Here's the grep used, based on the comments in:
    * https://github.com/kubernetes/kubernetes/pull/59924#issuecomment-366119396
    * https://github.com/kubernetes/kubernetes/issues/59971#issue-297766556
    
    ```bash
    $ git grep -E 'func\ [^ (]+\([^ ]+\ int(32|64)?\)\ \*int(32|64)?' !(vendor|staging) | grep -v pkg/util/pointer
    
    pkg/apis/apps/v1/defaults_test.go:func newInt32(val int32) *int32 {
    pkg/apis/apps/v1beta1/defaults_test.go:func newInt32(val int32) *int32 {
    pkg/apis/apps/v1beta2/defaults_test.go:func newInt32(val int32) *int32 {
    pkg/apis/autoscaling/v1/defaults_test.go:func newInt32(val int32) *int32 {
    pkg/apis/autoscaling/v2beta1/defaults_test.go:func newInt32(val int32) *int32 {
    pkg/apis/autoscaling/validation/validation_test.go:func newInt32(val int32) *int32 {
    pkg/apis/batch/v1/defaults_test.go:func newInt32(val int32) *int32 {
    pkg/apis/batch/v1beta1/defaults_test.go:func newInt32(val int32) *int32 {
    pkg/apis/core/v1/defaults_test.go:func newInt(val int32) *int32 {
    pkg/apis/core/validation/validation_test.go:func newInt32(val int) *int32 {
    pkg/apis/extensions/v1beta1/defaults_test.go:func newInt32(val int32) *int32 {
    pkg/controller/deployment/sync_test.go:func intOrStrP(val int) *intstr.IntOrString {
    pkg/kubectl/autoscale_test.go:func newInt32(value int) *int32 {
    plugin/pkg/admission/security/podsecuritypolicy/admission_test.go:func userIDPtr(i int) *int64 {
    plugin/pkg/admission/security/podsecuritypolicy/admission_test.go:func groupIDPtr(i int) *int64 {
    test/e2e/apps/deployment.go:func intOrStrP(num int) *intstr.IntOrString {
    test/e2e/auth/pod_security_policy.go:func intPtr(i int64) *int64 {
    test/integration/deployment/util.go:func intOrStrP(num int) *intstr.IntOrString {
    ```
    
    **Release note**:
    
    ```release-note
    NONE
    ```
    /kind cleanup
    /cc @php-coder 
    /assign @tallclair
    c46738a3
Name
Last commit
Last update
..
async Loading commit data...
bandwidth Loading commit data...
config Loading commit data...
configz Loading commit data...
conntrack Loading commit data...
dbus Loading commit data...
ebtables Loading commit data...
env Loading commit data...
file Loading commit data...
filesystem Loading commit data...
flag Loading commit data...
flock Loading commit data...
goroutinemap Loading commit data...
hash Loading commit data...
initsystem Loading commit data...
interrupt Loading commit data...
io Loading commit data...
ipconfig Loading commit data...
ipset Loading commit data...
iptables Loading commit data...
ipvs Loading commit data...
keymutex Loading commit data...
labels Loading commit data...
limitwriter Loading commit data...
maps Loading commit data...
metrics Loading commit data...
mount Loading commit data...
net Loading commit data...
netsh Loading commit data...
node Loading commit data...
normalizer Loading commit data...
nsenter Loading commit data...
oom Loading commit data...
parsers Loading commit data...
pointer Loading commit data...
procfs Loading commit data...
reflector/prometheus Loading commit data...
removeall Loading commit data...
resizefs Loading commit data...
resourcecontainer Loading commit data...
rlimit Loading commit data...
selinux Loading commit data...
slice Loading commit data...
strings Loading commit data...
sysctl Loading commit data...
system Loading commit data...
tail Loading commit data...
taints Loading commit data...
template Loading commit data...
term Loading commit data...
threading Loading commit data...
tolerations Loading commit data...
version Loading commit data...
workqueue/prometheus Loading commit data...
BUILD Loading commit data...
verify-util-pkg.sh Loading commit data...