Kaynağa Gözat

Merge pull request #708 from smallstep/helm-fix

Use badgerv2 the default DB in helm
Mariano Cano 5 yıl önce
ebeveyn
işleme
845fa07064
2 değiştirilmiş dosya ile 4 ekleme ve 2 silme
  1. 1 1
      pki/helm.go
  2. 3 1
      pki/pki.go

+ 1 - 1
pki/helm.go

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

+ 3 - 1
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)