feat: Add self-signed certificate init container #140
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Definition of Ready
This PR adds the ability to enable an init container which will generate and store a self signed certificate for each pod that runs in the replica set.
The certificate is signed with the CN of "zitadel" and contains the following SAN's: localhost, Pod IP Address and Pod Name. Additionally, it can contain one more DNS name, specified in values, which will be added to the SAN.
By default, this is disabled in the values file, but if required can be enabled by setting selfSignedCert.enabled to true. You can add the DNS name you want to add the certificate in selfSignedCert.additionalDnsName. Omit this value if this is not required.
The init container uses a small alpine/openssl image to generate the certificate using the following command:
Enabling selfSignedCert also adds the correct volume and volumeMount for the /etc/tls directory. This is where the tls.crt and tls.key files will be stored. They can then be referenced in zitadel config directly. E.G. KeyPath: /etc/tls/tls.key CertPath: /etc/tls/tls.crt