In some cases, it is necessary to trust user-generated CA certificates. Kyverno allows you to automatically add a volume containing user CA certificates to containers with a specific label.
The installation consists of two stages:
Step 1: Prepare a Secret with a root CA certificate
Create a Secret with the root CA certificate in namespace
where the BRIX application is installed. If there are multiple instances of BRIX installed in the Kubernetes cluster, add the Secret only to the namespace
of the necessary instances of BRIX.
Create a Secret named elma365-
in the namespace
where BRIX is installed by running the following command:
kubectl create secret generic elma365-onpremise-ca --from-file=elma365-onpremise-ca.pem=/etc/ssl/certs/rootCA.pem [-n namespace]
Where -
specifies the path to your root CA certificate in .pem format.
Step 2: Fill in the configuration file
Fill in the configuration file values-
for setting up Kyverno:
- Configure the policy to add user CA certificates to all containers. The policy is enabled by default, the
kyverno.injectCerts.enabled
parameter is set totrue
. - In the
kyverno.injectCerts.secretCA
parameter, specify the name of the Secret created in Step 1. In the example in this article, it iselma365-
. The policy adds a volume containing the CA certificate to all containers with the labelonpremise- ca tier=
.elma365 - If there are multiple instances of the BRIX On-Premises application installed in the Kubernetes cluster, but the user CA certificate needs to be added only to some instances of the BRIX applications, fill in the
kyverno.injectCerts.injectNamespace
parameter.
In the kyverno.injectCerts.injectNamespace
parameter, specify the namespaces
of BRIX instances to which the policy of adding certificates will be applied and a volume containing the CA certificate will be added. Ensure that in Step 1, the Secret with the root CA certificate was added to the namespaces
listed in kyverno.injectNamespace
.
- Specify the
namespace
for the Kyverno service, in this article, it iskyverno
. To ensure high availability, set the required number of replicas in thekyverno.injectCerts.injectNamespace
parameter.
# kyverno settings
kyverno:
# the policy adds the volume containing the CA certificate to all the containers labeled tier=elma365
injectCerts:
enabled: true
# name of the secret with the CA root certificate for https with a self-signed certificate
secretCA: elma365-onpremise-ca
# list of namespaces where the policy will be applied
# injectNamespace:
# - elma365-dev
# - elma365-prod
# namespace for kyverno (before installation, create kubectl create ns kyverno)
namespace: kyverno
# number of replicas for high availability
replicaCount: 1
# Install crds (not required, is added to directory crds)
installCRDs: false
...
Installing the Kyverno add-on component does not automatically connect the volume containing the CA certificate to the already running pods of the BRIX application. After installing Kyverno, restart the BRIX application services.