-
Notifications
You must be signed in to change notification settings - Fork 32
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 Cinder deployment
This commit will consume the secrets from HashiCorp Vault using vault-secretes-operator for the Cinder deployment.
- Loading branch information
Showing
7 changed files
with
195 additions
and
15 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: cinder-admin | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/cinder' | ||
|
||
# path of the secret | ||
path: cinder-admin | ||
|
||
# dest k8s secret | ||
destination: | ||
name: cinder-admin | ||
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: cinder-db-password | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/cinder' | ||
|
||
# path of the secret | ||
path: cinder-db-password | ||
|
||
# dest k8s secret | ||
destination: | ||
name: cinder-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: cinder-rabbitmq-password | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/cinder' | ||
|
||
# path of the secret | ||
path: cinder-rabbitmq-password | ||
|
||
# dest k8s secret | ||
destination: | ||
name: cinder-rabbitmq-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,7 @@ | ||
namespace: openstack | ||
resources: | ||
- vaultauth.yaml | ||
- vaultconnection.yaml | ||
- cinder-admin.yaml | ||
- cinder-db-password.yaml | ||
- cinder-rabbitmq-password.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" |