upgrade consul template (#10973)
This commit is contained in:
parent
38a647c6e5
commit
0c17cb5a79
2
go.mod
2
go.mod
|
@ -51,7 +51,7 @@ require (
|
|||
github.com/golang/protobuf v1.4.2
|
||||
github.com/google/go-github v17.0.0+incompatible
|
||||
github.com/google/go-metrics-stackdriver v0.2.0
|
||||
github.com/hashicorp/consul-template v0.25.2-0.20210123001810-166043f8559d
|
||||
github.com/hashicorp/consul-template v0.25.2
|
||||
github.com/hashicorp/consul/api v1.4.0
|
||||
github.com/hashicorp/errwrap v1.1.0
|
||||
github.com/hashicorp/go-bindata v3.0.8-0.20180209072458-bf7910af8997+incompatible
|
||||
|
|
2
go.sum
2
go.sum
|
@ -537,6 +537,8 @@ github.com/hashicorp/cap v0.0.0-20210204173447-5fcddadbf7c7 h1:6OHvaQs9ys66bR1yq
|
|||
github.com/hashicorp/cap v0.0.0-20210204173447-5fcddadbf7c7/go.mod h1:tIk5rB1nihW5+9bZjI7xlc8LGw8FYfiFMKOpHPbWgug=
|
||||
github.com/hashicorp/consul-template v0.25.2-0.20210123001810-166043f8559d h1:DSrhJ8Nqyr3oleIu0rCjRV4j6f4CJSPUp5DljXKKu4w=
|
||||
github.com/hashicorp/consul-template v0.25.2-0.20210123001810-166043f8559d/go.mod h1:kNLSN13aPJz/P0we1XNU+ZDsjkbzX+iHJ+dJOqFZck0=
|
||||
github.com/hashicorp/consul-template v0.25.2 h1:4xTeLZR/pWX2mESkXSvriOy+eI5vp9z3p7DF5wBlch0=
|
||||
github.com/hashicorp/consul-template v0.25.2/go.mod h1:5kVbPpbJvxZl3r9aV1Plqur9bszus668jkx6z2umb6o=
|
||||
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
|
||||
github.com/hashicorp/consul/api v1.4.0 h1:jfESivXnO5uLdH650JU/6AnjRoHrLhULq0FnC3Kp9EY=
|
||||
github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU=
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package dependency
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"encoding/json"
|
||||
|
||||
"github.com/hashicorp/vault/api"
|
||||
)
|
||||
|
||||
|
@ -122,6 +121,16 @@ func leaseCheckWait(s *Secret) time.Duration {
|
|||
}
|
||||
}
|
||||
|
||||
// Handle if this is an AppRole secret_id with no lease
|
||||
if _, ok := s.Data["secret_id"]; ok && s.LeaseID == "" {
|
||||
if expInterface, ok := s.Data["secret_id_ttl"]; ok {
|
||||
if ttlData, err := expInterface.(json.Number).Int64(); err == nil && ttlData > 0 {
|
||||
base = int(ttlData) + 1
|
||||
log.Printf("[DEBUG] Found approle secret_id and non-zero secret_id_ttl, setting lease duration to %d seconds", base)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handle if this is a secret with a rotation period. If this is a rotating secret,
|
||||
// the rotating secret's TTL will be the duration to sleep before rendering the new secret.
|
||||
var rotatingSecret bool
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/go-syslog"
|
||||
gsyslog "github.com/hashicorp/go-syslog"
|
||||
"github.com/hashicorp/logutils"
|
||||
)
|
||||
|
||||
|
@ -32,7 +32,7 @@ type Config struct {
|
|||
Syslog bool `json:"syslog"`
|
||||
SyslogFacility string `json:"syslog_facility"`
|
||||
// SyslogName is the progname as it will appear in syslog output (if enabled).
|
||||
SyslogName string `json:"name"`
|
||||
SyslogName string `json:"name"`
|
||||
|
||||
// Writer is the output where logs should go. If syslog is enabled, data will
|
||||
// be written to writer in addition to syslog.
|
||||
|
@ -73,7 +73,6 @@ func Setup(config *Config) error {
|
|||
}
|
||||
|
||||
log.SetOutput(logOutput)
|
||||
log.SetOutput(new(logWriter))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package version
|
|||
|
||||
import "fmt"
|
||||
|
||||
const Version = "0.25.1"
|
||||
const Version = "0.25.2"
|
||||
|
||||
var (
|
||||
Name string
|
||||
|
|
|
@ -427,7 +427,7 @@ github.com/hashicorp/cap/jwt
|
|||
github.com/hashicorp/cap/oidc
|
||||
github.com/hashicorp/cap/oidc/internal/base62
|
||||
github.com/hashicorp/cap/oidc/internal/strutils
|
||||
# github.com/hashicorp/consul-template v0.25.2-0.20210123001810-166043f8559d
|
||||
# github.com/hashicorp/consul-template v0.25.2
|
||||
github.com/hashicorp/consul-template/child
|
||||
github.com/hashicorp/consul-template/config
|
||||
github.com/hashicorp/consul-template/dependency
|
||||
|
|
Loading…
Reference in New Issue