Skip to content

Commit

Permalink
use path.Join
Browse files Browse the repository at this point in the history
Change-Id: I005ab0e2f181f28d1a09d68ea3380d9a45769e4a
  • Loading branch information
wleese committed Jul 26, 2018
1 parent 47ca671 commit 8047c94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/prometheus/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,10 @@ func makeStatefulSetSpec(p monitoringv1.Prometheus, c *Config, ruleConfigMapName
if p.Spec.Thanos.GCS.SecretKey.Name != "" {
secretFileName = p.Spec.Thanos.GCS.SecretKey.Name
}
secretDir := "/var/run/secrets/prometheus.io/" + p.Spec.Thanos.GCS.SecretKey.Key
secretDir := path.Join("/var/run/secrets/prometheus.io", p.Spec.Thanos.GCS.SecretKey.Key)
envVars = append(envVars, v1.EnvVar{
Name: "GOOGLE_APPLICATION_CREDENTIALS",
Value: secretDir + "/" + secretFileName,
Value: path.Join(secretDir, secretFileName),
})
volumeName := "secret-" + p.Spec.Thanos.GCS.SecretKey.Key
volumes = append(volumes, v1.Volume{
Expand Down

0 comments on commit 8047c94

Please sign in to comment.