Skip to content

Commit

Permalink
fix app credential config defaulting
Browse files Browse the repository at this point in the history
  • Loading branch information
dkistner committed Jun 22, 2022
1 parent 2445483 commit a2c0c06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/config/v1alpha1/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}))
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/config/v1alpha1/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/config/v1alpha1/zz_generated.defaults.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a2c0c06

Please sign in to comment.