Skip to content

Commit

Permalink
whitespace / comment changes, remove unused var
Browse files Browse the repository at this point in the history
Signed-off-by: Ashley Davis <[email protected]>
  • Loading branch information
SgtCoDFish committed Apr 29, 2024
1 parent 71b050f commit 037b4b8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/csi/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,25 +160,27 @@ func New(log logr.Logger, opts Options) (*Driver, error) {
certificateRequestAnnotations: sanitizedAnnotations,
}

// Set sane defaults.
if len(d.certFileName) == 0 {
d.certFileName = "tls.crt"
}

if len(d.keyFileName) == 0 {
d.keyFileName = "tls.key"
}

if len(d.caFileName) == 0 {
d.caFileName = "ca.crt"
}

if d.certificateRequestDuration == 0 {
d.certificateRequestDuration = time.Hour
}

var err error
store, err := storage.NewFilesystem(d.log, opts.DataRoot)
if err != nil {
return nil, fmt.Errorf("failed to setup filesystem: %w", err)
}

// Used by clients to set the stored file's file-system group before
// mounting.
store.FSGroupVolumeAttributeKey = "spiffe.csi.cert-manager.io/fs-group"
Expand Down

0 comments on commit 037b4b8

Please sign in to comment.