mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
54 lines
2.0 KiB
Plaintext
54 lines
2.0 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * security/external_secrets_operator/external-secrets-log-levels.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="external-secrets-enable-operator-log-level_{context}"]
|
|
= Setting a log level for the {external-secrets-operator}
|
|
|
|
[role="_abstract"]
|
|
Set the log level for the {external-secrets-operator} to control the detail of log messages. By adjusting the verbosity, you can troubleshoot issues effectively and manage the volume of log data.
|
|
|
|
.Prerequisites
|
|
|
|
* You have access to the cluster with `cluster-admin` privileges.
|
|
* You have created the `ExternalSecretsConfig` custom resource.
|
|
|
|
.Procedure
|
|
|
|
* Update the subscription object for the {external-secrets-operator} to provide the verbosity level for the operator logs by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc -n <external_secrets_operator_namespace> patch subscription openshift-external-secrets-operator --type='merge' -p '{"spec":{"config":{"env":[{"name":"OPERATOR_LOG_LEVEL","value":"<log_level>"}]}}}'
|
|
----
|
|
+
|
|
where:
|
|
|
|
external_secrets_operator_namespace:: Specifies the namespace where the Operator is installed.
|
|
|
|
log_level:: Specifies the level of log detail. Values range from 1-5. The default is 2.
|
|
|
|
.Verification
|
|
|
|
. The External Secrets Operator pod is redeployed. Verify that the log level of the {external-secrets-operator} is updated by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc set env deploy/external-secrets-operator-controller-manager -n external-secrets-operator --list | grep -e OPERATOR_LOG_LEVEL -e container
|
|
----
|
|
+
|
|
The following example verifies that the log level of the {external-secrets-operator} is updated.
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# deployments/external-secrets-operator-controller-manager, container manager
|
|
OPERATOR_LOG_LEVEL=2
|
|
----
|
|
|
|
. Verify that the log level of the {external-secrets-operator} is updated by running the `oc logs` command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc logs -n external-secrets-operator -f deployments/external-secrets-operator-controller-manager -c manager
|
|
---- |