Skip to content

Commit

Permalink
feat: use HOSTNAME env variable if set for host value
Browse files Browse the repository at this point in the history
avoid to use pod name in k8s
  • Loading branch information
aarnaud committed Feb 26, 2020
1 parent 9689ba8 commit 79eaf98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/vault-mon/influx.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import (
var hostname string

func InfluxWatchCerts(pkimon *PKIMon, interval time.Duration, loop bool) {
hostname, _ = os.Hostname()
hostname = os.Getenv("HOSTNAME")
if hostname == "" {
hostname, _ = os.Hostname()
}
if loop {
go func() {
for {
Expand Down

0 comments on commit 79eaf98

Please sign in to comment.