Watch specific resources 🔗︎
The Logging operator watches resources in all namespaces, which is required because it manages cluster-scoped objects, and also objects in multiple namespaces.
However, in a large-scale infrastructure, where the number of resources is large, it makes sense to limit the scope of resources monitored by the Logging operator to save considerable amount of memory and container restarts.
Starting with Logging operator version 3.12.0, this is now available by passing the following command-line arguments to the operator.
watch-namespace
: Watch only objects in this namespace. Note that even if thewatch-namespace
option is set, the operator must watch certain objects (likeFlows
andOutputs
) in every namespace.watch-logging-name
: Logging resource name to optionally filter the list of watched objects based on which logging they belong to by checking theapp.kubernetes.io/managed-by
label.
Configure using the One Eye operator Observer CRD 🔗︎
To configure the watch-namespace
and watch-logging-name
options using the Observer custom resource, see the following snippet.
apiVersion: one-eye.banzaicloud.io/v1alpha1
kind: Observer
metadata:
name: one-eye
spec:
logging:
operator:
watchLoggingName: 'one-eye'
watchNamespace: 'default'