r4f4/catalog-filter

This repository demoes an implementation of operator-registry's catalogFilter from https://github.com/operator-framework/operator-registry/pull/1231

★ 0Forks 0GitHub ↗Compare

README

This repo is a filtering API for operator catalogs.

Three implementations exist:

The filtering by configuration for oc-mirror is the only implementation that will be maintained for the moment.

A valid configuration file for this implementation would look like:

apiVersion: olm.operatorframework.io/filter/mirror/v1alpha1
kind: FilterConfiguration
packages:
  - name: "foo"
  - name: "bar"
    defaultChannel: "bar-channel1"
    channels:
      - name: "bar-channel1"
        versionRange: ">=1.0.0 <2.0.0"
      - name: "bar-channel2"
        versionRange: ">=2.0.0 <3.0.0"

The above filtering would return a file based catalog json (FBC) that contains:

  • only packages foo and bar from the original catalog provided
  • within package foo, 1 channel will remain : foo's default channel
  • in foo's default channel, 1 channel entry will remain: the head bundle of the channel
  • within package foo, 1 bundle will remain: corresponding to the head of foo's default channel
  • within package bar, only 2 channels will remain: bar-channel1 and bar-channel2
  • within package bar, bar-channel1 will be set as the default channel
  • in bar-channel1, all entries between 1.0.0 and 2.0.0 will remain, by following skipand replace chain. More entries may remain in order to ensure the channel has a single head, and doesn't have cycles
  • in bar-channel2, all entries between 2.0.0 and 3.0.0 will remain, by following skipand replace chain. More entries may remain in order to ensure the channel has a single head, and doesn't have cycles

Contributors

sherine-kdependabot[bot]

Issues