-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to specify a certificate and a CA to be used for galera cluster communication (GCOMM, SST). Updates to the certificate used for galera automatically triggers a rolling restart of the galera pods, without service disruption. When the Galera CR is configured to use TLS, the mariadbdatabase CR creates DB users that still allow connection to the DB without using TLS. This is because Openstack clients currently cannot be configured to connect via TLS or via plain TCP. This specific part will be addressed in a subsequent commit.
- Loading branch information
Showing
16 changed files
with
438 additions
and
17 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,74 @@ | ||
# the cluster-wide issuer, used to generate a root certificate | ||
apiVersion: cert-manager.io/v1 | ||
kind: ClusterIssuer | ||
metadata: | ||
name: selfsigned-issuer | ||
spec: | ||
selfSigned: {} | ||
--- | ||
# The root certificate. they cert/key/ca will be generated in the secret 'root-secret' | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: my-selfsigned-ca | ||
namespace: openstack | ||
spec: | ||
isCA: true | ||
commonName: my-selfsigned-ca | ||
secretName: root-secret | ||
privateKey: | ||
algorithm: ECDSA | ||
size: 256 | ||
issuerRef: | ||
name: selfsigned-issuer | ||
kind: ClusterIssuer | ||
group: cert-manager.io | ||
--- | ||
# The CA issuer for galera, uses the certificate from `my-selfsigned-ca` | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: my-ca-issuer | ||
namespace: openstack | ||
spec: | ||
ca: | ||
secretName: root-secret | ||
--- | ||
# The certificate used by all galera replicas for GCOMM and SST. | ||
# The replicas in the galera statefulset all share the same | ||
# certificate, so the latter requires wildcard in dnsNames for TLS | ||
# validation. | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: galera-cert | ||
spec: | ||
secretName: galera-tls | ||
secretTemplate: | ||
labels: | ||
mariadb-ref: openstack | ||
duration: 6h | ||
renewBefore: 1h | ||
subject: | ||
organizations: | ||
- cluster.local | ||
commonName: openstack-galera | ||
isCA: false | ||
privateKey: | ||
algorithm: RSA | ||
encoding: PKCS8 | ||
size: 2048 | ||
usages: | ||
- server auth | ||
- client auth | ||
dnsNames: | ||
- "openstack-galera" | ||
- "*.openstack-galera" | ||
- "*.openstack-galera.openstack" | ||
- "*.openstack-galera.openstack.svc" | ||
- "*.openstack-galera.openstack.svc.cluster" | ||
- "*.openstack-galera.openstack.svc.cluster.local" | ||
issuerRef: | ||
name: my-ca-issuer | ||
group: cert-manager.io | ||
kind: Issuer |
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,12 @@ | ||
apiVersion: mariadb.openstack.org/v1beta1 | ||
kind: Galera | ||
metadata: | ||
name: openstack | ||
spec: | ||
secret: osp-secret | ||
storageClass: local-storage | ||
storageRequest: 500M | ||
replicas: 3 | ||
tls: | ||
secretName: galera-tls | ||
caSecretName: galera-tls |
Oops, something went wrong.