Skip to content

Use cleaned SVG for OLM ClusterServiceVersion icon #222

@aslakknutsen

Description

@aslakknutsen

What?

  1. Clean up the operator logo SVG (optimize structure, remove unnecessary metadata/defs, consistent viewBox, valid markup).
  2. Embed it in the ClusterServiceVersion (CSV) as SVG: spec.icon[0].mediatype: image/svg+xml and base64data containing the base64-encoded SVG (replacing the current PNG payload in e.g. bundle/base/csv-template.yaml and any generated bundle manifests that copy from it).

Why?

OLM / Operator Hub targets support SVG icons. We currently ship a PNG (mediatype: image/png) in the CSV. SVG scales cleanly in UIs, is usually smaller than raster at equivalent visual quality, and matches platform expectations when SVG is allowed.

How?

(Optional ideas.)

  • Keep a source .svg in-repo (e.g. under bundle/ or config/), run an optimizer (e.g. svgo) in CI or document a one-off step, then base64-encode for the CSV.
  • Regenerate bundle/CSV from the template so bundle/manifests/*.clusterserviceversion.yaml stays consistent.
  • Verify the icon renders in the target (OpenShift OperatorHub / console) after the change.

Additional Context

  • Current CSV icon is PNG in bundle/base/csv-template.yaml (spec.icon with image/png).
  • Related: bundle/manifests/coraza-kubernetes-operator.clusterserviceversion.yaml if it duplicates the icon block.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Next

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions