-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use HashiCorp Vault for Horizon deployment
This commit will consume the secrets from HashiCorp Vault using vault-secretes-operator for the Horizon deployment.
- Loading branch information
Showing
6 changed files
with
162 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: secrets.hashicorp.com/v1beta1 | ||
kind: VaultStaticSecret | ||
metadata: | ||
name: horizon-db-password | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/horizon' | ||
|
||
# path of the secret | ||
path: horizon-db-password | ||
|
||
# dest k8s secret | ||
destination: | ||
name: horizon-db-password | ||
create: true | ||
|
||
# static secret refresh interval | ||
refreshAfter: 30s | ||
|
||
# Name of the CRD to authenticate to Vault | ||
vaultAuthRef: vault-auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: secrets.hashicorp.com/v1beta1 | ||
kind: VaultStaticSecret | ||
metadata: | ||
name: horizon-secrete-key | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/horizon' | ||
|
||
# path of the secret | ||
path: horizon-secrete-key | ||
|
||
# dest k8s secret | ||
destination: | ||
name: horizon-secrete-key | ||
create: true | ||
|
||
# static secret refresh interval | ||
refreshAfter: 30s | ||
|
||
# Name of the CRD to authenticate to Vault | ||
vaultAuthRef: vault-auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace: openstack | ||
resources: | ||
- vaultauth.yaml | ||
- vaultconnection.yaml | ||
- horizon-db-password.yaml | ||
- horizon-secrete-key.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: secrets.hashicorp.com/v1beta1 | ||
kind: VaultAuth | ||
metadata: | ||
name: vault-auth | ||
namespace: openstack | ||
spec: | ||
method: kubernetes | ||
mount: genestack | ||
kubernetes: | ||
role: osh | ||
serviceAccount: default | ||
audiences: | ||
- vault | ||
vaultConnectionRef: vault-connection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: secrets.hashicorp.com/v1beta1 | ||
kind: VaultConnection | ||
metadata: | ||
namespace: openstack | ||
name: vault-connection | ||
spec: | ||
# required configuration | ||
# address to the Vault server. | ||
address: https://vault.vault.svc.cluster.local:8200 | ||
# optional configuration | ||
# HTTP headers to be included in all Vault requests. | ||
# headers: [] | ||
# TLS server name to use as the SNI host for TLS connections. | ||
# tlsServerName: "" | ||
# skip TLS verification for TLS connections to Vault. | ||
skipTLSVerify: false | ||
# the trusted PEM encoded CA certificate chain stored in a Kubernetes Secret | ||
caCertSecretRef: "vault-ca-secret" |