mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * networking/network_security/logging-network-security.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="nw-networkpolicy-audit-disable_{context}"]
|
|
= Disabling egress firewall and network policy audit logging for a namespace
|
|
|
|
As a cluster administrator, you can disable audit logging for a namespace.
|
|
|
|
.Prerequisites
|
|
|
|
* Install the OpenShift CLI (`oc`).
|
|
* Log in to the cluster with a user with `cluster-admin` privileges.
|
|
|
|
.Procedure
|
|
|
|
* To disable audit logging for a namespace, enter the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc annotate --overwrite namespace <namespace> k8s.ovn.org/acl-logging-
|
|
----
|
|
+
|
|
--
|
|
where:
|
|
|
|
`<namespace>`:: Specifies the name of the namespace.
|
|
--
|
|
+
|
|
[TIP]
|
|
====
|
|
You can also apply the following YAML to disable audit logging:
|
|
|
|
[source,yaml]
|
|
----
|
|
kind: Namespace
|
|
apiVersion: v1
|
|
metadata:
|
|
name: <namespace>
|
|
annotations:
|
|
k8s.ovn.org/acl-logging: null
|
|
----
|
|
====
|
|
+
|
|
Successful output lists the audit logging name and the `annotated` status.
|