Skip to content

Adding --use-image-digests changes the indentation of the rendered csv yaml file #7068

Open

Description

@mbaldessari

Bug Report

What did you do?

When adding --use-image-digests the indentation of the rendered bundle is different than when running it without.

What did you expect to see?

Same indentation, since only the tag vs hashes should be different

Environment

$ operator-sdk version

operator-sdk version: "v1.42.1-1-g3500745e", commit: "3500745ef0320ca80da39424b1e56e4dea8bcb44", kubernetes version: "v1.33.1", go version: "go1.26.1-X:nodwarf5", GOOS: "linux", GOARCH: "amd64"

Additional context

Here is a small reproducer:

TMPDIR=$(mktemp -d)

mkdir -p "$TMPDIR/input"
cat > "$TMPDIR/input/deployment.yaml" <<'EOF'
apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-manager
spec:
  replicas: 1
  selector:
    matchLabels:
      app: manager
  template:
    metadata:
      labels:
        app: manager
    spec:
      containers:
      - name: manager
        image: busybox:1.36
        command: ["/bin/sh"]
EOF

./build/operator-sdk generate bundle \
  --input-dir "$TMPDIR/input" \
  --output-dir "$TMPDIR/bundle-no-digest" \
  --package test-operator --version 0.0.1 -q

./build/operator-sdk generate bundle \
  --input-dir "$TMPDIR/input" \
  --output-dir "$TMPDIR/bundle-digest" \
  --package test-operator --version 0.0.1 \
  --use-image-digests -q

diff -u "$TMPDIR/bundle-no-digest/manifests/test-operator.clusterserviceversion.yaml" \
        "$TMPDIR/bundle-digest/manifests/test-operator.clusterserviceversion.yaml"

You will see a bunch of hunks like the following:

--- /tmp/tmp.Of5KyHUgTJ/bundle-no-digest/manifests/test-operator.clusterserviceversion.yaml     2026-03-17
12:40:01.359221675 +0100
+++ /tmp/tmp.Of5KyHUgTJ/bundle-digest/manifests/test-operator.clusterserviceversion.yaml        2026-03-17
12:40:02.412229336 +0100
@@ -15,49 +15,52 @@
   description: Test Operator description. TODO.
   displayName: Test Operator
   icon:
-  - base64data: ""
-    mediatype: ""
+    - base64data: ""
+      mediatype: ""

Activity

  1. added 4 commits that reference this issue on Mar 19, 2026
    3007728
    51522db
    0e93669
    56de2b9
  2. openshift-ci commented on Jun 16, 2026

    @openshift-ci

    Issues go stale after 90d of inactivity.

    Mark the issue as fresh by commenting /remove-lifecycle stale.
    Stale issues rot after an additional 30d of inactivity and eventually close.
    Exclude this issue from closing by commenting /lifecycle frozen.

    If this issue is safe to close now please do so with /close.

    /lifecycle stale

  3. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Jun 16, 2026
  4. openshift-ci commented on Jul 16, 2026

    @openshift-ci

    Stale issues rot after 30d of inactivity.

    Mark the issue as fresh by commenting /remove-lifecycle rotten.
    Rotten issues close after an additional 30d of inactivity.
    Exclude this issue from closing by commenting /lifecycle frozen.

    If this issue is safe to close now please do so with /close.

    /lifecycle rotten
    /remove-lifecycle stale

  5. added
    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.
    and removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Jul 16, 2026
  6. mbaldessari commented on Jul 28, 2026

    @mbaldessari
    Author

    /remove-lifecycle rotten

  7. removed
    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.
    on Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions