Configuring cert-manager for the external-secrets certificate requirements
You can optionally configure cert-manager to manage certificates for the External Secrets Operator for Red Hat OpenShift webhook and plugins. If you do not use cert-manager, the Operator automatically generates webhook certificates, but you must manually configure certificates for any plugins.
-
You have access to the cluster with
cluster-adminprivileges. -
You have created the
ExternalSecretsConfigcustom resource. -
You have installed the cert-manager Operator for Red Hat OpenShift. For more information, see "Installing the cert-manager Operator for Red Hat OpenShift"
-
Edit the
ExternalSecretsConfigcustom resource by running the following command:$ oc edit externalsecretsconfigs.operator.openshift.io cluster -
Configure
cert-managerby editing thespec.controllerConfig.certProvider.certManagersection as follows:apiVersion: operator.openshift.io/v1alpha1 kind: ExternalSecretsConfig ... spec: controllerConfig: certProvider: certManager: injectAnnotations: "true" issuerRef: name: <issuer_name> kind: <issuer_kind> group: <issuer_group> mode: Enabledwhere:
- injectAnnotation
-
Must be set to
truewhen enabled. - name
-
Specifies the name of the issuer object referenced in
ExternalSecretsConfig. - kind
-
Specifies the API issuer. Can be set to either
IssuerorClusterIssuer. - group
-
Specifies the API issuer group. The group name must be
cert-manager.io. - mode
-
Must be set to
Enabled. This is an immutable field and cannot be modified once it is configured.
-
Save your changes.
-
After you update the
cert-managerconfigurations in theexternalsecretsconfig.operator.openshift.ioobject, you must manually deleteexternal-secrets-cert-controllerdeployment by running the following command. This prevents performance degradation of theexternal-secretsapplication.$ oc delete deployments.apps external-secrets-cert-controller -n external-secrets -
Optionally, you can delete other resources created for the
cert-controllerby running the following commands:$ oc delete clusterrolebindings.rbac.authorization.k8s.io external-secrets-cert-controller$ oc delete clusterroles.rbac.authorization.k8s.io external-secrets-cert-controller$ oc delete serviceaccounts external-secrets-cert-controller -n external-secrets$ oc delete secrets external-secrets-webhook -n external-secrets