Merge pull request #6276 from inteon/fix_controller_logging_options_defaulting

[BUGFIX] defaulting partial ControllerConfiguration logging options
This commit is contained in:
jetstack-bot 2023-08-17 11:43:31 +02:00 committed by GitHub
commit b9998624a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 56 additions and 185 deletions

View File

@ -114,6 +114,11 @@ to renew certificates at an appropriate time before expiry.`,
os.Exit(1)
}
if err := logf.ValidateAndApply(&controllerConfig.Logging); err != nil {
log.Error(err, "Failed to validate controller flags")
os.Exit(1)
}
if err := options.ValidateControllerFlags(controllerFlags); err != nil {
log.Error(err, "Failed to validate controller flags")
os.Exit(1)
@ -135,6 +140,11 @@ to renew certificates at an appropriate time before expiry.`,
log.Error(err, "Failed to set feature gates from config file")
os.Exit(1)
}
if err := logf.ValidateAndApply(&controllerConfig.Logging); err != nil {
log.Error(err, "Failed to validate controller flags")
os.Exit(1)
}
}
// Start the controller

View File

@ -17,11 +17,11 @@ limitations under the License.
package fuzzer
import (
"time"
fuzz "github.com/google/gofuzz"
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/component-base/logs"
"time"
logsapi "k8s.io/component-base/logs/api/v1"
"github.com/cert-manager/cert-manager/internal/apis/config/controller"
)
@ -69,10 +69,9 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
s.LeaderElectionConfig.HealthzTimeout = defaultTime
s.EnablePprof = true
s.PprofAddress = "something:1234"
temp := logs.NewOptions()
s.Logging = *temp
s.CopiedAnnotationPrefixes = []string{"*", "-kubectl.kubernetes.io/", "-fluxcd.io/", "-argocd.argoproj.io/"}
logsapi.SetRecommendedLoggingConfiguration(&s.Logging)
},
}
}

View File

@ -17,27 +17,9 @@ limitations under the License.
package v1alpha1
import (
controller "github.com/cert-manager/cert-manager/internal/apis/config/controller"
v1alpha1 "github.com/cert-manager/cert-manager/pkg/apis/config/controller/v1alpha1"
conversion "k8s.io/apimachinery/pkg/conversion"
"k8s.io/component-base/logs"
logsapi "k8s.io/component-base/logs/api/v1"
)
func Convert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration(in *v1alpha1.ControllerConfiguration, out *controller.ControllerConfiguration, s conversion.Scope) error {
if err := autoConvert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration(in, out, s); err != nil {
return err
}
return nil
}
func Convert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(in *controller.ControllerConfiguration, out *v1alpha1.ControllerConfiguration, s conversion.Scope) error {
if err := autoConvert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(in, out, s); err != nil {
return err
}
return nil
}
func Convert_Pointer_float32_To_float32(in **float32, out *float32, s conversion.Scope) error {
if *in == nil {
*out = 0
@ -67,19 +49,3 @@ func Convert_int_To_Pointer_int32(in *int, out **int32, s conversion.Scope) erro
*out = &temp
return nil
}
func Convert_Pointer_v1_LoggingConfiguration_To_v1_LoggingConfiguration(in **logsapi.LoggingConfiguration, out *logsapi.LoggingConfiguration, s conversion.Scope) error {
if *in == nil {
temp := logs.NewOptions()
temp.DeepCopyInto(out)
return nil
}
(*in).DeepCopyInto(out)
return nil
}
func Convert_v1_LoggingConfiguration_To_Pointer_v1_LoggingConfiguration(in *logsapi.LoggingConfiguration, out **logsapi.LoggingConfiguration, s conversion.Scope) error {
temp := in.DeepCopy()
*out = temp
return nil
}

View File

@ -1,82 +0,0 @@
/*
Copyright 2021 The cert-manager 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 v1alpha1
import (
"reflect"
"testing"
logsapi "k8s.io/component-base/logs/api/v1"
"k8s.io/component-base/logs"
)
func TestConvert_Pointer_v1_LoggingConfiguration_To_v1_LoggingConfiguration(t *testing.T) {
testInput := logs.NewOptions()
generalInput := &testInput
var nilTestInput *logsapi.LoggingConfiguration = nil
var nilInput = &nilTestInput
testcases := map[string]struct {
in **logsapi.LoggingConfiguration
expected logsapi.LoggingConfiguration
}{
"general case ": {
in: generalInput,
expected: *logs.NewOptions(),
},
"nil case": {
in: nilInput,
expected: *logs.NewOptions(),
},
}
for testName, testcase := range testcases {
out := logsapi.LoggingConfiguration{}
Convert_Pointer_v1_LoggingConfiguration_To_v1_LoggingConfiguration(testcase.in, &out, nil)
if !reflect.DeepEqual(testcase.expected, out) {
t.Errorf("\"%s\": expected \n\t%#v, got \n\t%#v\n", testName, testcase.expected, out)
}
if *testcase.in != nil && *testcase.in == &out {
t.Errorf("\"%s\": expected input and output to have different pointers, but they are the same.\n", testName)
}
}
}
func Test_Convert_v1_LoggingConfiguration_To_Pointer_v1_LoggingConfiguration(t *testing.T) {
testcases := map[string]struct {
in *logsapi.LoggingConfiguration
expected *logsapi.LoggingConfiguration
}{
"general case ": {
in: logs.NewOptions(),
expected: logs.NewOptions(),
},
}
for testName, testcase := range testcases {
temp := &logsapi.LoggingConfiguration{}
out := &temp
Convert_v1_LoggingConfiguration_To_Pointer_v1_LoggingConfiguration(testcase.in, out, nil)
if !reflect.DeepEqual(testcase.expected, *out) {
t.Errorf("\"%s\": expected \n\t%#v, got \n\t%#v\n", testName, testcase.expected, out)
}
}
}

View File

@ -20,7 +20,7 @@ import (
"fmt"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/component-base/logs"
logsapi "k8s.io/component-base/logs/api/v1"
"time"
@ -71,8 +71,6 @@ var (
defaultEnableProfiling = false
defaultProfilerAddr = "localhost:6060"
defaultLogging = logs.NewOptions()
defaultClusterIssuerAmbientCredentials = true
defaultIssuerAmbientCredentials = false
@ -243,9 +241,7 @@ func SetDefaults_ControllerConfiguration(obj *v1alpha1.ControllerConfiguration)
obj.PprofAddress = defaultProfilerAddr
}
if obj.Logging == nil {
obj.Logging = defaultLogging
}
logsapi.SetRecommendedLoggingConfiguration(&obj.Logging)
}
func SetDefaults_LeaderElectionConfig(obj *v1alpha1.LeaderElectionConfig) {

View File

@ -27,10 +27,9 @@ import (
controller "github.com/cert-manager/cert-manager/internal/apis/config/controller"
v1alpha1 "github.com/cert-manager/cert-manager/pkg/apis/config/controller/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
v1 "k8s.io/component-base/logs/api/v1"
)
func init() {
@ -60,6 +59,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ControllerConfiguration)(nil), (*controller.ControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration(a.(*v1alpha1.ControllerConfiguration), b.(*controller.ControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*controller.ControllerConfiguration)(nil), (*v1alpha1.ControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(a.(*controller.ControllerConfiguration), b.(*v1alpha1.ControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.IngressShimConfig)(nil), (*controller.IngressShimConfig)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_IngressShimConfig_To_controller_IngressShimConfig(a.(*v1alpha1.IngressShimConfig), b.(*controller.IngressShimConfig), scope)
}); err != nil {
@ -90,16 +99,6 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddConversionFunc((**v1.LoggingConfiguration)(nil), (*v1.LoggingConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_Pointer_v1_LoggingConfiguration_To_v1_LoggingConfiguration(a.(**v1.LoggingConfiguration), b.(*v1.LoggingConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*controller.ControllerConfiguration)(nil), (*v1alpha1.ControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(a.(*controller.ControllerConfiguration), b.(*v1alpha1.ControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*float32)(nil), (**float32)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_float32_To_Pointer_float32(a.(*float32), b.(**float32), scope)
}); err != nil {
@ -110,22 +109,12 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddConversionFunc((*v1.LoggingConfiguration)(nil), (**v1.LoggingConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_LoggingConfiguration_To_Pointer_v1_LoggingConfiguration(a.(*v1.LoggingConfiguration), b.(**v1.LoggingConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*v1alpha1.ControllerConfiguration)(nil), (*controller.ControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration(a.(*v1alpha1.ControllerConfiguration), b.(*controller.ControllerConfiguration), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1alpha1_ACMEDNS01Config_To_controller_ACMEDNS01Config(in *v1alpha1.ACMEDNS01Config, out *controller.ACMEDNS01Config, s conversion.Scope) error {
out.RecursiveNameservers = *(*[]string)(unsafe.Pointer(&in.RecursiveNameservers))
if err := metav1.Convert_Pointer_bool_To_bool(&in.RecursiveNameserversOnly, &out.RecursiveNameserversOnly, s); err != nil {
if err := v1.Convert_Pointer_bool_To_bool(&in.RecursiveNameserversOnly, &out.RecursiveNameserversOnly, s); err != nil {
return err
}
out.CheckRetryPeriod = time.Duration(in.CheckRetryPeriod)
@ -139,7 +128,7 @@ func Convert_v1alpha1_ACMEDNS01Config_To_controller_ACMEDNS01Config(in *v1alpha1
func autoConvert_controller_ACMEDNS01Config_To_v1alpha1_ACMEDNS01Config(in *controller.ACMEDNS01Config, out *v1alpha1.ACMEDNS01Config, s conversion.Scope) error {
out.RecursiveNameservers = *(*[]string)(unsafe.Pointer(&in.RecursiveNameservers))
if err := metav1.Convert_bool_To_Pointer_bool(&in.RecursiveNameserversOnly, &out.RecursiveNameserversOnly, s); err != nil {
if err := v1.Convert_bool_To_Pointer_bool(&in.RecursiveNameserversOnly, &out.RecursiveNameserversOnly, s); err != nil {
return err
}
out.CheckRetryPeriod = time.Duration(in.CheckRetryPeriod)
@ -157,7 +146,7 @@ func autoConvert_v1alpha1_ACMEHTTP01Config_To_controller_ACMEHTTP01Config(in *v1
out.SolverResourceRequestMemory = in.SolverResourceRequestMemory
out.SolverResourceLimitsCPU = in.SolverResourceLimitsCPU
out.SolverResourceLimitsMemory = in.SolverResourceLimitsMemory
if err := metav1.Convert_Pointer_bool_To_bool(&in.SolverRunAsNonRoot, &out.SolverRunAsNonRoot, s); err != nil {
if err := v1.Convert_Pointer_bool_To_bool(&in.SolverRunAsNonRoot, &out.SolverRunAsNonRoot, s); err != nil {
return err
}
out.SolverNameservers = *(*[]string)(unsafe.Pointer(&in.SolverNameservers))
@ -175,7 +164,7 @@ func autoConvert_controller_ACMEHTTP01Config_To_v1alpha1_ACMEHTTP01Config(in *co
out.SolverResourceRequestMemory = in.SolverResourceRequestMemory
out.SolverResourceLimitsCPU = in.SolverResourceLimitsCPU
out.SolverResourceLimitsMemory = in.SolverResourceLimitsMemory
if err := metav1.Convert_bool_To_Pointer_bool(&in.SolverRunAsNonRoot, &out.SolverRunAsNonRoot, s); err != nil {
if err := v1.Convert_bool_To_Pointer_bool(&in.SolverRunAsNonRoot, &out.SolverRunAsNonRoot, s); err != nil {
return err
}
out.SolverNameservers = *(*[]string)(unsafe.Pointer(&in.SolverNameservers))
@ -202,13 +191,13 @@ func autoConvert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfig
return err
}
out.Controllers = *(*[]string)(unsafe.Pointer(&in.Controllers))
if err := metav1.Convert_Pointer_bool_To_bool(&in.IssuerAmbientCredentials, &out.IssuerAmbientCredentials, s); err != nil {
if err := v1.Convert_Pointer_bool_To_bool(&in.IssuerAmbientCredentials, &out.IssuerAmbientCredentials, s); err != nil {
return err
}
if err := metav1.Convert_Pointer_bool_To_bool(&in.ClusterIssuerAmbientCredentials, &out.ClusterIssuerAmbientCredentials, s); err != nil {
if err := v1.Convert_Pointer_bool_To_bool(&in.ClusterIssuerAmbientCredentials, &out.ClusterIssuerAmbientCredentials, s); err != nil {
return err
}
if err := metav1.Convert_Pointer_bool_To_bool(&in.EnableCertificateOwnerRef, &out.EnableCertificateOwnerRef, s); err != nil {
if err := v1.Convert_Pointer_bool_To_bool(&in.EnableCertificateOwnerRef, &out.EnableCertificateOwnerRef, s); err != nil {
return err
}
out.CopiedAnnotationPrefixes = *(*[]string)(unsafe.Pointer(&in.CopiedAnnotationPrefixes))
@ -220,13 +209,11 @@ func autoConvert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfig
}
out.MetricsListenAddress = in.MetricsListenAddress
out.HealthzListenAddress = in.HealthzListenAddress
if err := metav1.Convert_Pointer_bool_To_bool(&in.EnablePprof, &out.EnablePprof, s); err != nil {
if err := v1.Convert_Pointer_bool_To_bool(&in.EnablePprof, &out.EnablePprof, s); err != nil {
return err
}
out.PprofAddress = in.PprofAddress
if err := Convert_Pointer_v1_LoggingConfiguration_To_v1_LoggingConfiguration(&in.Logging, &out.Logging, s); err != nil {
return err
}
out.Logging = in.Logging
out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates))
if err := Convert_v1alpha1_IngressShimConfig_To_controller_IngressShimConfig(&in.IngressShimConfig, &out.IngressShimConfig, s); err != nil {
return err
@ -240,6 +227,11 @@ func autoConvert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfig
return nil
}
// Convert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration is an autogenerated conversion function.
func Convert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration(in *v1alpha1.ControllerConfiguration, out *controller.ControllerConfiguration, s conversion.Scope) error {
return autoConvert_v1alpha1_ControllerConfiguration_To_controller_ControllerConfiguration(in, out, s)
}
func autoConvert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(in *controller.ControllerConfiguration, out *v1alpha1.ControllerConfiguration, s conversion.Scope) error {
out.APIServerHost = in.APIServerHost
out.KubeConfig = in.KubeConfig
@ -255,13 +247,13 @@ func autoConvert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfig
return err
}
out.Controllers = *(*[]string)(unsafe.Pointer(&in.Controllers))
if err := metav1.Convert_bool_To_Pointer_bool(&in.IssuerAmbientCredentials, &out.IssuerAmbientCredentials, s); err != nil {
if err := v1.Convert_bool_To_Pointer_bool(&in.IssuerAmbientCredentials, &out.IssuerAmbientCredentials, s); err != nil {
return err
}
if err := metav1.Convert_bool_To_Pointer_bool(&in.ClusterIssuerAmbientCredentials, &out.ClusterIssuerAmbientCredentials, s); err != nil {
if err := v1.Convert_bool_To_Pointer_bool(&in.ClusterIssuerAmbientCredentials, &out.ClusterIssuerAmbientCredentials, s); err != nil {
return err
}
if err := metav1.Convert_bool_To_Pointer_bool(&in.EnableCertificateOwnerRef, &out.EnableCertificateOwnerRef, s); err != nil {
if err := v1.Convert_bool_To_Pointer_bool(&in.EnableCertificateOwnerRef, &out.EnableCertificateOwnerRef, s); err != nil {
return err
}
out.CopiedAnnotationPrefixes = *(*[]string)(unsafe.Pointer(&in.CopiedAnnotationPrefixes))
@ -273,13 +265,11 @@ func autoConvert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfig
}
out.MetricsListenAddress = in.MetricsListenAddress
out.HealthzListenAddress = in.HealthzListenAddress
if err := metav1.Convert_bool_To_Pointer_bool(&in.EnablePprof, &out.EnablePprof, s); err != nil {
if err := v1.Convert_bool_To_Pointer_bool(&in.EnablePprof, &out.EnablePprof, s); err != nil {
return err
}
out.PprofAddress = in.PprofAddress
if err := Convert_v1_LoggingConfiguration_To_Pointer_v1_LoggingConfiguration(&in.Logging, &out.Logging, s); err != nil {
return err
}
out.Logging = in.Logging
out.FeatureGates = *(*map[string]bool)(unsafe.Pointer(&in.FeatureGates))
if err := Convert_controller_IngressShimConfig_To_v1alpha1_IngressShimConfig(&in.IngressShimConfig, &out.IngressShimConfig, s); err != nil {
return err
@ -293,6 +283,11 @@ func autoConvert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfig
return nil
}
// Convert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration is an autogenerated conversion function.
func Convert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(in *controller.ControllerConfiguration, out *v1alpha1.ControllerConfiguration, s conversion.Scope) error {
return autoConvert_controller_ControllerConfiguration_To_v1alpha1_ControllerConfiguration(in, out, s)
}
func autoConvert_v1alpha1_IngressShimConfig_To_controller_IngressShimConfig(in *v1alpha1.IngressShimConfig, out *controller.IngressShimConfig, s conversion.Scope) error {
out.DefaultIssuerName = in.DefaultIssuerName
out.DefaultIssuerKind = in.DefaultIssuerKind
@ -320,7 +315,7 @@ func Convert_controller_IngressShimConfig_To_v1alpha1_IngressShimConfig(in *cont
}
func autoConvert_v1alpha1_LeaderElectionConfig_To_controller_LeaderElectionConfig(in *v1alpha1.LeaderElectionConfig, out *controller.LeaderElectionConfig, s conversion.Scope) error {
if err := metav1.Convert_Pointer_bool_To_bool(&in.Enabled, &out.Enabled, s); err != nil {
if err := v1.Convert_Pointer_bool_To_bool(&in.Enabled, &out.Enabled, s); err != nil {
return err
}
out.Namespace = in.Namespace
@ -337,7 +332,7 @@ func Convert_v1alpha1_LeaderElectionConfig_To_controller_LeaderElectionConfig(in
}
func autoConvert_controller_LeaderElectionConfig_To_v1alpha1_LeaderElectionConfig(in *controller.LeaderElectionConfig, out *v1alpha1.LeaderElectionConfig, s conversion.Scope) error {
if err := metav1.Convert_bool_To_Pointer_bool(&in.Enabled, &out.Enabled, s); err != nil {
if err := v1.Convert_bool_To_Pointer_bool(&in.Enabled, &out.Enabled, s); err != nil {
return err
}
out.Namespace = in.Namespace

View File

@ -28,7 +28,6 @@ import (
config "github.com/cert-manager/cert-manager/internal/apis/config/controller"
defaults "github.com/cert-manager/cert-manager/internal/apis/config/controller/v1alpha1"
logf "github.com/cert-manager/cert-manager/pkg/logs"
)
func ValidateControllerConfiguration(o *config.ControllerConfiguration) error {
@ -86,12 +85,6 @@ func ValidateControllerConfiguration(o *config.ControllerConfiguration) error {
errs = append(errs, fmt.Errorf("%q is not in the list of known controllers", controller))
}
}
err := logf.ValidateAndApply(&o.Logging)
if err != nil {
errs = append(errs, err)
}
if len(errs) > 0 {
return fmt.Errorf("validation failed for '--controllers': %v", errs)
}

View File

@ -19,9 +19,8 @@ package v1alpha1
import (
"time"
"k8s.io/component-base/logs"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
logsapi "k8s.io/component-base/logs/api/v1"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@ -113,7 +112,7 @@ type ControllerConfiguration struct {
// logging configures the logging behaviour of the controller.
// https://pkg.go.dev/k8s.io/component-base@v0.27.3/logs/api/v1#LoggingConfiguration
Logging *logs.Options `json:"logging,omitempty"`
Logging logsapi.LoggingConfiguration `json:"logging"`
// featureGates is a map of feature names to bools that enable or disable experimental
// features.

View File

@ -23,7 +23,6 @@ package v1alpha1
import (
runtime "k8s.io/apimachinery/pkg/runtime"
v1 "k8s.io/component-base/logs/api/v1"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
@ -133,11 +132,7 @@ func (in *ControllerConfiguration) DeepCopyInto(out *ControllerConfiguration) {
*out = new(bool)
**out = **in
}
if in.Logging != nil {
in, out := &in.Logging, &out.Logging
*out = new(v1.LoggingConfiguration)
(*in).DeepCopyInto(*out)
}
in.Logging.DeepCopyInto(&out.Logging)
if in.FeatureGates != nil {
in, out := &in.FeatureGates, &out.FeatureGates
*out = make(map[string]bool, len(*in))