From 4fde7b52501034ac0314c317d109d44884fe2267 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Fri, 17 Sep 2021 12:49:16 -0700 Subject: [PATCH] Use badgerv2 the default in helm too. Use also port 443 for the ca-url, as we usually access through the service, this can be overridden by --with-ca-url flag in the cli. --- pki/helm.go | 2 +- pki/pki.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pki/helm.go b/pki/helm.go index 570fb04d..817c1bf4 100644 --- a/pki/helm.go +++ b/pki/helm.go @@ -79,7 +79,7 @@ inject: logger: format: json db: - type: badger + type: badgerv2 dataSource: /home/step/db authority: provisioners: diff --git a/pki/pki.go b/pki/pki.go index fd625199..12e71e47 100644 --- a/pki/pki.go +++ b/pki/pki.go @@ -341,7 +341,9 @@ func New(o apiv1.Options, opts ...Option) (*PKI, error) { if err != nil { 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) } else { p.Defaults.CaUrl = fmt.Sprintf("https://%s:%s", p.Defaults.CaUrl, port)