mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	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:
		
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							| @@ -126,7 +126,7 @@ require ( | ||||
| 	k8s.io/pod-security-admission v0.0.0 | ||||
| 	k8s.io/sample-apiserver v0.0.0 | ||||
| 	k8s.io/system-validators v1.8.0 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 | ||||
| 	sigs.k8s.io/yaml v1.3.0 | ||||
| ) | ||||
|   | ||||
							
								
								
									
										4
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								go.sum
									
									
									
									
									
								
							| @@ -1428,8 +1428,8 @@ k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4Va | ||||
| k8s.io/system-validators v1.8.0 h1:tq05tdO9zdJZnNF3SXrq6LE7Knc/KfJm5wk68467JDg= | ||||
| k8s.io/system-validators v1.8.0/go.mod h1:gP1Ky+R9wtrSiFbrpEPwWMeYz9yqyy1S/KOh0Vci7WI= | ||||
| k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= | ||||
| rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||||
| rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||||
|   | ||||
| @@ -22,7 +22,7 @@ import ( | ||||
| 	"k8s.io/apimachinery/pkg/util/intstr" | ||||
| 	utilfeature "k8s.io/apiserver/pkg/util/feature" | ||||
| 	"k8s.io/kubernetes/pkg/features" | ||||
| 	"k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| func addDefaultingFuncs(scheme *runtime.Scheme) error { | ||||
| @@ -84,13 +84,11 @@ func SetDefaults_DaemonSet(obj *appsv1.DaemonSet) { | ||||
| 		} | ||||
| 		if updateStrategy.RollingUpdate.MaxUnavailable == nil { | ||||
| 			// Set default MaxUnavailable as 1 by default. | ||||
| 			maxUnavailable := intstr.FromInt32(1) | ||||
| 			updateStrategy.RollingUpdate.MaxUnavailable = &maxUnavailable | ||||
| 			updateStrategy.RollingUpdate.MaxUnavailable = ptr.To(intstr.FromInt32(1)) | ||||
| 		} | ||||
| 		if updateStrategy.RollingUpdate.MaxSurge == nil { | ||||
| 			// Set default MaxSurge as 0 by default. | ||||
| 			maxSurge := intstr.FromInt32(0) | ||||
| 			updateStrategy.RollingUpdate.MaxSurge = &maxSurge | ||||
| 			updateStrategy.RollingUpdate.MaxSurge = ptr.To(intstr.FromInt32(0)) | ||||
| 		} | ||||
| 	} | ||||
| 	if obj.Spec.RevisionHistoryLimit == nil { | ||||
| @@ -117,12 +115,11 @@ func SetDefaults_StatefulSet(obj *appsv1.StatefulSet) { | ||||
| 		obj.Spec.UpdateStrategy.RollingUpdate != nil { | ||||
|  | ||||
| 		if obj.Spec.UpdateStrategy.RollingUpdate.Partition == nil { | ||||
| 			obj.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32(0) | ||||
| 			obj.Spec.UpdateStrategy.RollingUpdate.Partition = ptr.To[int32](0) | ||||
| 		} | ||||
| 		if utilfeature.DefaultFeatureGate.Enabled(features.MaxUnavailableStatefulSet) { | ||||
| 			if obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable == nil { | ||||
| 				maxUnavailable := intstr.FromInt32(1) | ||||
| 				obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable = &maxUnavailable | ||||
| 				obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable = ptr.To(intstr.FromInt32(1)) | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
| @@ -34,7 +34,7 @@ import ( | ||||
| 	. "k8s.io/kubernetes/pkg/apis/apps/v1" | ||||
| 	_ "k8s.io/kubernetes/pkg/apis/core/install" | ||||
| 	"k8s.io/kubernetes/pkg/features" | ||||
| 	utilpointer "k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| @@ -86,7 +86,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 							MaxSurge:       &maxSurge, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -99,7 +99,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 				}, | ||||
| 				Spec: appsv1.DaemonSetSpec{ | ||||
| 					Template:             defaultTemplate, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(1), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](1), | ||||
| 				}, | ||||
| 			}, | ||||
| 			expected: &appsv1.DaemonSet{ | ||||
| @@ -117,7 +117,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 							MaxSurge:       &maxSurge, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(1), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](1), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -136,7 +136,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1.DaemonSetUpdateStrategy{ | ||||
| 						Type: appsv1.OnDeleteDaemonSetStrategyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -154,7 +154,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 							MaxSurge:       &maxSurge, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -175,15 +175,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func getMaxUnavailable(maxUnavailable int) *intstr.IntOrString { | ||||
| 	maxUnavailableIntOrStr := intstr.FromInt32(int32(maxUnavailable)) | ||||
| 	return &maxUnavailableIntOrStr | ||||
| } | ||||
|  | ||||
| func getPartition(partition int32) *int32 { | ||||
| 	return &partition | ||||
| } | ||||
|  | ||||
| func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 	defaultLabels := map[string]string{"foo": "bar"} | ||||
| 	var defaultPartition int32 = 0 | ||||
| @@ -233,7 +224,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 							Partition: &defaultPartition, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -259,7 +250,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1.OnDeleteStatefulSetStrategyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -286,7 +277,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 							Partition: &defaultPartition, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -317,7 +308,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 							Partition: ¬TheDefaultPartition, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -346,7 +337,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 						WhenDeleted: appsv1.RetainPersistentVolumeClaimRetentionPolicyType, | ||||
| 						WhenScaled:  appsv1.RetainPersistentVolumeClaimRetentionPolicyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enablePVCDeletionPolicy: true, | ||||
| @@ -379,7 +370,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 						WhenDeleted: appsv1.RetainPersistentVolumeClaimRetentionPolicyType, | ||||
| 						WhenScaled:  appsv1.DeletePersistentVolumeClaimRetentionPolicyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enablePVCDeletionPolicy: true, | ||||
| @@ -412,7 +403,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 						WhenDeleted: appsv1.DeletePersistentVolumeClaimRetentionPolicyType, | ||||
| 						WhenScaled:  appsv1.RetainPersistentVolumeClaimRetentionPolicyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enablePVCDeletionPolicy: true, | ||||
| @@ -444,7 +435,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					PersistentVolumeClaimRetentionPolicy: &appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy{ | ||||
| 						WhenScaled: appsv1.DeletePersistentVolumeClaimRetentionPolicyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enablePVCDeletionPolicy: false, | ||||
| @@ -467,10 +458,10 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition: getPartition(0), | ||||
| 							Partition: ptr.To[int32](0), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enableMaxUnavailablePolicy: false, | ||||
| @@ -483,7 +474,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ | ||||
| 						RollingUpdate: &appsv1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      &defaultPartition, | ||||
| 							MaxUnavailable: getMaxUnavailable(1), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(1)), | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| @@ -499,11 +490,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(0), | ||||
| 							MaxUnavailable: getMaxUnavailable(1), | ||||
| 							Partition:      ptr.To[int32](0), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(1)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enableMaxUnavailablePolicy: false, | ||||
| @@ -516,7 +507,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ | ||||
| 						RollingUpdate: &appsv1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      ¬TheDefaultPartition, | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| @@ -532,11 +523,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(42), | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							Partition:      ptr.To[int32](42), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enableMaxUnavailablePolicy: false, | ||||
| @@ -559,11 +550,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(0), | ||||
| 							MaxUnavailable: getMaxUnavailable(1), | ||||
| 							Partition:      ptr.To[int32](0), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(1)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enableMaxUnavailablePolicy: true, | ||||
| @@ -576,7 +567,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ | ||||
| 						RollingUpdate: &appsv1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      ¬TheDefaultPartition, | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| @@ -592,11 +583,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(42), | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							Partition:      ptr.To[int32](42), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enableMaxUnavailablePolicy: true, | ||||
| @@ -643,7 +634,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 			original: &appsv1.Deployment{}, | ||||
| 			expected: &appsv1.Deployment{ | ||||
| 				Spec: appsv1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(1), | ||||
| 					Replicas: ptr.To[int32](1), | ||||
| 					Strategy: appsv1.DeploymentStrategy{ | ||||
| 						Type: appsv1.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: &appsv1.RollingUpdateDeployment{ | ||||
| @@ -651,8 +642,8 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 							MaxUnavailable: &defaultIntOrString, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(10), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](10), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -660,7 +651,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1.Deployment{ | ||||
| 				Spec: appsv1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1.DeploymentStrategy{ | ||||
| 						RollingUpdate: &appsv1.RollingUpdateDeployment{ | ||||
| 							MaxSurge: &differentIntOrString, | ||||
| @@ -670,7 +661,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 			}, | ||||
| 			expected: &appsv1.Deployment{ | ||||
| 				Spec: appsv1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1.DeploymentStrategy{ | ||||
| 						Type: appsv1.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: &appsv1.RollingUpdateDeployment{ | ||||
| @@ -678,8 +669,8 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 							MaxUnavailable: &defaultIntOrString, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(10), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](10), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -687,7 +678,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1.Deployment{ | ||||
| 				Spec: appsv1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(3), | ||||
| 					Replicas: ptr.To[int32](3), | ||||
| 					Strategy: appsv1.DeploymentStrategy{ | ||||
| 						Type:          appsv1.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: nil, | ||||
| @@ -696,7 +687,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 			}, | ||||
| 			expected: &appsv1.Deployment{ | ||||
| 				Spec: appsv1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(3), | ||||
| 					Replicas: ptr.To[int32](3), | ||||
| 					Strategy: appsv1.DeploymentStrategy{ | ||||
| 						Type: appsv1.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: &appsv1.RollingUpdateDeployment{ | ||||
| @@ -704,8 +695,8 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 							MaxUnavailable: &defaultIntOrString, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(10), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](10), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -713,21 +704,21 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1.Deployment{ | ||||
| 				Spec: appsv1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1.DeploymentStrategy{ | ||||
| 						Type: appsv1.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(0), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](0), | ||||
| 				}, | ||||
| 			}, | ||||
| 			expected: &appsv1.Deployment{ | ||||
| 				Spec: appsv1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1.DeploymentStrategy{ | ||||
| 						Type: appsv1.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(0), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](0), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -735,22 +726,22 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1.Deployment{ | ||||
| 				Spec: appsv1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1.DeploymentStrategy{ | ||||
| 						Type: appsv1.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(30), | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(2), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](30), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](2), | ||||
| 				}, | ||||
| 			}, | ||||
| 			expected: &appsv1.Deployment{ | ||||
| 				Spec: appsv1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1.DeploymentStrategy{ | ||||
| 						Type: appsv1.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(30), | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(2), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](30), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](2), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -807,7 +798,7 @@ func TestSetDefaultReplicaSetReplicas(t *testing.T) { | ||||
| 		{ | ||||
| 			rs: appsv1.ReplicaSet{ | ||||
| 				Spec: appsv1.ReplicaSetSpec{ | ||||
| 					Replicas: utilpointer.Int32(0), | ||||
| 					Replicas: ptr.To[int32](0), | ||||
| 					Template: v1.PodTemplateSpec{ | ||||
| 						ObjectMeta: metav1.ObjectMeta{ | ||||
| 							Labels: map[string]string{ | ||||
| @@ -822,7 +813,7 @@ func TestSetDefaultReplicaSetReplicas(t *testing.T) { | ||||
| 		{ | ||||
| 			rs: appsv1.ReplicaSet{ | ||||
| 				Spec: appsv1.ReplicaSetSpec{ | ||||
| 					Replicas: utilpointer.Int32(3), | ||||
| 					Replicas: ptr.To[int32](3), | ||||
| 					Template: v1.PodTemplateSpec{ | ||||
| 						ObjectMeta: metav1.ObjectMeta{ | ||||
| 							Labels: map[string]string{ | ||||
| @@ -865,7 +856,7 @@ func TestDefaultRequestIsNotSetForReplicaSet(t *testing.T) { | ||||
| 	} | ||||
| 	rs := &appsv1.ReplicaSet{ | ||||
| 		Spec: appsv1.ReplicaSetSpec{ | ||||
| 			Replicas: utilpointer.Int32(3), | ||||
| 			Replicas: ptr.To[int32](3), | ||||
| 			Template: v1.PodTemplateSpec{ | ||||
| 				ObjectMeta: metav1.ObjectMeta{ | ||||
| 					Labels: map[string]string{ | ||||
|   | ||||
| @@ -23,7 +23,7 @@ import ( | ||||
| 	"k8s.io/apimachinery/pkg/util/intstr" | ||||
| 	utilfeature "k8s.io/apiserver/pkg/util/feature" | ||||
| 	"k8s.io/kubernetes/pkg/features" | ||||
| 	"k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| func addDefaultingFuncs(scheme *runtime.Scheme) error { | ||||
| @@ -74,12 +74,11 @@ func SetDefaults_StatefulSet(obj *appsv1beta1.StatefulSet) { | ||||
| 		obj.Spec.UpdateStrategy.RollingUpdate != nil { | ||||
|  | ||||
| 		if obj.Spec.UpdateStrategy.RollingUpdate.Partition == nil { | ||||
| 			obj.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32(0) | ||||
| 			obj.Spec.UpdateStrategy.RollingUpdate.Partition = ptr.To[int32](0) | ||||
| 		} | ||||
| 		if utilfeature.DefaultFeatureGate.Enabled(features.MaxUnavailableStatefulSet) { | ||||
| 			if obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable == nil { | ||||
| 				maxUnavailable := intstr.FromInt32(1) | ||||
| 				obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable = &maxUnavailable | ||||
| 				obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable = ptr.To(intstr.FromInt32(1)) | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
| @@ -34,7 +34,7 @@ import ( | ||||
| 	. "k8s.io/kubernetes/pkg/apis/apps/v1beta1" | ||||
| 	_ "k8s.io/kubernetes/pkg/apis/core/install" | ||||
| 	"k8s.io/kubernetes/pkg/features" | ||||
| 	utilpointer "k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| func TestSetDefaultDeployment(t *testing.T) { | ||||
| @@ -58,7 +58,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 			original: &appsv1beta1.Deployment{}, | ||||
| 			expected: &appsv1beta1.Deployment{ | ||||
| 				Spec: appsv1beta1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(1), | ||||
| 					Replicas: ptr.To[int32](1), | ||||
| 					Strategy: appsv1beta1.DeploymentStrategy{ | ||||
| 						Type: appsv1beta1.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: &appsv1beta1.RollingUpdateDeployment{ | ||||
| @@ -66,8 +66,8 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 							MaxUnavailable: &defaultIntOrString, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(2), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](2), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -75,7 +75,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1beta1.Deployment{ | ||||
| 				Spec: appsv1beta1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta1.DeploymentStrategy{ | ||||
| 						RollingUpdate: &appsv1beta1.RollingUpdateDeployment{ | ||||
| 							MaxSurge: &differentIntOrString, | ||||
| @@ -85,7 +85,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 			}, | ||||
| 			expected: &appsv1beta1.Deployment{ | ||||
| 				Spec: appsv1beta1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta1.DeploymentStrategy{ | ||||
| 						Type: appsv1beta1.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: &appsv1beta1.RollingUpdateDeployment{ | ||||
| @@ -93,8 +93,8 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 							MaxUnavailable: &defaultIntOrString, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(2), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](2), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -102,7 +102,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1beta1.Deployment{ | ||||
| 				Spec: appsv1beta1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(3), | ||||
| 					Replicas: ptr.To[int32](3), | ||||
| 					Strategy: appsv1beta1.DeploymentStrategy{ | ||||
| 						Type:          appsv1beta1.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: nil, | ||||
| @@ -111,7 +111,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 			}, | ||||
| 			expected: &appsv1beta1.Deployment{ | ||||
| 				Spec: appsv1beta1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(3), | ||||
| 					Replicas: ptr.To[int32](3), | ||||
| 					Strategy: appsv1beta1.DeploymentStrategy{ | ||||
| 						Type: appsv1beta1.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: &appsv1beta1.RollingUpdateDeployment{ | ||||
| @@ -119,8 +119,8 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 							MaxUnavailable: &defaultIntOrString, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(2), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](2), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -128,21 +128,21 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1beta1.Deployment{ | ||||
| 				Spec: appsv1beta1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta1.DeploymentStrategy{ | ||||
| 						Type: appsv1beta1.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(0), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](0), | ||||
| 				}, | ||||
| 			}, | ||||
| 			expected: &appsv1beta1.Deployment{ | ||||
| 				Spec: appsv1beta1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta1.DeploymentStrategy{ | ||||
| 						Type: appsv1beta1.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(0), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](0), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -150,22 +150,22 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1beta1.Deployment{ | ||||
| 				Spec: appsv1beta1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta1.DeploymentStrategy{ | ||||
| 						Type: appsv1beta1.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(30), | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(2), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](30), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](2), | ||||
| 				}, | ||||
| 			}, | ||||
| 			expected: &appsv1beta1.Deployment{ | ||||
| 				Spec: appsv1beta1.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta1.DeploymentStrategy{ | ||||
| 						Type: appsv1beta1.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(30), | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(2), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](30), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](2), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -244,7 +244,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 						Type:          appsv1beta1.OnDeleteStatefulSetStrategyType, | ||||
| 						RollingUpdate: nil, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 					Selector: &metav1.LabelSelector{ | ||||
| 						MatchLabels:      map[string]string{"foo": "bar"}, | ||||
| 						MatchExpressions: []metav1.LabelSelectorRequirement{}, | ||||
| @@ -272,7 +272,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 						Type:          appsv1beta1.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: nil, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 					Selector: &metav1.LabelSelector{ | ||||
| 						MatchLabels:      map[string]string{"foo": "bar"}, | ||||
| 						MatchExpressions: []metav1.LabelSelectorRequirement{}, | ||||
| @@ -298,7 +298,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 						Type:          appsv1beta1.OnDeleteStatefulSetStrategyType, | ||||
| 						RollingUpdate: nil, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 					Selector: &metav1.LabelSelector{ | ||||
| 						MatchLabels:      map[string]string{"foo": "bar"}, | ||||
| 						MatchExpressions: []metav1.LabelSelectorRequirement{}, | ||||
| @@ -322,7 +322,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 						Type:          appsv1beta1.OnDeleteStatefulSetStrategyType, | ||||
| 						RollingUpdate: nil, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 					Selector: &metav1.LabelSelector{ | ||||
| 						MatchLabels:      map[string]string{"foo": "bar"}, | ||||
| 						MatchExpressions: []metav1.LabelSelectorRequirement{}, | ||||
| @@ -339,7 +339,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta1.StatefulSetUpdateStrategy{ | ||||
| 						RollingUpdate: &appsv1beta1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      &defaultPartition, | ||||
| 							MaxUnavailable: getMaxUnavailable(1), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(1)), | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| @@ -352,11 +352,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta1.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1beta1.OnDeleteStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1beta1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(0), | ||||
| 							MaxUnavailable: getMaxUnavailable(1), | ||||
| 							Partition:      ptr.To[int32](0), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(1)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 					Selector: &metav1.LabelSelector{ | ||||
| 						MatchLabels:      map[string]string{"foo": "bar"}, | ||||
| 						MatchExpressions: []metav1.LabelSelectorRequirement{}, | ||||
| @@ -373,7 +373,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta1.StatefulSetUpdateStrategy{ | ||||
| 						RollingUpdate: &appsv1beta1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      ¬TheDefaultPartition, | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| @@ -386,11 +386,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta1.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1beta1.OnDeleteStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1beta1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(42), | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							Partition:      ptr.To[int32](42), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 					Selector: &metav1.LabelSelector{ | ||||
| 						MatchLabels:      map[string]string{"foo": "bar"}, | ||||
| 						MatchExpressions: []metav1.LabelSelectorRequirement{}, | ||||
| @@ -415,7 +415,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 						Type:          appsv1beta1.OnDeleteStatefulSetStrategyType, | ||||
| 						RollingUpdate: nil, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 					Selector: &metav1.LabelSelector{ | ||||
| 						MatchLabels:      map[string]string{"foo": "bar"}, | ||||
| 						MatchExpressions: []metav1.LabelSelectorRequirement{}, | ||||
| @@ -432,7 +432,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta1.StatefulSetUpdateStrategy{ | ||||
| 						RollingUpdate: &appsv1beta1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      ¬TheDefaultPartition, | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| @@ -445,11 +445,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta1.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1beta1.OnDeleteStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1beta1.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(42), | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							Partition:      ptr.To[int32](42), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 					Selector: &metav1.LabelSelector{ | ||||
| 						MatchLabels:      map[string]string{"foo": "bar"}, | ||||
| 						MatchExpressions: []metav1.LabelSelectorRequirement{}, | ||||
| @@ -474,7 +474,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 						Type:          appsv1beta1.OnDeleteStatefulSetStrategyType, | ||||
| 						RollingUpdate: nil, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 					PersistentVolumeClaimRetentionPolicy: &appsv1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy{ | ||||
| 						WhenDeleted: appsv1beta1.RetainPersistentVolumeClaimRetentionPolicyType, | ||||
| 						WhenScaled:  appsv1beta1.RetainPersistentVolumeClaimRetentionPolicyType, | ||||
| @@ -526,12 +526,3 @@ func roundTrip(t *testing.T, obj runtime.Object) runtime.Object { | ||||
| 	} | ||||
| 	return obj3 | ||||
| } | ||||
|  | ||||
| func getPartition(partition int32) *int32 { | ||||
| 	return &partition | ||||
| } | ||||
|  | ||||
| func getMaxUnavailable(maxUnavailable int) *intstr.IntOrString { | ||||
| 	maxUnavailableIntOrStr := intstr.FromInt32(int32(maxUnavailable)) | ||||
| 	return &maxUnavailableIntOrStr | ||||
| } | ||||
|   | ||||
| @@ -22,7 +22,7 @@ import ( | ||||
| 	"k8s.io/apimachinery/pkg/util/intstr" | ||||
| 	utilfeature "k8s.io/apiserver/pkg/util/feature" | ||||
| 	"k8s.io/kubernetes/pkg/features" | ||||
| 	"k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| func addDefaultingFuncs(scheme *runtime.Scheme) error { | ||||
| @@ -41,13 +41,11 @@ func SetDefaults_DaemonSet(obj *appsv1beta2.DaemonSet) { | ||||
| 		} | ||||
| 		if updateStrategy.RollingUpdate.MaxUnavailable == nil { | ||||
| 			// Set default MaxUnavailable as 1 by default. | ||||
| 			maxUnavailable := intstr.FromInt32(1) | ||||
| 			updateStrategy.RollingUpdate.MaxUnavailable = &maxUnavailable | ||||
| 			updateStrategy.RollingUpdate.MaxUnavailable = ptr.To(intstr.FromInt32(1)) | ||||
| 		} | ||||
| 		if updateStrategy.RollingUpdate.MaxSurge == nil { | ||||
| 			// Set default MaxSurge as 0 by default. | ||||
| 			maxSurge := intstr.FromInt32(0) | ||||
| 			updateStrategy.RollingUpdate.MaxSurge = &maxSurge | ||||
| 			updateStrategy.RollingUpdate.MaxSurge = ptr.To(intstr.FromInt32(0)) | ||||
| 		} | ||||
| 	} | ||||
| 	if obj.Spec.RevisionHistoryLimit == nil { | ||||
| @@ -74,12 +72,11 @@ func SetDefaults_StatefulSet(obj *appsv1beta2.StatefulSet) { | ||||
| 		obj.Spec.UpdateStrategy.RollingUpdate != nil { | ||||
|  | ||||
| 		if obj.Spec.UpdateStrategy.RollingUpdate.Partition == nil { | ||||
| 			obj.Spec.UpdateStrategy.RollingUpdate.Partition = pointer.Int32(0) | ||||
| 			obj.Spec.UpdateStrategy.RollingUpdate.Partition = ptr.To[int32](0) | ||||
| 		} | ||||
| 		if utilfeature.DefaultFeatureGate.Enabled(features.MaxUnavailableStatefulSet) { | ||||
| 			if obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable == nil { | ||||
| 				maxUnavailable := intstr.FromInt32(1) | ||||
| 				obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable = &maxUnavailable | ||||
| 				obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable = ptr.To(intstr.FromInt32(1)) | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
| @@ -34,7 +34,7 @@ import ( | ||||
| 	. "k8s.io/kubernetes/pkg/apis/apps/v1beta2" | ||||
| 	_ "k8s.io/kubernetes/pkg/apis/core/install" | ||||
| 	"k8s.io/kubernetes/pkg/features" | ||||
| 	utilpointer "k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| @@ -86,7 +86,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 							MaxSurge:       &maxSurge, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -99,7 +99,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 				}, | ||||
| 				Spec: appsv1beta2.DaemonSetSpec{ | ||||
| 					Template:             defaultTemplate, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(1), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](1), | ||||
| 				}, | ||||
| 			}, | ||||
| 			expected: &appsv1beta2.DaemonSet{ | ||||
| @@ -117,7 +117,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 							MaxSurge:       &maxSurge, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(1), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](1), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -136,7 +136,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta2.DaemonSetUpdateStrategy{ | ||||
| 						Type: appsv1beta2.OnDeleteDaemonSetStrategyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -154,7 +154,7 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 							MaxSurge:       &maxSurge, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -175,15 +175,6 @@ func TestSetDefaultDaemonSetSpec(t *testing.T) { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func getMaxUnavailable(maxUnavailable int) *intstr.IntOrString { | ||||
| 	maxUnavailableIntOrStr := intstr.FromInt32(int32(maxUnavailable)) | ||||
| 	return &maxUnavailableIntOrStr | ||||
| } | ||||
|  | ||||
| func getPartition(partition int32) *int32 { | ||||
| 	return &partition | ||||
| } | ||||
|  | ||||
| func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 	defaultLabels := map[string]string{"foo": "bar"} | ||||
| 	var defaultPartition int32 = 0 | ||||
| @@ -233,7 +224,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 							Partition: &defaultPartition, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -259,7 +250,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1beta2.OnDeleteStatefulSetStrategyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -286,7 +277,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 							Partition: &defaultPartition, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 		}, | ||||
| @@ -308,10 +299,10 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1beta2.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition: getPartition(0), | ||||
| 							Partition: ptr.To[int32](0), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enableMaxUnavailablePolicy: false, | ||||
| @@ -324,7 +315,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      &defaultPartition, | ||||
| 							MaxUnavailable: getMaxUnavailable(1), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(1)), | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| @@ -340,11 +331,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1beta2.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(0), | ||||
| 							MaxUnavailable: getMaxUnavailable(1), | ||||
| 							Partition:      ptr.To[int32](0), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(1)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enableMaxUnavailablePolicy: false, | ||||
| @@ -357,7 +348,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      ¬TheDefaultPartition, | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| @@ -373,11 +364,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1beta2.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(42), | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							Partition:      ptr.To[int32](42), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enableMaxUnavailablePolicy: false, | ||||
| @@ -400,11 +391,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1beta2.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(0), | ||||
| 							MaxUnavailable: getMaxUnavailable(1), | ||||
| 							Partition:      ptr.To[int32](0), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(1)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enableMaxUnavailablePolicy: true, | ||||
| @@ -417,7 +408,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      ¬TheDefaultPartition, | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 				}, | ||||
| @@ -433,11 +424,11 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 					UpdateStrategy: appsv1beta2.StatefulSetUpdateStrategy{ | ||||
| 						Type: appsv1beta2.RollingUpdateStatefulSetStrategyType, | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateStatefulSetStrategy{ | ||||
| 							Partition:      getPartition(42), | ||||
| 							MaxUnavailable: getMaxUnavailable(3), | ||||
| 							Partition:      ptr.To[int32](42), | ||||
| 							MaxUnavailable: ptr.To(intstr.FromInt32(3)), | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 				}, | ||||
| 			}, | ||||
| 			enableMaxUnavailablePolicy: true, | ||||
| @@ -463,7 +454,7 @@ func TestSetDefaultStatefulSet(t *testing.T) { | ||||
| 							Partition: &defaultPartition, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(10), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](10), | ||||
| 					PersistentVolumeClaimRetentionPolicy: &appsv1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy{ | ||||
| 						WhenDeleted: appsv1beta2.RetainPersistentVolumeClaimRetentionPolicyType, | ||||
| 						WhenScaled:  appsv1beta2.RetainPersistentVolumeClaimRetentionPolicyType, | ||||
| @@ -513,7 +504,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 			original: &appsv1beta2.Deployment{}, | ||||
| 			expected: &appsv1beta2.Deployment{ | ||||
| 				Spec: appsv1beta2.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(1), | ||||
| 					Replicas: ptr.To[int32](1), | ||||
| 					Strategy: appsv1beta2.DeploymentStrategy{ | ||||
| 						Type: appsv1beta2.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateDeployment{ | ||||
| @@ -521,8 +512,8 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 							MaxUnavailable: &defaultIntOrString, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(10), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](10), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -530,7 +521,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1beta2.Deployment{ | ||||
| 				Spec: appsv1beta2.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta2.DeploymentStrategy{ | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateDeployment{ | ||||
| 							MaxSurge: &differentIntOrString, | ||||
| @@ -540,7 +531,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 			}, | ||||
| 			expected: &appsv1beta2.Deployment{ | ||||
| 				Spec: appsv1beta2.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta2.DeploymentStrategy{ | ||||
| 						Type: appsv1beta2.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateDeployment{ | ||||
| @@ -548,8 +539,8 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 							MaxUnavailable: &defaultIntOrString, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(10), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](10), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -557,7 +548,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1beta2.Deployment{ | ||||
| 				Spec: appsv1beta2.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(3), | ||||
| 					Replicas: ptr.To[int32](3), | ||||
| 					Strategy: appsv1beta2.DeploymentStrategy{ | ||||
| 						Type:          appsv1beta2.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: nil, | ||||
| @@ -566,7 +557,7 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 			}, | ||||
| 			expected: &appsv1beta2.Deployment{ | ||||
| 				Spec: appsv1beta2.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(3), | ||||
| 					Replicas: ptr.To[int32](3), | ||||
| 					Strategy: appsv1beta2.DeploymentStrategy{ | ||||
| 						Type: appsv1beta2.RollingUpdateDeploymentStrategyType, | ||||
| 						RollingUpdate: &appsv1beta2.RollingUpdateDeployment{ | ||||
| @@ -574,8 +565,8 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 							MaxUnavailable: &defaultIntOrString, | ||||
| 						}, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(10), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](10), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -583,21 +574,21 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1beta2.Deployment{ | ||||
| 				Spec: appsv1beta2.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta2.DeploymentStrategy{ | ||||
| 						Type: appsv1beta2.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit: utilpointer.Int32(0), | ||||
| 					RevisionHistoryLimit: ptr.To[int32](0), | ||||
| 				}, | ||||
| 			}, | ||||
| 			expected: &appsv1beta2.Deployment{ | ||||
| 				Spec: appsv1beta2.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta2.DeploymentStrategy{ | ||||
| 						Type: appsv1beta2.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(0), | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(600), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](0), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](600), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -605,22 +596,22 @@ func TestSetDefaultDeployment(t *testing.T) { | ||||
| 		{ | ||||
| 			original: &appsv1beta2.Deployment{ | ||||
| 				Spec: appsv1beta2.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta2.DeploymentStrategy{ | ||||
| 						Type: appsv1beta2.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(30), | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(2), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](30), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](2), | ||||
| 				}, | ||||
| 			}, | ||||
| 			expected: &appsv1beta2.Deployment{ | ||||
| 				Spec: appsv1beta2.DeploymentSpec{ | ||||
| 					Replicas: utilpointer.Int32(5), | ||||
| 					Replicas: ptr.To[int32](5), | ||||
| 					Strategy: appsv1beta2.DeploymentStrategy{ | ||||
| 						Type: appsv1beta2.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
| 					ProgressDeadlineSeconds: utilpointer.Int32(30), | ||||
| 					RevisionHistoryLimit:    utilpointer.Int32(2), | ||||
| 					ProgressDeadlineSeconds: ptr.To[int32](30), | ||||
| 					RevisionHistoryLimit:    ptr.To[int32](2), | ||||
| 					Template:                defaultTemplate, | ||||
| 				}, | ||||
| 			}, | ||||
| @@ -677,7 +668,7 @@ func TestSetDefaultReplicaSetReplicas(t *testing.T) { | ||||
| 		{ | ||||
| 			rs: appsv1beta2.ReplicaSet{ | ||||
| 				Spec: appsv1beta2.ReplicaSetSpec{ | ||||
| 					Replicas: utilpointer.Int32(0), | ||||
| 					Replicas: ptr.To[int32](0), | ||||
| 					Template: v1.PodTemplateSpec{ | ||||
| 						ObjectMeta: metav1.ObjectMeta{ | ||||
| 							Labels: map[string]string{ | ||||
| @@ -692,7 +683,7 @@ func TestSetDefaultReplicaSetReplicas(t *testing.T) { | ||||
| 		{ | ||||
| 			rs: appsv1beta2.ReplicaSet{ | ||||
| 				Spec: appsv1beta2.ReplicaSetSpec{ | ||||
| 					Replicas: utilpointer.Int32(3), | ||||
| 					Replicas: ptr.To[int32](3), | ||||
| 					Template: v1.PodTemplateSpec{ | ||||
| 						ObjectMeta: metav1.ObjectMeta{ | ||||
| 							Labels: map[string]string{ | ||||
| @@ -735,7 +726,7 @@ func TestDefaultRequestIsNotSetForReplicaSet(t *testing.T) { | ||||
| 	} | ||||
| 	rs := &appsv1beta2.ReplicaSet{ | ||||
| 		Spec: appsv1beta2.ReplicaSetSpec{ | ||||
| 			Replicas: utilpointer.Int32(3), | ||||
| 			Replicas: ptr.To[int32](3), | ||||
| 			Template: v1.PodTemplateSpec{ | ||||
| 				ObjectMeta: metav1.ObjectMeta{ | ||||
| 					Labels: map[string]string{ | ||||
|   | ||||
| @@ -36,12 +36,9 @@ import ( | ||||
| 	api "k8s.io/kubernetes/pkg/apis/core" | ||||
| 	corevalidation "k8s.io/kubernetes/pkg/apis/core/validation" | ||||
| 	"k8s.io/kubernetes/pkg/features" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| func intStrAddr(intOrStr intstr.IntOrString) *intstr.IntOrString { | ||||
| 	return &intOrStr | ||||
| } | ||||
|  | ||||
| type statefulSetTweak func(ss *apps.StatefulSet) | ||||
|  | ||||
| func mkStatefulSet(template *api.PodTemplate, tweaks ...statefulSetTweak) apps.StatefulSet { | ||||
| @@ -164,7 +161,7 @@ func tweakMaxUnavailable(mu intstr.IntOrString) statefulSetTweak { | ||||
| 		if ss.Spec.UpdateStrategy.RollingUpdate == nil { | ||||
| 			ss.Spec.UpdateStrategy.RollingUpdate = &apps.RollingUpdateStatefulSetStrategy{} | ||||
| 		} | ||||
| 		ss.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable = intStrAddr(mu) | ||||
| 		ss.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable = ptr.To(mu) | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -49,7 +49,7 @@ import ( | ||||
| 	"k8s.io/kubernetes/pkg/controller" | ||||
| 	"k8s.io/kubernetes/pkg/controller/deployment/util" | ||||
| 	"k8s.io/kubernetes/pkg/controller/testutil" | ||||
| 	"k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| var ( | ||||
| @@ -57,7 +57,7 @@ var ( | ||||
| 	noTimestamp = metav1.Time{} | ||||
| ) | ||||
|  | ||||
| func rs(name string, replicas int, selector map[string]string, timestamp metav1.Time) *apps.ReplicaSet { | ||||
| func rs(name string, replicas int32, selector map[string]string, timestamp metav1.Time) *apps.ReplicaSet { | ||||
| 	return &apps.ReplicaSet{ | ||||
| 		ObjectMeta: metav1.ObjectMeta{ | ||||
| 			Name:              name, | ||||
| @@ -65,22 +65,22 @@ func rs(name string, replicas int, selector map[string]string, timestamp metav1. | ||||
| 			Namespace:         metav1.NamespaceDefault, | ||||
| 		}, | ||||
| 		Spec: apps.ReplicaSetSpec{ | ||||
| 			Replicas: pointer.Int32(int32(replicas)), | ||||
| 			Replicas: ptr.To(replicas), | ||||
| 			Selector: &metav1.LabelSelector{MatchLabels: selector}, | ||||
| 			Template: v1.PodTemplateSpec{}, | ||||
| 		}, | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func newRSWithStatus(name string, specReplicas, statusReplicas int, selector map[string]string) *apps.ReplicaSet { | ||||
| func newRSWithStatus(name string, specReplicas, statusReplicas int32, selector map[string]string) *apps.ReplicaSet { | ||||
| 	rs := rs(name, specReplicas, selector, noTimestamp) | ||||
| 	rs.Status = apps.ReplicaSetStatus{ | ||||
| 		Replicas: int32(statusReplicas), | ||||
| 		Replicas: statusReplicas, | ||||
| 	} | ||||
| 	return rs | ||||
| } | ||||
|  | ||||
| func newDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSurge, maxUnavailable *intstr.IntOrString, selector map[string]string) *apps.Deployment { | ||||
| func newDeployment(name string, replicas int32, revisionHistoryLimit *int32, maxSurge, maxUnavailable *intstr.IntOrString, selector map[string]string) *apps.Deployment { | ||||
| 	d := apps.Deployment{ | ||||
| 		TypeMeta: metav1.TypeMeta{APIVersion: "apps/v1", Kind: "Deployment"}, | ||||
| 		ObjectMeta: metav1.ObjectMeta{ | ||||
| @@ -93,11 +93,11 @@ func newDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSu | ||||
| 			Strategy: apps.DeploymentStrategy{ | ||||
| 				Type: apps.RollingUpdateDeploymentStrategyType, | ||||
| 				RollingUpdate: &apps.RollingUpdateDeployment{ | ||||
| 					MaxUnavailable: func() *intstr.IntOrString { i := intstr.FromInt32(0); return &i }(), | ||||
| 					MaxSurge:       func() *intstr.IntOrString { i := intstr.FromInt32(0); return &i }(), | ||||
| 					MaxUnavailable: ptr.To(intstr.FromInt32(0)), | ||||
| 					MaxSurge:       ptr.To(intstr.FromInt32(0)), | ||||
| 				}, | ||||
| 			}, | ||||
| 			Replicas: pointer.Int32(int32(replicas)), | ||||
| 			Replicas: ptr.To(replicas), | ||||
| 			Selector: &metav1.LabelSelector{MatchLabels: selector}, | ||||
| 			Template: v1.PodTemplateSpec{ | ||||
| 				ObjectMeta: metav1.ObjectMeta{ | ||||
| @@ -123,7 +123,7 @@ func newDeployment(name string, replicas int, revisionHistoryLimit *int32, maxSu | ||||
| 	return &d | ||||
| } | ||||
|  | ||||
| func newReplicaSet(d *apps.Deployment, name string, replicas int) *apps.ReplicaSet { | ||||
| func newReplicaSet(d *apps.Deployment, name string, replicas int32) *apps.ReplicaSet { | ||||
| 	return &apps.ReplicaSet{ | ||||
| 		TypeMeta: metav1.TypeMeta{Kind: "ReplicaSet"}, | ||||
| 		ObjectMeta: metav1.ObjectMeta{ | ||||
| @@ -135,7 +135,7 @@ func newReplicaSet(d *apps.Deployment, name string, replicas int) *apps.ReplicaS | ||||
| 		}, | ||||
| 		Spec: apps.ReplicaSetSpec{ | ||||
| 			Selector: d.Spec.Selector, | ||||
| 			Replicas: pointer.Int32(int32(replicas)), | ||||
| 			Replicas: ptr.To(replicas), | ||||
| 			Template: d.Spec.Template, | ||||
| 		}, | ||||
| 	} | ||||
|   | ||||
| @@ -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 | ||||
| } | ||||
|   | ||||
| @@ -33,11 +33,11 @@ import ( | ||||
|  | ||||
| func TestScaleDownOldReplicaSets(t *testing.T) { | ||||
| 	tests := []struct { | ||||
| 		oldRSSizes []int | ||||
| 		oldRSSizes []int32 | ||||
| 		d          *apps.Deployment | ||||
| 	}{ | ||||
| 		{ | ||||
| 			oldRSSizes: []int{3}, | ||||
| 			oldRSSizes: []int32{3}, | ||||
| 			d:          newDeployment("foo", 3, nil, nil, nil, map[string]string{"foo": "bar"}), | ||||
| 		}, | ||||
| 	} | ||||
|   | ||||
| @@ -30,12 +30,12 @@ import ( | ||||
|  | ||||
| func TestDeploymentController_reconcileNewReplicaSet(t *testing.T) { | ||||
| 	tests := []struct { | ||||
| 		deploymentReplicas  int | ||||
| 		deploymentReplicas  int32 | ||||
| 		maxSurge            intstr.IntOrString | ||||
| 		oldReplicas         int | ||||
| 		newReplicas         int | ||||
| 		oldReplicas         int32 | ||||
| 		newReplicas         int32 | ||||
| 		scaleExpected       bool | ||||
| 		expectedNewReplicas int | ||||
| 		expectedNewReplicas int32 | ||||
| 	}{ | ||||
| 		{ | ||||
| 			// Should not scale up. | ||||
| @@ -115,7 +115,7 @@ func TestDeploymentController_reconcileNewReplicaSet(t *testing.T) { | ||||
| 			continue | ||||
| 		} | ||||
| 		updated := fake.Actions()[0].(core.UpdateAction).GetObject().(*apps.ReplicaSet) | ||||
| 		if e, a := test.expectedNewReplicas, int(*(updated.Spec.Replicas)); e != a { | ||||
| 		if e, a := test.expectedNewReplicas, *(updated.Spec.Replicas); e != a { | ||||
| 			t.Errorf("expected update to %d replicas, got %d", e, a) | ||||
| 		} | ||||
| 	} | ||||
| @@ -123,14 +123,14 @@ func TestDeploymentController_reconcileNewReplicaSet(t *testing.T) { | ||||
|  | ||||
| func TestDeploymentController_reconcileOldReplicaSets(t *testing.T) { | ||||
| 	tests := []struct { | ||||
| 		deploymentReplicas  int | ||||
| 		deploymentReplicas  int32 | ||||
| 		maxUnavailable      intstr.IntOrString | ||||
| 		oldReplicas         int | ||||
| 		newReplicas         int | ||||
| 		oldReplicas         int32 | ||||
| 		newReplicas         int32 | ||||
| 		readyPodsFromOldRS  int | ||||
| 		readyPodsFromNewRS  int | ||||
| 		scaleExpected       bool | ||||
| 		expectedOldReplicas int | ||||
| 		expectedOldReplicas int32 | ||||
| 	}{ | ||||
| 		{ | ||||
| 			deploymentReplicas:  10, | ||||
| @@ -220,7 +220,7 @@ func TestDeploymentController_reconcileOldReplicaSets(t *testing.T) { | ||||
|  | ||||
| func TestDeploymentController_cleanupUnhealthyReplicas(t *testing.T) { | ||||
| 	tests := []struct { | ||||
| 		oldReplicas          int | ||||
| 		oldReplicas          int32 | ||||
| 		readyPods            int | ||||
| 		unHealthyPods        int | ||||
| 		maxCleanupCount      int | ||||
| @@ -285,12 +285,12 @@ func TestDeploymentController_cleanupUnhealthyReplicas(t *testing.T) { | ||||
|  | ||||
| func TestDeploymentController_scaleDownOldReplicaSetsForRollingUpdate(t *testing.T) { | ||||
| 	tests := []struct { | ||||
| 		deploymentReplicas  int | ||||
| 		deploymentReplicas  int32 | ||||
| 		maxUnavailable      intstr.IntOrString | ||||
| 		readyPods           int | ||||
| 		oldReplicas         int | ||||
| 		oldReplicas         int32 | ||||
| 		scaleExpected       bool | ||||
| 		expectedOldReplicas int | ||||
| 		expectedOldReplicas int32 | ||||
| 	}{ | ||||
| 		{ | ||||
| 			deploymentReplicas:  10, | ||||
| @@ -379,7 +379,7 @@ func TestDeploymentController_scaleDownOldReplicaSetsForRollingUpdate(t *testing | ||||
| 			continue | ||||
| 		} | ||||
| 		updated := updateAction.GetObject().(*apps.ReplicaSet) | ||||
| 		if e, a := test.expectedOldReplicas, int(*(updated.Spec.Replicas)); e != a { | ||||
| 		if e, a := test.expectedOldReplicas, *(updated.Spec.Replicas); e != a { | ||||
| 			t.Errorf("expected update to %d replicas, got %d", e, a) | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
| @@ -32,19 +32,15 @@ import ( | ||||
| 	"k8s.io/klog/v2/ktesting" | ||||
| 	"k8s.io/kubernetes/pkg/controller" | ||||
| 	deploymentutil "k8s.io/kubernetes/pkg/controller/deployment/util" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| func intOrStrP(val int) *intstr.IntOrString { | ||||
| 	intOrStr := intstr.FromInt32(int32(val)) | ||||
| 	return &intOrStr | ||||
| } | ||||
|  | ||||
| func TestScale(t *testing.T) { | ||||
| 	newTimestamp := metav1.Date(2016, 5, 20, 2, 0, 0, 0, time.UTC) | ||||
| 	oldTimestamp := metav1.Date(2016, 5, 20, 1, 0, 0, 0, time.UTC) | ||||
| 	olderTimestamp := metav1.Date(2016, 5, 20, 0, 0, 0, 0, time.UTC) | ||||
|  | ||||
| 	var updatedTemplate = func(replicas int) *apps.Deployment { | ||||
| 	var updatedTemplate = func(replicas int32) *apps.Deployment { | ||||
| 		d := newDeployment("foo", replicas, nil, nil, nil, map[string]string{"foo": "bar"}) | ||||
| 		d.Spec.Template.Labels["another"] = "label" | ||||
| 		return d | ||||
| @@ -221,8 +217,8 @@ func TestScale(t *testing.T) { | ||||
| 		}, | ||||
| 		{ | ||||
| 			name:          "deployment with surge pods", | ||||
| 			deployment:    newDeployment("foo", 20, nil, intOrStrP(2), nil, nil), | ||||
| 			oldDeployment: newDeployment("foo", 10, nil, intOrStrP(2), nil, nil), | ||||
| 			deployment:    newDeployment("foo", 20, nil, ptr.To(intstr.FromInt32(2)), nil, nil), | ||||
| 			oldDeployment: newDeployment("foo", 10, nil, ptr.To(intstr.FromInt32(2)), nil, nil), | ||||
|  | ||||
| 			newRS:  rs("foo-v2", 6, nil, newTimestamp), | ||||
| 			oldRSs: []*apps.ReplicaSet{rs("foo-v1", 6, nil, oldTimestamp)}, | ||||
| @@ -232,8 +228,8 @@ func TestScale(t *testing.T) { | ||||
| 		}, | ||||
| 		{ | ||||
| 			name:          "change both surge and size", | ||||
| 			deployment:    newDeployment("foo", 50, nil, intOrStrP(6), nil, nil), | ||||
| 			oldDeployment: newDeployment("foo", 10, nil, intOrStrP(3), nil, nil), | ||||
| 			deployment:    newDeployment("foo", 50, nil, ptr.To(intstr.FromInt32(6)), nil, nil), | ||||
| 			oldDeployment: newDeployment("foo", 10, nil, ptr.To(intstr.FromInt32(3)), nil, nil), | ||||
|  | ||||
| 			newRS:  rs("foo-v2", 5, nil, newTimestamp), | ||||
| 			oldRSs: []*apps.ReplicaSet{rs("foo-v1", 8, nil, oldTimestamp)}, | ||||
| @@ -254,8 +250,8 @@ func TestScale(t *testing.T) { | ||||
| 		}, | ||||
| 		{ | ||||
| 			name:          "saturated but broken new replica set does not affect old pods", | ||||
| 			deployment:    newDeployment("foo", 2, nil, intOrStrP(1), intOrStrP(1), nil), | ||||
| 			oldDeployment: newDeployment("foo", 2, nil, intOrStrP(1), intOrStrP(1), nil), | ||||
| 			deployment:    newDeployment("foo", 2, nil, ptr.To(intstr.FromInt32(1)), ptr.To(intstr.FromInt32(1)), nil), | ||||
| 			oldDeployment: newDeployment("foo", 2, nil, ptr.To(intstr.FromInt32(1)), ptr.To(intstr.FromInt32(1)), nil), | ||||
|  | ||||
| 			newRS: func() *apps.ReplicaSet { | ||||
| 				rs := rs("foo-v2", 2, nil, newTimestamp) | ||||
| @@ -458,7 +454,7 @@ func TestDeploymentController_cleanupDeploymentOrder(t *testing.T) { | ||||
| 	now := metav1.Now() | ||||
| 	duration := time.Minute | ||||
|  | ||||
| 	newRSWithRevisionAndCreationTimestamp := func(name string, replicas int, selector map[string]string, timestamp time.Time, revision string) *apps.ReplicaSet { | ||||
| 	newRSWithRevisionAndCreationTimestamp := func(name string, replicas int32, selector map[string]string, timestamp time.Time, revision string) *apps.ReplicaSet { | ||||
| 		rs := rs(name, replicas, selector, metav1.NewTime(timestamp)) | ||||
| 		if revision != "" { | ||||
| 			rs.Annotations = map[string]string{ | ||||
|   | ||||
| @@ -36,7 +36,7 @@ import ( | ||||
| 	"k8s.io/client-go/kubernetes/fake" | ||||
| 	"k8s.io/klog/v2/ktesting" | ||||
| 	"k8s.io/kubernetes/pkg/controller" | ||||
| 	"k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| func newDControllerRef(d *apps.Deployment) *metav1.OwnerReference { | ||||
| @@ -394,32 +394,32 @@ func TestResolveFenceposts(t *testing.T) { | ||||
| 		expectError       bool | ||||
| 	}{ | ||||
| 		{ | ||||
| 			maxSurge:          newString("0%"), | ||||
| 			maxUnavailable:    newString("0%"), | ||||
| 			maxSurge:          ptr.To("0%"), | ||||
| 			maxUnavailable:    ptr.To("0%"), | ||||
| 			desired:           0, | ||||
| 			expectSurge:       0, | ||||
| 			expectUnavailable: 1, | ||||
| 			expectError:       false, | ||||
| 		}, | ||||
| 		{ | ||||
| 			maxSurge:          newString("39%"), | ||||
| 			maxUnavailable:    newString("39%"), | ||||
| 			maxSurge:          ptr.To("39%"), | ||||
| 			maxUnavailable:    ptr.To("39%"), | ||||
| 			desired:           10, | ||||
| 			expectSurge:       4, | ||||
| 			expectUnavailable: 3, | ||||
| 			expectError:       false, | ||||
| 		}, | ||||
| 		{ | ||||
| 			maxSurge:          newString("oops"), | ||||
| 			maxUnavailable:    newString("39%"), | ||||
| 			maxSurge:          ptr.To("oops"), | ||||
| 			maxUnavailable:    ptr.To("39%"), | ||||
| 			desired:           10, | ||||
| 			expectSurge:       0, | ||||
| 			expectUnavailable: 0, | ||||
| 			expectError:       true, | ||||
| 		}, | ||||
| 		{ | ||||
| 			maxSurge:          newString("55%"), | ||||
| 			maxUnavailable:    newString("urg"), | ||||
| 			maxSurge:          ptr.To("55%"), | ||||
| 			maxUnavailable:    ptr.To("urg"), | ||||
| 			desired:           10, | ||||
| 			expectSurge:       0, | ||||
| 			expectUnavailable: 0, | ||||
| @@ -427,14 +427,14 @@ func TestResolveFenceposts(t *testing.T) { | ||||
| 		}, | ||||
| 		{ | ||||
| 			maxSurge:          nil, | ||||
| 			maxUnavailable:    newString("39%"), | ||||
| 			maxUnavailable:    ptr.To("39%"), | ||||
| 			desired:           10, | ||||
| 			expectSurge:       0, | ||||
| 			expectUnavailable: 3, | ||||
| 			expectError:       false, | ||||
| 		}, | ||||
| 		{ | ||||
| 			maxSurge:          newString("39%"), | ||||
| 			maxSurge:          ptr.To("39%"), | ||||
| 			maxUnavailable:    nil, | ||||
| 			desired:           10, | ||||
| 			expectSurge:       4, | ||||
| @@ -455,12 +455,10 @@ func TestResolveFenceposts(t *testing.T) { | ||||
| 		t.Run(fmt.Sprintf("%d", num), func(t *testing.T) { | ||||
| 			var maxSurge, maxUnavail *intstr.IntOrString | ||||
| 			if test.maxSurge != nil { | ||||
| 				surge := intstr.FromString(*test.maxSurge) | ||||
| 				maxSurge = &surge | ||||
| 				maxSurge = ptr.To(intstr.FromString(*test.maxSurge)) | ||||
| 			} | ||||
| 			if test.maxUnavailable != nil { | ||||
| 				unavail := intstr.FromString(*test.maxUnavailable) | ||||
| 				maxUnavail = &unavail | ||||
| 				maxUnavail = ptr.To(intstr.FromString(*test.maxUnavailable)) | ||||
| 			} | ||||
| 			surge, unavail, err := ResolveFenceposts(maxSurge, maxUnavail, test.desired) | ||||
| 			if err != nil && !test.expectError { | ||||
| @@ -476,17 +474,13 @@ func TestResolveFenceposts(t *testing.T) { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func newString(s string) *string { | ||||
| 	return &s | ||||
| } | ||||
|  | ||||
| func TestNewRSNewReplicas(t *testing.T) { | ||||
| 	tests := []struct { | ||||
| 		Name          string | ||||
| 		strategyType  apps.DeploymentStrategyType | ||||
| 		depReplicas   int32 | ||||
| 		newRSReplicas int32 | ||||
| 		maxSurge      int | ||||
| 		maxSurge      int32 | ||||
| 		expected      int32 | ||||
| 	}{ | ||||
| 		{ | ||||
| @@ -515,14 +509,8 @@ func TestNewRSNewReplicas(t *testing.T) { | ||||
| 			*(newDeployment.Spec.Replicas) = test.depReplicas | ||||
| 			newDeployment.Spec.Strategy = apps.DeploymentStrategy{Type: test.strategyType} | ||||
| 			newDeployment.Spec.Strategy.RollingUpdate = &apps.RollingUpdateDeployment{ | ||||
| 				MaxUnavailable: func(i int) *intstr.IntOrString { | ||||
| 					x := intstr.FromInt32(int32(i)) | ||||
| 					return &x | ||||
| 				}(1), | ||||
| 				MaxSurge: func(i int) *intstr.IntOrString { | ||||
| 					x := intstr.FromInt32(int32(i)) | ||||
| 					return &x | ||||
| 				}(test.maxSurge), | ||||
| 				MaxUnavailable: ptr.To(intstr.FromInt32(1)), | ||||
| 				MaxSurge:       ptr.To(intstr.FromInt32(test.maxSurge)), | ||||
| 			} | ||||
| 			*(newRC.Spec.Replicas) = test.newRSReplicas | ||||
| 			rs, err := NewRSNewReplicas(&newDeployment, []*apps.ReplicaSet{&rs5}, &newRC) | ||||
| @@ -705,8 +693,8 @@ func TestDeploymentComplete(t *testing.T) { | ||||
| 				Replicas: &desired, | ||||
| 				Strategy: apps.DeploymentStrategy{ | ||||
| 					RollingUpdate: &apps.RollingUpdateDeployment{ | ||||
| 						MaxUnavailable: func(i int) *intstr.IntOrString { x := intstr.FromInt32(int32(i)); return &x }(int(maxUnavailable)), | ||||
| 						MaxSurge:       func(i int) *intstr.IntOrString { x := intstr.FromInt32(int32(i)); return &x }(int(maxSurge)), | ||||
| 						MaxUnavailable: ptr.To(intstr.FromInt32(maxUnavailable)), | ||||
| 						MaxSurge:       ptr.To(intstr.FromInt32(maxSurge)), | ||||
| 					}, | ||||
| 					Type: apps.RollingUpdateDeploymentStrategyType, | ||||
| 				}, | ||||
| @@ -960,7 +948,7 @@ func TestMaxUnavailable(t *testing.T) { | ||||
| 				Replicas: func(i int32) *int32 { return &i }(replicas), | ||||
| 				Strategy: apps.DeploymentStrategy{ | ||||
| 					RollingUpdate: &apps.RollingUpdateDeployment{ | ||||
| 						MaxSurge:       func(i int) *intstr.IntOrString { x := intstr.FromInt32(int32(i)); return &x }(int(1)), | ||||
| 						MaxSurge:       ptr.To(intstr.FromInt32(1)), | ||||
| 						MaxUnavailable: &maxUnavailable, | ||||
| 					}, | ||||
| 					Type: apps.RollingUpdateDeploymentStrategyType, | ||||
| @@ -1255,11 +1243,11 @@ func TestGetDeploymentsForReplicaSet(t *testing.T) { | ||||
| } | ||||
|  | ||||
| func TestMinAvailable(t *testing.T) { | ||||
| 	maxSurge := func(i int) *intstr.IntOrString { x := intstr.FromInt32(int32(i)); return &x }(int(1)) | ||||
| 	maxSurge := ptr.To(intstr.FromInt32(1)) | ||||
| 	deployment := func(replicas int32, maxUnavailable intstr.IntOrString) *apps.Deployment { | ||||
| 		return &apps.Deployment{ | ||||
| 			Spec: apps.DeploymentSpec{ | ||||
| 				Replicas: pointer.Int32(replicas), | ||||
| 				Replicas: ptr.To(replicas), | ||||
| 				Strategy: apps.DeploymentStrategy{ | ||||
| 					RollingUpdate: &apps.RollingUpdateDeployment{ | ||||
| 						MaxSurge:       maxSurge, | ||||
| @@ -1299,7 +1287,7 @@ func TestMinAvailable(t *testing.T) { | ||||
| 			name: "minAvailable with Recreate deployment strategy", | ||||
| 			deployment: &apps.Deployment{ | ||||
| 				Spec: apps.DeploymentSpec{ | ||||
| 					Replicas: pointer.Int32(10), | ||||
| 					Replicas: ptr.To[int32](10), | ||||
| 					Strategy: apps.DeploymentStrategy{ | ||||
| 						Type: apps.RecreateDeploymentStrategyType, | ||||
| 					}, | ||||
|   | ||||
| @@ -1066,7 +1066,7 @@ func TestStatefulSetControlRollingUpdateWithMaxUnavailable(t *testing.T) { | ||||
| 	} | ||||
| 	for _, tc := range testCases { | ||||
| 		// Setup the statefulSet controller | ||||
| 		totalPods := 6 | ||||
| 		var totalPods int32 = 6 | ||||
| 		var partition int32 = 3 | ||||
| 		var maxUnavailable = intstr.FromInt32(2) | ||||
| 		set := setupPodManagementPolicy(tc.policyType, newStatefulSet(totalPods)) | ||||
| @@ -1128,7 +1128,7 @@ func TestStatefulSetControlRollingUpdateWithMaxUnavailable(t *testing.T) { | ||||
| 			t.Fatal(err) | ||||
| 		} | ||||
|  | ||||
| 		tc.verifyFn(set, spc, ssc, pods, totalPods, selector) | ||||
| 		tc.verifyFn(set, spc, ssc, pods, int(totalPods), selector) | ||||
|  | ||||
| 		// pods 3/4/5 ready, should not update other pods | ||||
| 		spc.setPodRunning(set, 3) | ||||
| @@ -1151,8 +1151,8 @@ func TestStatefulSetControlRollingUpdateWithMaxUnavailable(t *testing.T) { | ||||
|  | ||||
| } | ||||
|  | ||||
| func setupForInvariant(t *testing.T) (*apps.StatefulSet, *fakeObjectManager, StatefulSetControlInterface, intstr.IntOrString, int) { | ||||
| 	totalPods := 6 | ||||
| func setupForInvariant(t *testing.T) (*apps.StatefulSet, *fakeObjectManager, StatefulSetControlInterface, intstr.IntOrString, int32) { | ||||
| 	var totalPods int32 = 6 | ||||
| 	set := newStatefulSet(totalPods) | ||||
| 	// update all pods >=3(3,4,5) | ||||
| 	var partition int32 = 3 | ||||
| @@ -1247,7 +1247,7 @@ func TestStatefulSetControlRollingUpdateWithMaxUnavailableInOrderedModeVerifyInv | ||||
| 				expecteddPodsToBeDeleted = 0 | ||||
| 			} | ||||
|  | ||||
| 			expectedPodsAfterUpdate := totalPods - expecteddPodsToBeDeleted | ||||
| 			expectedPodsAfterUpdate := int(totalPods) - expecteddPodsToBeDeleted | ||||
|  | ||||
| 			if len(pods) != expectedPodsAfterUpdate { | ||||
| 				t.Errorf("Expected pods %v, got pods %v", expectedPodsAfterUpdate, len(pods)) | ||||
|   | ||||
| @@ -38,7 +38,7 @@ import ( | ||||
| 	v1 "k8s.io/api/core/v1" | ||||
| 	podutil "k8s.io/kubernetes/pkg/api/v1/pod" | ||||
| 	"k8s.io/kubernetes/pkg/controller/history" | ||||
| 	"k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| // noopRecorder is an EventRecorder that does nothing. record.FakeRecorder has a fixed | ||||
| @@ -797,7 +797,7 @@ func newPVC(name string) v1.PersistentVolumeClaim { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func newStatefulSetWithVolumes(replicas int, name string, petMounts []v1.VolumeMount, podMounts []v1.VolumeMount) *apps.StatefulSet { | ||||
| func newStatefulSetWithVolumes(replicas int32, name string, petMounts []v1.VolumeMount, podMounts []v1.VolumeMount) *apps.StatefulSet { | ||||
| 	mounts := append(petMounts, podMounts...) | ||||
| 	claims := []v1.PersistentVolumeClaim{} | ||||
| 	for _, m := range petMounts { | ||||
| @@ -845,7 +845,7 @@ func newStatefulSetWithVolumes(replicas int, name string, petMounts []v1.VolumeM | ||||
| 			Selector: &metav1.LabelSelector{ | ||||
| 				MatchLabels: map[string]string{"foo": "bar"}, | ||||
| 			}, | ||||
| 			Replicas:             pointer.Int32(int32(replicas)), | ||||
| 			Replicas:             ptr.To(replicas), | ||||
| 			Template:             template, | ||||
| 			VolumeClaimTemplates: claims, | ||||
| 			ServiceName:          "governingsvc", | ||||
| @@ -862,7 +862,7 @@ func newStatefulSetWithVolumes(replicas int, name string, petMounts []v1.VolumeM | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func newStatefulSet(replicas int) *apps.StatefulSet { | ||||
| func newStatefulSet(replicas int32) *apps.StatefulSet { | ||||
| 	petMounts := []v1.VolumeMount{ | ||||
| 		{Name: "datadir", MountPath: "/tmp/zookeeper"}, | ||||
| 	} | ||||
| @@ -872,7 +872,7 @@ func newStatefulSet(replicas int) *apps.StatefulSet { | ||||
| 	return newStatefulSetWithVolumes(replicas, "foo", petMounts, podMounts) | ||||
| } | ||||
|  | ||||
| func newStatefulSetWithLabels(replicas int, name string, uid types.UID, labels map[string]string) *apps.StatefulSet { | ||||
| func newStatefulSetWithLabels(replicas int32, name string, uid types.UID, labels map[string]string) *apps.StatefulSet { | ||||
| 	// Converting all the map-only selectors to set-based selectors. | ||||
| 	var testMatchExpressions []metav1.LabelSelectorRequirement | ||||
| 	for key, value := range labels { | ||||
| @@ -900,7 +900,7 @@ func newStatefulSetWithLabels(replicas int, name string, uid types.UID, labels m | ||||
| 				MatchLabels:      nil, | ||||
| 				MatchExpressions: testMatchExpressions, | ||||
| 			}, | ||||
| 			Replicas: pointer.Int32(int32(replicas)), | ||||
| 			Replicas: ptr.To(replicas), | ||||
| 			PersistentVolumeClaimRetentionPolicy: &apps.StatefulSetPersistentVolumeClaimRetentionPolicy{ | ||||
| 				WhenScaled:  apps.RetainPersistentVolumeClaimRetentionPolicyType, | ||||
| 				WhenDeleted: apps.RetainPersistentVolumeClaimRetentionPolicyType, | ||||
| @@ -954,15 +954,15 @@ func TestGetStatefulSetMaxUnavailable(t *testing.T) { | ||||
| 	}{ | ||||
| 		// it wouldn't hurt to also test 0 and 0%, even if they should have been forbidden by API validation. | ||||
| 		{maxUnavailable: nil, replicaCount: 10, expectedMaxUnavailable: 1}, | ||||
| 		{maxUnavailable: intOrStrP(intstr.FromInt32(3)), replicaCount: 10, expectedMaxUnavailable: 3}, | ||||
| 		{maxUnavailable: intOrStrP(intstr.FromInt32(3)), replicaCount: 0, expectedMaxUnavailable: 3}, | ||||
| 		{maxUnavailable: intOrStrP(intstr.FromInt32(0)), replicaCount: 0, expectedMaxUnavailable: 1}, | ||||
| 		{maxUnavailable: intOrStrP(intstr.FromString("10%")), replicaCount: 25, expectedMaxUnavailable: 2}, | ||||
| 		{maxUnavailable: intOrStrP(intstr.FromString("100%")), replicaCount: 5, expectedMaxUnavailable: 5}, | ||||
| 		{maxUnavailable: intOrStrP(intstr.FromString("50%")), replicaCount: 5, expectedMaxUnavailable: 2}, | ||||
| 		{maxUnavailable: intOrStrP(intstr.FromString("10%")), replicaCount: 5, expectedMaxUnavailable: 1}, | ||||
| 		{maxUnavailable: intOrStrP(intstr.FromString("1%")), replicaCount: 0, expectedMaxUnavailable: 1}, | ||||
| 		{maxUnavailable: intOrStrP(intstr.FromString("0%")), replicaCount: 0, expectedMaxUnavailable: 1}, | ||||
| 		{maxUnavailable: ptr.To(intstr.FromInt32(3)), replicaCount: 10, expectedMaxUnavailable: 3}, | ||||
| 		{maxUnavailable: ptr.To(intstr.FromInt32(3)), replicaCount: 0, expectedMaxUnavailable: 3}, | ||||
| 		{maxUnavailable: ptr.To(intstr.FromInt32(0)), replicaCount: 0, expectedMaxUnavailable: 1}, | ||||
| 		{maxUnavailable: ptr.To(intstr.FromString("10%")), replicaCount: 25, expectedMaxUnavailable: 2}, | ||||
| 		{maxUnavailable: ptr.To(intstr.FromString("100%")), replicaCount: 5, expectedMaxUnavailable: 5}, | ||||
| 		{maxUnavailable: ptr.To(intstr.FromString("50%")), replicaCount: 5, expectedMaxUnavailable: 2}, | ||||
| 		{maxUnavailable: ptr.To(intstr.FromString("10%")), replicaCount: 5, expectedMaxUnavailable: 1}, | ||||
| 		{maxUnavailable: ptr.To(intstr.FromString("1%")), replicaCount: 0, expectedMaxUnavailable: 1}, | ||||
| 		{maxUnavailable: ptr.To(intstr.FromString("0%")), replicaCount: 0, expectedMaxUnavailable: 1}, | ||||
| 	} | ||||
|  | ||||
| 	for i, tc := range testCases { | ||||
| @@ -977,7 +977,3 @@ func TestGetStatefulSetMaxUnavailable(t *testing.T) { | ||||
| 		}) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func intOrStrP(v intstr.IntOrString) *intstr.IntOrString { | ||||
| 	return &v | ||||
| } | ||||
|   | ||||
| @@ -30,7 +30,7 @@ require ( | ||||
| 	gopkg.in/yaml.v2 v2.4.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| 	k8s.io/klog/v2 v2.100.1 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect | ||||
| 	sigs.k8s.io/yaml v1.3.0 // indirect | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/api/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/api/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -116,8 +116,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
| k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -32,7 +32,7 @@ require ( | ||||
| 	k8s.io/component-base v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 | ||||
| 	sigs.k8s.io/yaml v1.3.0 | ||||
|   | ||||
| @@ -830,8 +830,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= | ||||
| rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||||
| rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||||
|   | ||||
| @@ -24,7 +24,7 @@ require ( | ||||
| 	gopkg.in/inf.v0 v0.9.1 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 | ||||
| 	sigs.k8s.io/yaml v1.3.0 | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/apimachinery/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/apimachinery/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -155,8 +155,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -48,7 +48,7 @@ require ( | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/kms v0.0.0 | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/apiserver/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/apiserver/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -826,8 +826,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= | ||||
| rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||||
| rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||||
|   | ||||
| @@ -21,7 +21,7 @@ require ( | ||||
| 	k8s.io/client-go v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 | ||||
| 	sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 | ||||
| 	sigs.k8s.io/yaml v1.3.0 | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/cli-runtime/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/cli-runtime/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -249,8 +249,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= | ||||
|   | ||||
| @@ -28,7 +28,7 @@ require ( | ||||
| 	k8s.io/apimachinery v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 | ||||
| 	sigs.k8s.io/yaml v1.3.0 | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/client-go/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/client-go/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -166,8 +166,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -17,7 +17,7 @@ require ( | ||||
| 	k8s.io/component-helpers v0.0.0 | ||||
| 	k8s.io/controller-manager v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| ) | ||||
|  | ||||
| require ( | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/cloud-provider/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/cloud-provider/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -801,8 +801,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= | ||||
| rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||||
| rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||||
|   | ||||
| @@ -27,7 +27,7 @@ require ( | ||||
| 	gopkg.in/inf.v0 v0.9.1 // indirect | ||||
| 	gopkg.in/yaml.v2 v2.4.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect | ||||
| ) | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/cluster-bootstrap/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/cluster-bootstrap/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -109,8 +109,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
| k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -45,7 +45,7 @@ require ( | ||||
| 	gopkg.in/yaml.v2 v2.4.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| 	k8s.io/klog/v2 v2.100.1 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/yaml v1.3.0 // indirect | ||||
| ) | ||||
|   | ||||
| @@ -133,8 +133,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -27,7 +27,7 @@ require ( | ||||
| 	k8s.io/apimachinery v0.0.0 | ||||
| 	k8s.io/client-go v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd | ||||
| ) | ||||
|  | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/component-base/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/component-base/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -733,8 +733,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= | ||||
| rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||||
| rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||||
|   | ||||
| @@ -10,7 +10,7 @@ require ( | ||||
| 	k8s.io/apimachinery v0.0.0 | ||||
| 	k8s.io/client-go v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| ) | ||||
|  | ||||
| require ( | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/component-helpers/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/component-helpers/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -158,8 +158,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -14,7 +14,7 @@ require ( | ||||
| 	k8s.io/client-go v0.0.0 | ||||
| 	k8s.io/component-base v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| ) | ||||
|  | ||||
| require ( | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/controller-manager/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/controller-manager/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -796,8 +796,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= | ||||
| rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||||
| rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||||
|   | ||||
| @@ -26,7 +26,7 @@ require ( | ||||
| 	gopkg.in/inf.v0 v0.9.1 // indirect | ||||
| 	gopkg.in/yaml.v2 v2.4.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect | ||||
| ) | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/csi-translation-lib/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/csi-translation-lib/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -107,8 +107,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
| k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -50,7 +50,7 @@ require ( | ||||
| 	gopkg.in/yaml.v2 v2.4.0 // indirect | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect | ||||
| 	sigs.k8s.io/yaml v1.3.0 // indirect | ||||
|   | ||||
| @@ -181,8 +181,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -13,7 +13,7 @@ require ( | ||||
| 	k8s.io/client-go v0.0.0 | ||||
| 	k8s.io/component-base v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| ) | ||||
|  | ||||
| require ( | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/endpointslice/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/endpointslice/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -212,8 +212,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -21,7 +21,7 @@ require ( | ||||
| 	golang.org/x/time v0.3.0 // indirect | ||||
| 	google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect | ||||
| 	google.golang.org/protobuf v1.31.0 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| ) | ||||
|  | ||||
| replace ( | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/kms/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/kms/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -110,8 +110,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
| k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= | ||||
| sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= | ||||
|   | ||||
| @@ -19,7 +19,7 @@ require ( | ||||
| 	google.golang.org/grpc v1.54.0 // indirect | ||||
| 	google.golang.org/protobuf v1.31.0 // indirect | ||||
| 	k8s.io/client-go v0.0.0 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| ) | ||||
|  | ||||
| replace ( | ||||
|   | ||||
| @@ -55,5 +55,5 @@ google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs | ||||
| google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= | ||||
| k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
|   | ||||
| @@ -21,7 +21,7 @@ require ( | ||||
| 	k8s.io/component-base v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 | ||||
| ) | ||||
|  | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/kube-aggregator/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/kube-aggregator/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -806,8 +806,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= | ||||
| rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||||
| rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||||
|   | ||||
| @@ -25,7 +25,7 @@ require ( | ||||
| 	gopkg.in/yaml.v2 v2.4.0 // indirect | ||||
| 	k8s.io/component-base v0.0.0 // indirect | ||||
| 	k8s.io/klog/v2 v2.100.1 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect | ||||
| ) | ||||
|   | ||||
| @@ -161,8 +161,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
| k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
|   | ||||
| @@ -37,7 +37,7 @@ require ( | ||||
| 	gopkg.in/inf.v0 v0.9.1 // indirect | ||||
| 	gopkg.in/yaml.v2 v2.4.0 // indirect | ||||
| 	k8s.io/klog/v2 v2.100.1 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect | ||||
| 	sigs.k8s.io/yaml v1.3.0 // indirect | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/kube-proxy/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/kube-proxy/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -170,8 +170,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
| k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -24,7 +24,7 @@ require ( | ||||
| 	gopkg.in/inf.v0 v0.9.1 // indirect | ||||
| 	gopkg.in/yaml.v2 v2.4.0 // indirect | ||||
| 	k8s.io/klog/v2 v2.100.1 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect | ||||
| ) | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/kube-scheduler/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/kube-scheduler/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -139,8 +139,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
| k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -39,7 +39,7 @@ require ( | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 | ||||
| 	k8s.io/metrics v0.0.0 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd | ||||
| 	sigs.k8s.io/kustomize/kustomize/v5 v5.0.4-0.20230601165947-6ce0bf390ce3 | ||||
| 	sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/kubectl/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/kubectl/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -322,8 +322,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= | ||||
|   | ||||
| @@ -16,7 +16,7 @@ require ( | ||||
| 	k8s.io/component-base v0.0.0 | ||||
| 	k8s.io/cri-api v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| ) | ||||
|  | ||||
| require ( | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/kubelet/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/kubelet/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -247,8 +247,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
|   | ||||
| @@ -26,7 +26,7 @@ require ( | ||||
| 	k8s.io/cloud-provider v0.0.0 | ||||
| 	k8s.io/component-base v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/yaml v1.3.0 | ||||
| ) | ||||
|  | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/legacy-cloud-providers/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/legacy-cloud-providers/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -807,8 +807,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= | ||||
| rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||||
| rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||||
|   | ||||
| @@ -51,7 +51,7 @@ require ( | ||||
| 	k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect | ||||
| 	k8s.io/klog/v2 v2.100.1 // indirect | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect | ||||
| 	sigs.k8s.io/yaml v1.3.0 // indirect | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/metrics/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/metrics/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -169,8 +169,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -9,7 +9,7 @@ require ( | ||||
| 	github.com/stretchr/testify v1.8.2 | ||||
| 	golang.org/x/sys v0.10.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| ) | ||||
|  | ||||
| require ( | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/mount-utils/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/mount-utils/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -38,5 +38,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= | ||||
| gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= | ||||
| k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
|   | ||||
| @@ -16,7 +16,7 @@ require ( | ||||
| 	k8s.io/client-go v0.0.0 | ||||
| 	k8s.io/component-base v0.0.0 | ||||
| 	k8s.io/klog/v2 v2.100.1 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/yaml v1.3.0 | ||||
| ) | ||||
|  | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/pod-security-admission/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/pod-security-admission/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -796,8 +796,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= | ||||
| rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||||
| rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||||
|   | ||||
| @@ -13,7 +13,7 @@ require ( | ||||
| 	k8s.io/code-generator v0.0.0 | ||||
| 	k8s.io/component-base v0.0.0 | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 | ||||
| ) | ||||
|  | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/sample-apiserver/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/sample-apiserver/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -805,8 +805,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= | ||||
| rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= | ||||
| rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= | ||||
|   | ||||
| @@ -59,7 +59,7 @@ require ( | ||||
| 	k8s.io/apimachinery v0.0.0 // indirect | ||||
| 	k8s.io/klog/v2 v2.100.1 // indirect | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect | ||||
| 	sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/sample-cli-plugin/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/sample-cli-plugin/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -249,8 +249,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= | ||||
|   | ||||
| @@ -51,7 +51,7 @@ require ( | ||||
| 	gopkg.in/yaml.v3 v3.0.1 // indirect | ||||
| 	k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect | ||||
| 	k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect | ||||
| 	k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||||
| 	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||||
| 	sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect | ||||
| 	sigs.k8s.io/yaml v1.3.0 // indirect | ||||
|   | ||||
							
								
								
									
										4
									
								
								staging/src/k8s.io/sample-controller/go.sum
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										4
									
								
								staging/src/k8s.io/sample-controller/go.sum
									
									
									
										generated
									
									
									
								
							| @@ -171,8 +171,8 @@ k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= | ||||
| k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= | ||||
| k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= | ||||
| k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= | ||||
| k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= | ||||
| sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= | ||||
| sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= | ||||
|   | ||||
| @@ -62,7 +62,7 @@ import ( | ||||
| 	testutil "k8s.io/kubernetes/test/utils" | ||||
| 	imageutils "k8s.io/kubernetes/test/utils/image" | ||||
| 	admissionapi "k8s.io/pod-security-admission/api" | ||||
| 	utilpointer "k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| @@ -670,11 +670,6 @@ func failureTrap(ctx context.Context, c clientset.Interface, ns string) { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func intOrStrP(num int) *intstr.IntOrString { | ||||
| 	intstr := intstr.FromInt32(int32(num)) | ||||
| 	return &intstr | ||||
| } | ||||
|  | ||||
| func stopDeployment(ctx context.Context, c clientset.Interface, ns, deploymentName string) { | ||||
| 	deployment, err := c.AppsV1().Deployments(ns).Get(ctx, deploymentName, metav1.GetOptions{}) | ||||
| 	framework.ExpectNoError(err) | ||||
| @@ -835,7 +830,7 @@ func testDeploymentCleanUpPolicy(ctx context.Context, f *framework.Framework) { | ||||
| 	} | ||||
| 	rsName := "test-cleanup-controller" | ||||
| 	replicas := int32(1) | ||||
| 	revisionHistoryLimit := utilpointer.Int32(0) | ||||
| 	revisionHistoryLimit := ptr.To[int32](0) | ||||
| 	_, err := c.AppsV1().ReplicaSets(ns).Create(ctx, newRS(rsName, replicas, rsPodLabels, WebserverImageName, WebserverImage, nil), metav1.CreateOptions{}) | ||||
| 	framework.ExpectNoError(err) | ||||
|  | ||||
| @@ -928,8 +923,8 @@ func testRolloverDeployment(ctx context.Context, f *framework.Framework) { | ||||
| 	framework.Logf("Creating deployment %q", deploymentName) | ||||
| 	newDeployment := e2edeployment.NewDeployment(deploymentName, deploymentReplicas, deploymentPodLabels, deploymentImageName, deploymentImage, deploymentStrategyType) | ||||
| 	newDeployment.Spec.Strategy.RollingUpdate = &appsv1.RollingUpdateDeployment{ | ||||
| 		MaxUnavailable: intOrStrP(0), | ||||
| 		MaxSurge:       intOrStrP(1), | ||||
| 		MaxUnavailable: ptr.To(intstr.FromInt32(0)), | ||||
| 		MaxSurge:       ptr.To(intstr.FromInt32(1)), | ||||
| 	} | ||||
| 	newDeployment.Spec.MinReadySeconds = int32(10) | ||||
| 	_, err = c.AppsV1().Deployments(ns).Create(ctx, newDeployment, metav1.CreateOptions{}) | ||||
| @@ -1197,8 +1192,8 @@ func testProportionalScalingDeployment(ctx context.Context, f *framework.Framewo | ||||
| 	deploymentName := "webserver-deployment" | ||||
| 	d := e2edeployment.NewDeployment(deploymentName, replicas, podLabels, WebserverImageName, WebserverImage, appsv1.RollingUpdateDeploymentStrategyType) | ||||
| 	d.Spec.Strategy.RollingUpdate = new(appsv1.RollingUpdateDeployment) | ||||
| 	d.Spec.Strategy.RollingUpdate.MaxSurge = intOrStrP(3) | ||||
| 	d.Spec.Strategy.RollingUpdate.MaxUnavailable = intOrStrP(2) | ||||
| 	d.Spec.Strategy.RollingUpdate.MaxSurge = ptr.To(intstr.FromInt32(3)) | ||||
| 	d.Spec.Strategy.RollingUpdate.MaxUnavailable = ptr.To(intstr.FromInt32(2)) | ||||
|  | ||||
| 	framework.Logf("Creating deployment %q", deploymentName) | ||||
| 	deployment, err := c.AppsV1().Deployments(ns).Create(ctx, d, metav1.CreateOptions{}) | ||||
| @@ -1380,8 +1375,8 @@ func testRollingUpdateDeploymentWithLocalTrafficLoadBalancer(ctx context.Context | ||||
| 	// performing a rollout. | ||||
| 	setAffinities(d, false) | ||||
| 	d.Spec.Strategy.RollingUpdate = &appsv1.RollingUpdateDeployment{ | ||||
| 		MaxSurge:       intOrStrP(1), | ||||
| 		MaxUnavailable: intOrStrP(0), | ||||
| 		MaxSurge:       ptr.To(intstr.FromInt32(1)), | ||||
| 		MaxUnavailable: ptr.To(intstr.FromInt32(0)), | ||||
| 	} | ||||
| 	deployment, err := c.AppsV1().Deployments(ns).Create(ctx, d, metav1.CreateOptions{}) | ||||
| 	framework.ExpectNoError(err) | ||||
|   | ||||
| @@ -33,7 +33,7 @@ import ( | ||||
| 	deploymentutil "k8s.io/kubernetes/pkg/controller/deployment/util" | ||||
| 	"k8s.io/kubernetes/test/integration/framework" | ||||
| 	testutil "k8s.io/kubernetes/test/utils" | ||||
| 	"k8s.io/utils/pointer" | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| func TestNewDeployment(t *testing.T) { | ||||
| @@ -695,8 +695,8 @@ func TestScaledRolloutDeployment(t *testing.T) { | ||||
| 	var err error | ||||
| 	replicas := int32(10) | ||||
| 	tester := &deploymentTester{t: t, c: c, deployment: newDeployment(name, ns.Name, replicas)} | ||||
| 	tester.deployment.Spec.Strategy.RollingUpdate.MaxSurge = intOrStrP(3) | ||||
| 	tester.deployment.Spec.Strategy.RollingUpdate.MaxUnavailable = intOrStrP(2) | ||||
| 	tester.deployment.Spec.Strategy.RollingUpdate.MaxSurge = ptr.To(intstr.FromInt32(3)) | ||||
| 	tester.deployment.Spec.Strategy.RollingUpdate.MaxUnavailable = ptr.To(intstr.FromInt32(2)) | ||||
| 	tester.deployment, err = c.AppsV1().Deployments(ns.Name).Create(context.TODO(), tester.deployment, metav1.CreateOptions{}) | ||||
| 	if err != nil { | ||||
| 		t.Fatalf("failed to create deployment %q: %v", name, err) | ||||
| @@ -912,7 +912,7 @@ func TestSpecReplicasChange(t *testing.T) { | ||||
| 	var oldGeneration int64 | ||||
| 	tester.deployment, err = tester.updateDeployment(func(update *apps.Deployment) { | ||||
| 		oldGeneration = update.Generation | ||||
| 		update.Spec.RevisionHistoryLimit = pointer.Int32(4) | ||||
| 		update.Spec.RevisionHistoryLimit = ptr.To[int32](4) | ||||
| 	}) | ||||
| 	if err != nil { | ||||
| 		t.Fatalf("failed updating deployment %q: %v", tester.deployment.Name, err) | ||||
| @@ -945,7 +945,7 @@ func TestDeploymentAvailableCondition(t *testing.T) { | ||||
| 	// Assign a high value to the deployment's minReadySeconds | ||||
| 	tester.deployment.Spec.MinReadySeconds = 3600 | ||||
| 	// progressDeadlineSeconds must be greater than minReadySeconds | ||||
| 	tester.deployment.Spec.ProgressDeadlineSeconds = pointer.Int32(7200) | ||||
| 	tester.deployment.Spec.ProgressDeadlineSeconds = ptr.To[int32](7200) | ||||
| 	var err error | ||||
| 	tester.deployment, err = c.AppsV1().Deployments(ns.Name).Create(context.TODO(), tester.deployment, metav1.CreateOptions{}) | ||||
| 	if err != nil { | ||||
|   | ||||
| @@ -26,7 +26,6 @@ import ( | ||||
| 	apps "k8s.io/api/apps/v1" | ||||
| 	v1 "k8s.io/api/core/v1" | ||||
| 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||||
| 	"k8s.io/apimachinery/pkg/util/intstr" | ||||
| 	"k8s.io/apimachinery/pkg/util/wait" | ||||
| 	"k8s.io/client-go/informers" | ||||
| 	clientset "k8s.io/client-go/kubernetes" | ||||
| @@ -186,11 +185,6 @@ func markPodReady(c clientset.Interface, ns string, pod *v1.Pod) error { | ||||
| 	return err | ||||
| } | ||||
|  | ||||
| func intOrStrP(num int) *intstr.IntOrString { | ||||
| 	intstr := intstr.FromInt32(int32(num)) | ||||
| 	return &intstr | ||||
| } | ||||
|  | ||||
| // markUpdatedPodsReady manually marks updated Deployment pods status to ready, | ||||
| // until the deployment is complete | ||||
| func (d *deploymentTester) markUpdatedPodsReady(wg *sync.WaitGroup) { | ||||
|   | ||||
							
								
								
									
										281
									
								
								vendor/k8s.io/utils/pointer/pointer.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										281
									
								
								vendor/k8s.io/utils/pointer/pointer.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -14,12 +14,15 @@ See the License for the specific language governing permissions and | ||||
| limitations under the License. | ||||
| */ | ||||
|  | ||||
| // Deprecated: Use functions in k8s.io/utils/ptr instead: ptr.To to obtain | ||||
| // a pointer, ptr.Deref to dereference a pointer, ptr.Equal to compare | ||||
| // dereferenced pointers. | ||||
| package pointer | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"reflect" | ||||
| 	"time" | ||||
|  | ||||
| 	"k8s.io/utils/ptr" | ||||
| ) | ||||
|  | ||||
| // AllPtrFieldsNil tests whether all pointer fields in a struct are nil.  This is useful when, | ||||
| @@ -28,383 +31,219 @@ import ( | ||||
| // | ||||
| // This function is only valid for structs and pointers to structs.  Any other | ||||
| // type will cause a panic.  Passing a typed nil pointer will return true. | ||||
| func AllPtrFieldsNil(obj interface{}) bool { | ||||
| 	v := reflect.ValueOf(obj) | ||||
| 	if !v.IsValid() { | ||||
| 		panic(fmt.Sprintf("reflect.ValueOf() produced a non-valid Value for %#v", obj)) | ||||
| 	} | ||||
| 	if v.Kind() == reflect.Ptr { | ||||
| 		if v.IsNil() { | ||||
| 			return true | ||||
| 		} | ||||
| 		v = v.Elem() | ||||
| 	} | ||||
| 	for i := 0; i < v.NumField(); i++ { | ||||
| 		if v.Field(i).Kind() == reflect.Ptr && !v.Field(i).IsNil() { | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| 	return true | ||||
| } | ||||
| // | ||||
| // Deprecated: Use ptr.AllPtrFieldsNil instead. | ||||
| var AllPtrFieldsNil = ptr.AllPtrFieldsNil | ||||
|  | ||||
| // Int returns a pointer to an int | ||||
| func Int(i int) *int { | ||||
| 	return &i | ||||
| } | ||||
| // Int returns a pointer to an int. | ||||
| var Int = ptr.To[int] | ||||
|  | ||||
| // IntPtr is a function variable referring to Int. | ||||
| // | ||||
| // Deprecated: Use Int instead. | ||||
| // Deprecated: Use ptr.To instead. | ||||
| var IntPtr = Int // for back-compat | ||||
|  | ||||
| // IntDeref dereferences the int ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func IntDeref(ptr *int, def int) int { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var IntDeref = ptr.Deref[int] | ||||
|  | ||||
| // IntPtrDerefOr is a function variable referring to IntDeref. | ||||
| // | ||||
| // Deprecated: Use IntDeref instead. | ||||
| // Deprecated: Use ptr.Deref instead. | ||||
| var IntPtrDerefOr = IntDeref // for back-compat | ||||
|  | ||||
| // Int32 returns a pointer to an int32. | ||||
| func Int32(i int32) *int32 { | ||||
| 	return &i | ||||
| } | ||||
| var Int32 = ptr.To[int32] | ||||
|  | ||||
| // Int32Ptr is a function variable referring to Int32. | ||||
| // | ||||
| // Deprecated: Use Int32 instead. | ||||
| // Deprecated: Use ptr.To instead. | ||||
| var Int32Ptr = Int32 // for back-compat | ||||
|  | ||||
| // Int32Deref dereferences the int32 ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func Int32Deref(ptr *int32, def int32) int32 { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var Int32Deref = ptr.Deref[int32] | ||||
|  | ||||
| // Int32PtrDerefOr is a function variable referring to Int32Deref. | ||||
| // | ||||
| // Deprecated: Use Int32Deref instead. | ||||
| // Deprecated: Use ptr.Deref instead. | ||||
| var Int32PtrDerefOr = Int32Deref // for back-compat | ||||
|  | ||||
| // Int32Equal returns true if both arguments are nil or both arguments | ||||
| // dereference to the same value. | ||||
| func Int32Equal(a, b *int32) bool { | ||||
| 	if (a == nil) != (b == nil) { | ||||
| 		return false | ||||
| 	} | ||||
| 	if a == nil { | ||||
| 		return true | ||||
| 	} | ||||
| 	return *a == *b | ||||
| } | ||||
| var Int32Equal = ptr.Equal[int32] | ||||
|  | ||||
| // Uint returns a pointer to an uint | ||||
| func Uint(i uint) *uint { | ||||
| 	return &i | ||||
| } | ||||
| var Uint = ptr.To[uint] | ||||
|  | ||||
| // UintPtr is a function variable referring to Uint. | ||||
| // | ||||
| // Deprecated: Use Uint instead. | ||||
| // Deprecated: Use ptr.To instead. | ||||
| var UintPtr = Uint // for back-compat | ||||
|  | ||||
| // UintDeref dereferences the uint ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func UintDeref(ptr *uint, def uint) uint { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var UintDeref = ptr.Deref[uint] | ||||
|  | ||||
| // UintPtrDerefOr is a function variable referring to UintDeref. | ||||
| // | ||||
| // Deprecated: Use UintDeref instead. | ||||
| // Deprecated: Use ptr.Deref instead. | ||||
| var UintPtrDerefOr = UintDeref // for back-compat | ||||
|  | ||||
| // Uint32 returns a pointer to an uint32. | ||||
| func Uint32(i uint32) *uint32 { | ||||
| 	return &i | ||||
| } | ||||
| var Uint32 = ptr.To[uint32] | ||||
|  | ||||
| // Uint32Ptr is a function variable referring to Uint32. | ||||
| // | ||||
| // Deprecated: Use Uint32 instead. | ||||
| // Deprecated: Use ptr.To instead. | ||||
| var Uint32Ptr = Uint32 // for back-compat | ||||
|  | ||||
| // Uint32Deref dereferences the uint32 ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func Uint32Deref(ptr *uint32, def uint32) uint32 { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var Uint32Deref = ptr.Deref[uint32] | ||||
|  | ||||
| // Uint32PtrDerefOr is a function variable referring to Uint32Deref. | ||||
| // | ||||
| // Deprecated: Use Uint32Deref instead. | ||||
| // Deprecated: Use ptr.Deref instead. | ||||
| var Uint32PtrDerefOr = Uint32Deref // for back-compat | ||||
|  | ||||
| // Uint32Equal returns true if both arguments are nil or both arguments | ||||
| // dereference to the same value. | ||||
| func Uint32Equal(a, b *uint32) bool { | ||||
| 	if (a == nil) != (b == nil) { | ||||
| 		return false | ||||
| 	} | ||||
| 	if a == nil { | ||||
| 		return true | ||||
| 	} | ||||
| 	return *a == *b | ||||
| } | ||||
| var Uint32Equal = ptr.Equal[uint32] | ||||
|  | ||||
| // Int64 returns a pointer to an int64. | ||||
| func Int64(i int64) *int64 { | ||||
| 	return &i | ||||
| } | ||||
| var Int64 = ptr.To[int64] | ||||
|  | ||||
| // Int64Ptr is a function variable referring to Int64. | ||||
| // | ||||
| // Deprecated: Use Int64 instead. | ||||
| // Deprecated: Use ptr.To instead. | ||||
| var Int64Ptr = Int64 // for back-compat | ||||
|  | ||||
| // Int64Deref dereferences the int64 ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func Int64Deref(ptr *int64, def int64) int64 { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var Int64Deref = ptr.Deref[int64] | ||||
|  | ||||
| // Int64PtrDerefOr is a function variable referring to Int64Deref. | ||||
| // | ||||
| // Deprecated: Use Int64Deref instead. | ||||
| // Deprecated: Use ptr.Deref instead. | ||||
| var Int64PtrDerefOr = Int64Deref // for back-compat | ||||
|  | ||||
| // Int64Equal returns true if both arguments are nil or both arguments | ||||
| // dereference to the same value. | ||||
| func Int64Equal(a, b *int64) bool { | ||||
| 	if (a == nil) != (b == nil) { | ||||
| 		return false | ||||
| 	} | ||||
| 	if a == nil { | ||||
| 		return true | ||||
| 	} | ||||
| 	return *a == *b | ||||
| } | ||||
| var Int64Equal = ptr.Equal[int64] | ||||
|  | ||||
| // Uint64 returns a pointer to an uint64. | ||||
| func Uint64(i uint64) *uint64 { | ||||
| 	return &i | ||||
| } | ||||
| var Uint64 = ptr.To[uint64] | ||||
|  | ||||
| // Uint64Ptr is a function variable referring to Uint64. | ||||
| // | ||||
| // Deprecated: Use Uint64 instead. | ||||
| // Deprecated: Use ptr.To instead. | ||||
| var Uint64Ptr = Uint64 // for back-compat | ||||
|  | ||||
| // Uint64Deref dereferences the uint64 ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func Uint64Deref(ptr *uint64, def uint64) uint64 { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var Uint64Deref = ptr.Deref[uint64] | ||||
|  | ||||
| // Uint64PtrDerefOr is a function variable referring to Uint64Deref. | ||||
| // | ||||
| // Deprecated: Use Uint64Deref instead. | ||||
| // Deprecated: Use ptr.Deref instead. | ||||
| var Uint64PtrDerefOr = Uint64Deref // for back-compat | ||||
|  | ||||
| // Uint64Equal returns true if both arguments are nil or both arguments | ||||
| // dereference to the same value. | ||||
| func Uint64Equal(a, b *uint64) bool { | ||||
| 	if (a == nil) != (b == nil) { | ||||
| 		return false | ||||
| 	} | ||||
| 	if a == nil { | ||||
| 		return true | ||||
| 	} | ||||
| 	return *a == *b | ||||
| } | ||||
| var Uint64Equal = ptr.Equal[uint64] | ||||
|  | ||||
| // Bool returns a pointer to a bool. | ||||
| func Bool(b bool) *bool { | ||||
| 	return &b | ||||
| } | ||||
| var Bool = ptr.To[bool] | ||||
|  | ||||
| // BoolPtr is a function variable referring to Bool. | ||||
| // | ||||
| // Deprecated: Use Bool instead. | ||||
| // Deprecated: Use ptr.To instead. | ||||
| var BoolPtr = Bool // for back-compat | ||||
|  | ||||
| // BoolDeref dereferences the bool ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func BoolDeref(ptr *bool, def bool) bool { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var BoolDeref = ptr.Deref[bool] | ||||
|  | ||||
| // BoolPtrDerefOr is a function variable referring to BoolDeref. | ||||
| // | ||||
| // Deprecated: Use BoolDeref instead. | ||||
| // Deprecated: Use ptr.Deref instead. | ||||
| var BoolPtrDerefOr = BoolDeref // for back-compat | ||||
|  | ||||
| // BoolEqual returns true if both arguments are nil or both arguments | ||||
| // dereference to the same value. | ||||
| func BoolEqual(a, b *bool) bool { | ||||
| 	if (a == nil) != (b == nil) { | ||||
| 		return false | ||||
| 	} | ||||
| 	if a == nil { | ||||
| 		return true | ||||
| 	} | ||||
| 	return *a == *b | ||||
| } | ||||
| var BoolEqual = ptr.Equal[bool] | ||||
|  | ||||
| // String returns a pointer to a string. | ||||
| func String(s string) *string { | ||||
| 	return &s | ||||
| } | ||||
| var String = ptr.To[string] | ||||
|  | ||||
| // StringPtr is a function variable referring to String. | ||||
| // | ||||
| // Deprecated: Use String instead. | ||||
| // Deprecated: Use ptr.To instead. | ||||
| var StringPtr = String // for back-compat | ||||
|  | ||||
| // StringDeref dereferences the string ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func StringDeref(ptr *string, def string) string { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var StringDeref = ptr.Deref[string] | ||||
|  | ||||
| // StringPtrDerefOr is a function variable referring to StringDeref. | ||||
| // | ||||
| // Deprecated: Use StringDeref instead. | ||||
| // Deprecated: Use ptr.Deref instead. | ||||
| var StringPtrDerefOr = StringDeref // for back-compat | ||||
|  | ||||
| // StringEqual returns true if both arguments are nil or both arguments | ||||
| // dereference to the same value. | ||||
| func StringEqual(a, b *string) bool { | ||||
| 	if (a == nil) != (b == nil) { | ||||
| 		return false | ||||
| 	} | ||||
| 	if a == nil { | ||||
| 		return true | ||||
| 	} | ||||
| 	return *a == *b | ||||
| } | ||||
| var StringEqual = ptr.Equal[string] | ||||
|  | ||||
| // Float32 returns a pointer to a float32. | ||||
| func Float32(i float32) *float32 { | ||||
| 	return &i | ||||
| } | ||||
| var Float32 = ptr.To[float32] | ||||
|  | ||||
| // Float32Ptr is a function variable referring to Float32. | ||||
| // | ||||
| // Deprecated: Use Float32 instead. | ||||
| // Deprecated: Use ptr.To instead. | ||||
| var Float32Ptr = Float32 | ||||
|  | ||||
| // Float32Deref dereferences the float32 ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func Float32Deref(ptr *float32, def float32) float32 { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var Float32Deref = ptr.Deref[float32] | ||||
|  | ||||
| // Float32PtrDerefOr is a function variable referring to Float32Deref. | ||||
| // | ||||
| // Deprecated: Use Float32Deref instead. | ||||
| // Deprecated: Use ptr.Deref instead. | ||||
| var Float32PtrDerefOr = Float32Deref // for back-compat | ||||
|  | ||||
| // Float32Equal returns true if both arguments are nil or both arguments | ||||
| // dereference to the same value. | ||||
| func Float32Equal(a, b *float32) bool { | ||||
| 	if (a == nil) != (b == nil) { | ||||
| 		return false | ||||
| 	} | ||||
| 	if a == nil { | ||||
| 		return true | ||||
| 	} | ||||
| 	return *a == *b | ||||
| } | ||||
| var Float32Equal = ptr.Equal[float32] | ||||
|  | ||||
| // Float64 returns a pointer to a float64. | ||||
| func Float64(i float64) *float64 { | ||||
| 	return &i | ||||
| } | ||||
| var Float64 = ptr.To[float64] | ||||
|  | ||||
| // Float64Ptr is a function variable referring to Float64. | ||||
| // | ||||
| // Deprecated: Use Float64 instead. | ||||
| // Deprecated: Use ptr.To instead. | ||||
| var Float64Ptr = Float64 | ||||
|  | ||||
| // Float64Deref dereferences the float64 ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func Float64Deref(ptr *float64, def float64) float64 { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var Float64Deref = ptr.Deref[float64] | ||||
|  | ||||
| // Float64PtrDerefOr is a function variable referring to Float64Deref. | ||||
| // | ||||
| // Deprecated: Use Float64Deref instead. | ||||
| // Deprecated: Use ptr.Deref instead. | ||||
| var Float64PtrDerefOr = Float64Deref // for back-compat | ||||
|  | ||||
| // Float64Equal returns true if both arguments are nil or both arguments | ||||
| // dereference to the same value. | ||||
| func Float64Equal(a, b *float64) bool { | ||||
| 	if (a == nil) != (b == nil) { | ||||
| 		return false | ||||
| 	} | ||||
| 	if a == nil { | ||||
| 		return true | ||||
| 	} | ||||
| 	return *a == *b | ||||
| } | ||||
| var Float64Equal = ptr.Equal[float64] | ||||
|  | ||||
| // Duration returns a pointer to a time.Duration. | ||||
| func Duration(d time.Duration) *time.Duration { | ||||
| 	return &d | ||||
| } | ||||
| var Duration = ptr.To[time.Duration] | ||||
|  | ||||
| // DurationDeref dereferences the time.Duration ptr and returns it if not nil, or else | ||||
| // returns def. | ||||
| func DurationDeref(ptr *time.Duration, def time.Duration) time.Duration { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
| var DurationDeref = ptr.Deref[time.Duration] | ||||
|  | ||||
| // DurationEqual returns true if both arguments are nil or both arguments | ||||
| // dereference to the same value. | ||||
| func DurationEqual(a, b *time.Duration) bool { | ||||
| 	if (a == nil) != (b == nil) { | ||||
| 		return false | ||||
| 	} | ||||
| 	if a == nil { | ||||
| 		return true | ||||
| 	} | ||||
| 	return *a == *b | ||||
| } | ||||
| var DurationEqual = ptr.Equal[time.Duration] | ||||
|   | ||||
							
								
								
									
										10
									
								
								vendor/k8s.io/utils/ptr/OWNERS
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								vendor/k8s.io/utils/ptr/OWNERS
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| # See the OWNERS docs at https://go.k8s.io/owners | ||||
|  | ||||
| approvers: | ||||
| - apelisse | ||||
| - stewart-yu | ||||
| - thockin | ||||
| reviewers: | ||||
| - apelisse | ||||
| - stewart-yu | ||||
| - thockin | ||||
							
								
								
									
										3
									
								
								vendor/k8s.io/utils/ptr/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								vendor/k8s.io/utils/ptr/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| # Pointer | ||||
|  | ||||
| This package provides some functions for pointer-based operations. | ||||
							
								
								
									
										73
									
								
								vendor/k8s.io/utils/ptr/ptr.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								vendor/k8s.io/utils/ptr/ptr.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,73 @@ | ||||
| /* | ||||
| Copyright 2023 The Kubernetes Authors. | ||||
|  | ||||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| you may not use this file except in compliance with the License. | ||||
| You may obtain a copy of the License at | ||||
|  | ||||
|     http://www.apache.org/licenses/LICENSE-2.0 | ||||
|  | ||||
| Unless required by applicable law or agreed to in writing, software | ||||
| distributed under the License is distributed on an "AS IS" BASIS, | ||||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| See the License for the specific language governing permissions and | ||||
| limitations under the License. | ||||
| */ | ||||
|  | ||||
| package ptr | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"reflect" | ||||
| ) | ||||
|  | ||||
| // AllPtrFieldsNil tests whether all pointer fields in a struct are nil.  This is useful when, | ||||
| // for example, an API struct is handled by plugins which need to distinguish | ||||
| // "no plugin accepted this spec" from "this spec is empty". | ||||
| // | ||||
| // This function is only valid for structs and pointers to structs.  Any other | ||||
| // type will cause a panic.  Passing a typed nil pointer will return true. | ||||
| func AllPtrFieldsNil(obj interface{}) bool { | ||||
| 	v := reflect.ValueOf(obj) | ||||
| 	if !v.IsValid() { | ||||
| 		panic(fmt.Sprintf("reflect.ValueOf() produced a non-valid Value for %#v", obj)) | ||||
| 	} | ||||
| 	if v.Kind() == reflect.Ptr { | ||||
| 		if v.IsNil() { | ||||
| 			return true | ||||
| 		} | ||||
| 		v = v.Elem() | ||||
| 	} | ||||
| 	for i := 0; i < v.NumField(); i++ { | ||||
| 		if v.Field(i).Kind() == reflect.Ptr && !v.Field(i).IsNil() { | ||||
| 			return false | ||||
| 		} | ||||
| 	} | ||||
| 	return true | ||||
| } | ||||
|  | ||||
| // To returns a pointer to the given value. | ||||
| func To[T any](v T) *T { | ||||
| 	return &v | ||||
| } | ||||
|  | ||||
| // Deref dereferences ptr and returns the value it points to if no nil, or else | ||||
| // returns def. | ||||
| func Deref[T any](ptr *T, def T) T { | ||||
| 	if ptr != nil { | ||||
| 		return *ptr | ||||
| 	} | ||||
| 	return def | ||||
| } | ||||
|  | ||||
| // Equal returns true if both arguments are nil or both arguments | ||||
| // dereference to the same value. | ||||
| func Equal[T comparable](a, b *T) bool { | ||||
| 	if (a == nil) != (b == nil) { | ||||
| 		return false | ||||
| 	} | ||||
| 	if a == nil { | ||||
| 		return true | ||||
| 	} | ||||
| 	return *a == *b | ||||
| } | ||||
							
								
								
									
										3
									
								
								vendor/modules.txt
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/modules.txt
									
									
									
									
										vendored
									
									
								
							| @@ -2399,7 +2399,7 @@ k8s.io/sample-apiserver/pkg/registry/wardle/flunder | ||||
| # k8s.io/system-validators v1.8.0 | ||||
| ## explicit; go 1.16 | ||||
| k8s.io/system-validators/validators | ||||
| # k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 | ||||
| # k8s.io/utils v0.0.0-20230726121419-3b25d923346b | ||||
| ## explicit; go 1.18 | ||||
| k8s.io/utils/buffer | ||||
| k8s.io/utils/clock | ||||
| @@ -2418,6 +2418,7 @@ k8s.io/utils/net | ||||
| k8s.io/utils/nsenter | ||||
| k8s.io/utils/path | ||||
| k8s.io/utils/pointer | ||||
| k8s.io/utils/ptr | ||||
| k8s.io/utils/strings | ||||
| k8s.io/utils/strings/slices | ||||
| k8s.io/utils/trace | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Stephen Kitt
					Stephen Kitt