Merge pull request #708 from smallstep/helm-fix

Use badgerv2 the default DB in helm
This commit is contained in:
Mariano Cano 2021-09-17 12:59:04 -07:00 committed by GitHub
commit 845fa07064
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -79,7 +79,7 @@ inject:
logger: logger:
format: json format: json
db: db:
type: badger type: badgerv2
dataSource: /home/step/db dataSource: /home/step/db
authority: authority:
provisioners: provisioners:

View file

@ -341,7 +341,9 @@ func New(o apiv1.Options, opts ...Option) (*PKI, error) {
if err != nil { if err != nil {
return nil, errors.Wrapf(err, "error parsing %s", p.Address) return nil, errors.Wrapf(err, "error parsing %s", p.Address)
} }
if port == "443" { // On k8s we usually access through a service, and this is configured on
// port 443 by default.
if port == "443" || p.options.isHelm {
p.Defaults.CaUrl = fmt.Sprintf("https://%s", p.Defaults.CaUrl) p.Defaults.CaUrl = fmt.Sprintf("https://%s", p.Defaults.CaUrl)
} else { } else {
p.Defaults.CaUrl = fmt.Sprintf("https://%s:%s", p.Defaults.CaUrl, port) p.Defaults.CaUrl = fmt.Sprintf("https://%s:%s", p.Defaults.CaUrl, port)