There are times when it may be necessary for administrators to intervene and take over management of some aspects of the logging stack. This requires setting the ClusterLogForwarder CR into an "Unmanaged" state.
apiVersion: observability.openshift.io/v1
kind: ClusterLogForwarder
metadata:
name: my-forwarder
spec:
managementState: Unmanaged # (1)
...-
managementStateindicates if the resource isManaged(default) orUnmanagedby the logging operator
|
Important
|
Logging components in an 'Unmanaged' state are not supported unless a formal exception or documented workaround for a known issue exists. |
- Reverting
-
Operating in an unmanaged state is intended to be temporary and should be reverted once the respective issue is resolved. An unmanaged deployment will not receive updates until the
ClusterLogForwardercustom resource is placed back into aManagedstate.
Running logging unmanaged allows configurations and deployments to be modified and managed by an administrator. The operator will no longer reconcile or monitor changes to the resources it owns (e.g. secrets, configmaps, daemonsets)
-
Working around a known bug by implementing an advised solution
-
Hacking the configuration for testing custom images
-
Feature request investigation
|
Note
|
obsclf is the registered short-name for clusterlogforwarder.observability.openshift.io
|
This first command is not required, but can be used to set the $NAME substitution in the examples below
export NAME=$(oc get obsclf -o jsonpath='{.items[0].metadata.name}')-
Set the
ClusterLogForwarderresource to managementState ofUnmanaged
oc patch obsclf/$NAME --type='json' -p='[{"op": "replace", "path": "/spec/managementState", "value":"Unmanaged"}]'
-
Edit the configmap directly using
oc editand modify the vector.toml as needed
oc edit configmap/$NAME-config
Alternatively: If you prefer more controlled editing of the vector.toml file, you can extract the file, make your changes locally, then apply the updated config
oc extract configmap/$NAME-config --keys=vector.toml --confirmModify this local config file using your favorite text editor (e.g. nano)
nano vector.tomlUse oc set to update the configmap with the modified vector.toml file
oc set data configmap/$NAME-config --from-file=vector.toml=vector.toml-
Deleting the pods performs a rolling-restart and loads the updated vector config file
oc delete pods -l app.kubernetes.io/component=collector