Skip to content

Commit

Permalink
fix bug in error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob committed Sep 2, 2021
1 parent a23cfe0 commit e75ebd1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/apis/provisioning/v1alpha3/provisioner_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ func (c *Cluster) GetCABundle(ctx context.Context) (*string, error) {
return nil, err
}
_, err = transport.TLSConfigFor(transportConfig) // fills in CAData!
if err != nil {
logging.FromContext(ctx).Debugf("Unable to discover caBundle, loading TLS config, %v", err)
return nil, err
}
logging.FromContext(ctx).Debugf("Discovered caBundle, length %d", len(transportConfig.TLS.CAData))
return ptr.String(base64.StdEncoding.EncodeToString(transportConfig.TLS.CAData)), nil
}

0 comments on commit e75ebd1

Please sign in to comment.