Skip to content

Commit

Permalink
Merge pull request #34 from uswitch/configurable-vault-ca
Browse files Browse the repository at this point in the history
Make the path to vault ca configurable
  • Loading branch information
mmcgarr authored Jul 22, 2022
2 parents c6f7aec + c12c5a3 commit 7a05b9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (

var (
vaultAddr string
vaultCaPath string
gatewayAddr string
loginPath string
secretPathFormat string
Expand All @@ -29,6 +30,7 @@ var (
func main() {

kingpin.Flag("vault-address", "URL of vault").Required().StringVar(&vaultAddr)
kingpin.Flag("vault-ca-path", "Path to the CA cert for vault").StringVar(&vaultCaPath)
kingpin.Flag("login-path", "Kubernetes auth login path for vault").Required().StringVar(&loginPath)
kingpin.Flag("sidecar-image", "Vault-creds sidecar image to use").Required().StringVar(&sidecarImage)
kingpin.Flag("gateway-address", "URL of Push Gateway").StringVar(&gatewayAddr)
Expand Down
2 changes: 1 addition & 1 deletion vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func addVault(pod *corev1.Pod, namespace, serviceAccountToken string, databases
Args: []string{
"--vault-addr=" + vaultAddr,
"--gateway-addr=" + gatewayAddr,
"--ca-cert=/vault.ca",
"--ca-cert=" + vaultCaPath,
"--secret-path=" + secretPath,
"--login-path=" + loginPath,
"--auth-role=" + authRole,
Expand Down

0 comments on commit 7a05b9c

Please sign in to comment.