-
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 Octavia deployment
This commit will consume the secrets from HashiCorp Vault using vault-secretes-operator for the Octavia deployment.
- Loading branch information
Showing
8 changed files
with
228 additions
and
23 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,8 @@ | ||
namespace: openstack | ||
resources: | ||
- vaultauth.yaml | ||
- vaultconnection.yaml | ||
- octavia-admin.yaml | ||
- octavia-db-password.yaml | ||
- octavia-rabbitmq-password.yaml | ||
- octavia-certificates.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: octavia-admin | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/octavia' | ||
|
||
# path of the secret | ||
path: octavia-admin | ||
|
||
# dest k8s secret | ||
destination: | ||
name: octavia-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: octavia-certificates | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/octavia' | ||
|
||
# path of the secret | ||
path: octavia-certificates | ||
|
||
# dest k8s secret | ||
destination: | ||
name: octavia-certificates | ||
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: octavia-db-password | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/octavia' | ||
|
||
# path of the secret | ||
path: octavia-db-password | ||
|
||
# dest k8s secret | ||
destination: | ||
name: octavia-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/octavia/base/vault/octavia-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: octavia-rabbitmq-password | ||
namespace: openstack | ||
spec: | ||
type: kv-v2 | ||
|
||
# mount path | ||
mount: 'osh/octavia' | ||
|
||
# path of the secret | ||
path: octavia-rabbitmq-password | ||
|
||
# dest k8s secret | ||
destination: | ||
name: octavia-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,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" |