mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-30 21:30:16 +00:00 
			
		
		
		
	Merge pull request #84739 from liggitt/debugging-pointers
Switch debugger configuration fields to pointers
This commit is contained in:
		| @@ -59,10 +59,10 @@ type LeaderElectionConfiguration struct { | |||||||
| // DebuggingConfiguration holds configuration for Debugging related features. | // DebuggingConfiguration holds configuration for Debugging related features. | ||||||
| type DebuggingConfiguration struct { | type DebuggingConfiguration struct { | ||||||
| 	// enableProfiling enables profiling via web interface host:port/debug/pprof/ | 	// enableProfiling enables profiling via web interface host:port/debug/pprof/ | ||||||
| 	EnableProfiling bool `json:"enableProfiling"` | 	EnableProfiling *bool `json:"enableProfiling,omitempty"` | ||||||
| 	// enableContentionProfiling enables lock contention profiling, if | 	// enableContentionProfiling enables lock contention profiling, if | ||||||
| 	// enableProfiling is true. | 	// enableProfiling is true. | ||||||
| 	EnableContentionProfiling bool `json:"enableContentionProfiling"` | 	EnableContentionProfiling *bool `json:"enableContentionProfiling,omitempty"` | ||||||
| } | } | ||||||
|  |  | ||||||
| // ClientConnectionConfiguration contains details for constructing a client. | // ClientConnectionConfiguration contains details for constructing a client. | ||||||
|   | |||||||
| @@ -86,14 +86,22 @@ func autoConvert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnecti | |||||||
| } | } | ||||||
|  |  | ||||||
| func autoConvert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(in *DebuggingConfiguration, out *config.DebuggingConfiguration, s conversion.Scope) error { | func autoConvert_v1alpha1_DebuggingConfiguration_To_config_DebuggingConfiguration(in *DebuggingConfiguration, out *config.DebuggingConfiguration, s conversion.Scope) error { | ||||||
| 	out.EnableProfiling = in.EnableProfiling | 	if err := v1.Convert_Pointer_bool_To_bool(&in.EnableProfiling, &out.EnableProfiling, s); err != nil { | ||||||
| 	out.EnableContentionProfiling = in.EnableContentionProfiling | 		return err | ||||||
|  | 	} | ||||||
|  | 	if err := v1.Convert_Pointer_bool_To_bool(&in.EnableContentionProfiling, &out.EnableContentionProfiling, s); err != nil { | ||||||
|  | 		return err | ||||||
|  | 	} | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  |  | ||||||
| func autoConvert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(in *config.DebuggingConfiguration, out *DebuggingConfiguration, s conversion.Scope) error { | func autoConvert_config_DebuggingConfiguration_To_v1alpha1_DebuggingConfiguration(in *config.DebuggingConfiguration, out *DebuggingConfiguration, s conversion.Scope) error { | ||||||
| 	out.EnableProfiling = in.EnableProfiling | 	if err := v1.Convert_bool_To_Pointer_bool(&in.EnableProfiling, &out.EnableProfiling, s); err != nil { | ||||||
| 	out.EnableContentionProfiling = in.EnableContentionProfiling | 		return err | ||||||
|  | 	} | ||||||
|  | 	if err := v1.Convert_bool_To_Pointer_bool(&in.EnableContentionProfiling, &out.EnableContentionProfiling, s); err != nil { | ||||||
|  | 		return err | ||||||
|  | 	} | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -39,6 +39,16 @@ func (in *ClientConnectionConfiguration) DeepCopy() *ClientConnectionConfigurati | |||||||
| // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. | // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. | ||||||
| func (in *DebuggingConfiguration) DeepCopyInto(out *DebuggingConfiguration) { | func (in *DebuggingConfiguration) DeepCopyInto(out *DebuggingConfiguration) { | ||||||
| 	*out = *in | 	*out = *in | ||||||
|  | 	if in.EnableProfiling != nil { | ||||||
|  | 		in, out := &in.EnableProfiling, &out.EnableProfiling | ||||||
|  | 		*out = new(bool) | ||||||
|  | 		**out = **in | ||||||
|  | 	} | ||||||
|  | 	if in.EnableContentionProfiling != nil { | ||||||
|  | 		in, out := &in.EnableContentionProfiling, &out.EnableContentionProfiling | ||||||
|  | 		*out = new(bool) | ||||||
|  | 		**out = **in | ||||||
|  | 	} | ||||||
| 	return | 	return | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -194,7 +194,7 @@ func (in *GenericControllerManagerConfiguration) DeepCopyInto(out *GenericContro | |||||||
| 		*out = make([]string, len(*in)) | 		*out = make([]string, len(*in)) | ||||||
| 		copy(*out, *in) | 		copy(*out, *in) | ||||||
| 	} | 	} | ||||||
| 	out.Debugging = in.Debugging | 	in.Debugging.DeepCopyInto(&out.Debugging) | ||||||
| 	return | 	return | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -31,7 +31,7 @@ func (in *KubeSchedulerConfiguration) DeepCopyInto(out *KubeSchedulerConfigurati | |||||||
| 	in.AlgorithmSource.DeepCopyInto(&out.AlgorithmSource) | 	in.AlgorithmSource.DeepCopyInto(&out.AlgorithmSource) | ||||||
| 	in.LeaderElection.DeepCopyInto(&out.LeaderElection) | 	in.LeaderElection.DeepCopyInto(&out.LeaderElection) | ||||||
| 	out.ClientConnection = in.ClientConnection | 	out.ClientConnection = in.ClientConnection | ||||||
| 	out.DebuggingConfiguration = in.DebuggingConfiguration | 	in.DebuggingConfiguration.DeepCopyInto(&out.DebuggingConfiguration) | ||||||
| 	if in.BindTimeoutSeconds != nil { | 	if in.BindTimeoutSeconds != nil { | ||||||
| 		in, out := &in.BindTimeoutSeconds, &out.BindTimeoutSeconds | 		in, out := &in.BindTimeoutSeconds, &out.BindTimeoutSeconds | ||||||
| 		*out = new(int64) | 		*out = new(int64) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user