Disable Copied CSVs to reduce etcd usage

When an Operator is installed by the Operator Lifecycle Manager (OLM), a stripped-down copy of its ClusterServiceVersion (CSV) is created in every namespace the Operator watches. In clusters with many namespaces and cluster-wide Operators, Copied CSVs increase etcd storage usage, OLM memory consumption, and network bandwidth. Disabling Copied CSVs reduces the data stored in etcd and the memory footprint of OLM.

Prerequisites
  • An active kubectl session with administrative permissions to the destination Kubernetes cluster. See Overview of kubectl.

Procedure
  1. Configure the OLMConfig object to disable Copied CSVs:

    apiVersion: operators.coreos.com/v1
    kind: OLMConfig
    metadata:
      name: cluster
    spec:
      features:
        disableCopiedCSVs: true

    Disabling Copied CSVs reduces etcd storage usage and the memory footprint of OLM.

Verification
  • Verify that Copied CSVs are no longer created in user namespaces:

    $ kubectl get csv -n <user-namespace>

    The command should return no Copied CSVs for namespaces that do not have their own Operator subscriptions.