Skip to content

Commit

Permalink
Simplify config call for CM certs
Browse files Browse the repository at this point in the history
  • Loading branch information
kabicin committed Nov 21, 2024
1 parent 94d8b2a commit 0531072
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions utils/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,10 +513,7 @@ func (r *ReconcilerBase) GenerateCMIssuer(namespace string, prefix string, CACom
Name: prefix + "-self-signed",
}

var duration time.Duration
var err error
cmCADuration := common.LoadFromConfig(common.Config, common.OpConfigCMCADuration)
duration, err = time.ParseDuration(cmCADuration)
duration, err := time.ParseDuration(common.LoadFromConfig(common.Config, common.OpConfigCMCADuration))
if err != nil {
return err
}
Expand Down Expand Up @@ -693,10 +690,7 @@ func (r *ReconcilerBase) GenerateSvcCertSecret(ba common.BaseComponent, prefix s

svcCert.Spec.SecretName = svcCertSecretName

var duration time.Duration
var err error
cmCertDuration := common.LoadFromConfig(common.Config, common.OpConfigCMCertDuration)
duration, err = time.ParseDuration(cmCertDuration)
duration, err := time.ParseDuration(common.LoadFromConfig(common.Config, common.OpConfigCMCertDuration))
if err != nil {
return err
}
Expand Down

0 comments on commit 0531072

Please sign in to comment.