Skip to content

Latest commit

 

History

History
74 lines (64 loc) · 2.75 KB

File metadata and controls

74 lines (64 loc) · 2.75 KB

Management State

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)
...
  1. managementState indicates if the resource is Managed (default) or Unmanaged by 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 ClusterLogForwarder custom resource is placed back into a Managed state.

Unmanaged State

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)

Potential reasons for needing to go Unmanaged:

  • Working around a known bug by implementing an advised solution

  • Hacking the configuration for testing custom images

  • Feature request investigation

Steps

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}')
  1. Set the ClusterLogForwarder resource to managementState of Unmanaged

  oc patch obsclf/$NAME --type='json' -p='[{"op": "replace", "path": "/spec/managementState", "value":"Unmanaged"}]'
  1. Edit the configmap directly using oc edit and 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  --confirm

Modify this local config file using your favorite text editor (e.g. nano)

  nano vector.toml

Use oc set to update the configmap with the modified vector.toml file

  oc set data configmap/$NAME-config --from-file=vector.toml=vector.toml
  1. Deleting the pods performs a rolling-restart and loads the updated vector config file

  oc delete pods -l app.kubernetes.io/component=collector