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 withe 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-onpremise-ca
in 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 --from-file
specifies the path to your root CA certificate in .pem format.
Step 2: Fill in the configuration file
Fill in the configuration file values-kyverno.yaml
for setting up Kyverno:
- Configure the policy to add user CA certificates to all containers. The policy is enabled by default, the
kyverno.injectСerts.enabled
parameter is set totrue
. - In the
kyverno.injectСerts.secretCA
parameter, specify the name of the Secret created in Step 1. In the example in this article, it iselma365-onpremise-ca
. he policy adds a volume containing the CA certificate to all containers with the labeltier=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.injectСerts.injectNamespace
parameter. In thekyverno.injectСerts.injectNamespace
parameter, specify thenamespaces
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 thenamespaces
listed inkyverno.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.injectСerts.injectNamespace
parameter.
## kyverno settings
kyverno:
## the policy adds the volume containing the CA certificate to all the containers labeled tier=elma365
injectСerts:
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
...
To connect to the private registry:
## kyverno settings where:
|
начало внимание
Installing the Kyverno add-on component does not automatically attach the volume containing the CA certificate to the already running pods of the BRIX application. After installing Kyverno, do not forget to restart the BRIX application services.
конец внимание