-
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 MariaDB and Keystone deployment
This commit will consume the secrets from HashiCorp Vault using vault-secretes-operator for the MariaDB and Keystone deployment
- Loading branch information
Showing
13 changed files
with
301 additions
and
30 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
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: keystone-admin | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/keystone' | ||
|
||
# path of the secret | ||
path: keystone-admin | ||
|
||
# dest k8s secret | ||
destination: | ||
name: keystone-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: keystone-db-password | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/keystone' | ||
|
||
# path of the secret | ||
path: keystone-db-password | ||
|
||
# dest k8s secret | ||
destination: | ||
name: keystone-db-password | ||
create: true | ||
|
||
# static secret refresh interval | ||
refreshAfter: 30s | ||
|
||
# Name of the CRD to authenticate to Vault | ||
vaultAuthRef: vault-auth |
24 changes: 24 additions & 0 deletions
24
kustomize/keystone/base/vault/keystone-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,24 @@ | ||
apiVersion: secrets.hashicorp.com/v1beta1 | ||
kind: VaultStaticSecret | ||
metadata: | ||
name: keystone-rabbitmq-password | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/keystone' | ||
|
||
# path of the secret | ||
path: keystone-rabbitmq-password | ||
|
||
# dest k8s secret | ||
destination: | ||
name: keystone-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 | ||
- keystone-admin.yaml | ||
- keystone-db-password.yaml | ||
- keystone-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" |
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,5 @@ | ||
namespace: openstack | ||
resources: | ||
- vaultauth.yaml | ||
- vaultconnection.yaml | ||
- mariadb-root-password.yaml |
24 changes: 24 additions & 0 deletions
24
kustomize/mariadb-cluster/base/vault/mariadb-root-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,24 @@ | ||
apiVersion: secrets.hashicorp.com/v1beta1 | ||
kind: VaultStaticSecret | ||
metadata: | ||
name: mariadb-root-password | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/mariadb' | ||
|
||
# path of the secret | ||
path: mariadb-root-password | ||
|
||
# dest k8s secret | ||
destination: | ||
name: mariadb-root-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,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" |