diff --git a/pkg/apis/config/v1alpha1/default_test.go b/pkg/apis/config/v1alpha1/default_test.go index 6f11f675f..fb364b0f3 100644 --- a/pkg/apis/config/v1alpha1/default_test.go +++ b/pkg/apis/config/v1alpha1/default_test.go @@ -48,7 +48,7 @@ var _ = Describe("Defaults", func() { }) It("should default the application crendential config", func() { - SetDefaults_ApplicationCrendentialConfig(obj) + SetDefaults_ApplicationCredentialConfig(obj) Expect(*obj.Lifetime).To(Equal(metav1.Duration{Duration: time.Hour * 48})) Expect(*obj.OpenstackExpirationPeriod).To(Equal(metav1.Duration{Duration: time.Hour * 24 * 30})) diff --git a/pkg/apis/config/v1alpha1/defaults.go b/pkg/apis/config/v1alpha1/defaults.go index f0fab5fe5..20f9e5a0d 100644 --- a/pkg/apis/config/v1alpha1/defaults.go +++ b/pkg/apis/config/v1alpha1/defaults.go @@ -33,7 +33,7 @@ func SetDefaults_ControllerConfiguration(obj *ControllerConfiguration) { } // SetDefaults_ApplicationCrendentialConfig sets defaults for the ApplicationCrendentialConfig. -func SetDefaults_ApplicationCrendentialConfig(obj *ApplicationCredentialConfig) { +func SetDefaults_ApplicationCredentialConfig(obj *ApplicationCredentialConfig) { if obj.Lifetime == nil { obj.Lifetime = &metav1.Duration{ Duration: time.Hour * 48, diff --git a/pkg/apis/config/v1alpha1/zz_generated.defaults.go b/pkg/apis/config/v1alpha1/zz_generated.defaults.go index 2c9ab40ed..b54f28011 100644 --- a/pkg/apis/config/v1alpha1/zz_generated.defaults.go +++ b/pkg/apis/config/v1alpha1/zz_generated.defaults.go @@ -35,4 +35,7 @@ func RegisterDefaults(scheme *runtime.Scheme) error { func SetObjectDefaults_ControllerConfiguration(in *ControllerConfiguration) { SetDefaults_ControllerConfiguration(in) + if in.ApplicationCredentialConfig != nil { + SetDefaults_ApplicationCredentialConfig(in.ApplicationCredentialConfig) + } }